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. Signed-off-by: Markus Mayer <mmayer@xxxxxxxxxxxx> --- 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(-) diff --git a/include/buildrules b/include/buildrules index 7a139ff07de8..f6663615d278 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 -- 2.25.1