]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Fix a GNUism that FreeBSD's sed(1) cannot deal with
authorTobias Kortkamp <t@tobik.me>
Sun, 25 Nov 2018 16:57:13 +0000 (17:57 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 21 Jul 2020 14:51:19 +0000 (15:51 +0100)
At the moment '\s*' is silently interpreted as just 's*', but in the
future it will be an error:

sed: 1: "s/\.o\s*:/_DEPS +=/": RE error: trailing backslash (\)

cf. https://bugs.freebsd.org/229925

Signed-off-by: Tobias Kortkamp <t@tobik.me>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/Makefile.housekeeping

index b6c61c11249c4c4922e065997399249be8fc5943..134becd508c2f7f7c01c2f601d36284d0aa6e4bf 100644 (file)
@@ -856,7 +856,7 @@ define deps_template_parts
        @$(MKDIR) -p $(BIN)/deps/$(dir $(1))
        $(Q)$(CPP) $(CFLAGS) $(CFLAGS_$(2)) $(CFLAGS_$(3)) -DOBJECT=$(3) \
                -Wno-error -M $(1) -MG -MP | \
-               sed 's/\.o\s*:/_DEPS +=/' > $(BIN)/deps/$(1).d
+               sed 's/\.o[[:blank:]]*:/_DEPS +=/' > $(BIN)/deps/$(1).d
 endef
 
 # rules_template : generate rules for a given source file