Thread (11 messages) 11 messages, 4 authors, 2021-02-13

Re: [PATCH] include/buildrules: substitute ".o" for ".lo" only at the very end

From: Eric Sandeen <hidden>
Date: 2021-02-12 22:16:33

On 2/12/21 2:48 PM, Markus Mayer wrote:
To prevent issues when the ".o" extension appears in a directory path,
ensure that the ".o" -> ".lo" substitution is only performed for the
final file extension.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Reviewed-by: Eric Sandeen <redacted>
quoted hunk ↗ jump to hunk
---

I ran into a build issue with our setup due to the original regex below.
It was mangling the path to header files by substituting ".o" with ".lo"
one too many times.

This patch resolves the issue. Also, it seems like the right thing to do
to limit substitutions to the final file extension in a path.

 include/buildrules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/buildrules b/include/buildrules
index 7a139ff07de8..357e0a18504f 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -133,7 +133,7 @@ rmltdep:
 	$(Q)rm -f .ltdep
 
 .ltdep: $(CFILES) $(HFILES)
-	$(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' > .ltdep
+	$(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o$$,\1.lo,' > .ltdep
 
 depend: rmdep .dep
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help