]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: work around an old bug in GNU make-3.80
authorWilly Tarreau <w@1wt.eu>
Fri, 29 Mar 2019 16:17:52 +0000 (17:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Mar 2019 19:59:59 +0000 (20:59 +0100)
GNU make-3.80 fails on the .build_opts target, expecting the closing
brace before the first semi-colon in the shell command, it probably
uses a more limited parser for dependencies. Actually it appears it's
enough to place this command in a variable and reference the variable
there. Since it doesn't affect later versions (and the resulting string
is always empty anyway), let's apply the minor change to continue to
comply with the announced dependencies.

This could be backported as far as 1.6.

Makefile

index 55522151faa36c19ae872e25d982d6b69309f04a..fd2d9050d0374b7adee41d054587245b29a4c033 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -810,7 +810,8 @@ help:
        $(Q)sed -ne "/^[^#]*$$/q;s/^#\(.*\)/\1/p" Makefile
 
 # Used only to force a rebuild if some build options change
-.build_opts: $(shell rm -f .build_opts.new; echo \'$(TARGET) $(BUILD_OPTIONS) $(VERBOSE_CFLAGS)\' > .build_opts.new; if cmp -s .build_opts .build_opts.new; then rm -f .build_opts.new; else mv -f .build_opts.new .build_opts; fi)
+build_opts = $(shell rm -f .build_opts.new; echo \'$(TARGET) $(BUILD_OPTIONS) $(VERBOSE_CFLAGS)\' > .build_opts.new; if cmp -s .build_opts .build_opts.new; then rm -f .build_opts.new; else mv -f .build_opts.new .build_opts; fi)
+.build_opts: $(build_opts)
 
 haproxy: $(OPTIONS_OBJS) $(OBJS) $(EBTREE_OBJS)
        $(cmd_LD) $(LDFLAGS) -o $@ $^ $(LDOPTS)