]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: do not modify the build options during make reg-tests
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2020 15:21:06 +0000 (16:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2020 18:29:12 +0000 (19:29 +0100)
I'm quite fed up with having to rebuild everything from scratch after each
and every "make reg-tests", especially during bisects. The only reason for
this is that there are no build options passed to make for reg-tests, which
modifies the .build_opts file again, resulting in a change upon next build.
Let's just keep this file out of the dependency check for make reg-tests.

Makefile

index 396471062bdc738d1c5e10b14cef51bb24795b81..6c1d3ece129a1dd6f039883a87a1a5117f6afdae 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -848,9 +848,14 @@ help:
        $(Q)echo;echo "Disabled features for TARGET '$(TARGET)' (enable with 'USE_xxx=1') :"
        $(Q)set -- $(foreach opt,$(patsubst USE_%,%,$(use_opts)),$(if $(USE_$(opt)),,$(opt))); echo "  $$*" | (fmt || cat) 2>/dev/null
 
-# Used only to force a rebuild if some build options change
+# Used only to force a rebuild if some build options change, but we don't do
+# it for certain targets which take no build options
+ifneq (reg-tests, $(firstword $(MAKECMDGOALS)))
 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)
+else
+.build_opts:
+endif
 
 haproxy: $(OPTIONS_OBJS) $(OBJS) $(EBTREE_OBJS)
        $(cmd_LD) $(LDFLAGS) -o $@ $^ $(LDOPTS)