Skip to contentSkip to conversation

include/buildrules: substitute ".o" for ".lo" only at the very end

PATCH New Markus Mayer 1 participant 1 message Feb 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 include/buildrules: substitute ".o" for ".lo" only at the very end

To prevent issues when the ".o" extension appears in a directory path, ensure that the ".o" -> ".lo" substitution is only performed for the file extension immediately preceeding the ":" of a makefile rule.

---

Change since v1:
- reworked the regex as suggested by David
https://www.spinics.net/lists/linux-xfs/msg49712.html

 include/buildrules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/buildrules +1 -1
index 7a139ff07de8..f6663615d278 100644
@@ -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
 
Signature · 1 line
2.25.1