From: Willy Tarreau Date: Wed, 4 Mar 2020 15:21:06 +0000 (+0100) Subject: BUILD: makefile: do not modify the build options during make reg-tests X-Git-Tag: v2.2-dev4~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f6d96de199564f6e1ae70b78cfc548911145df3;p=thirdparty%2Fhaproxy.git BUILD: makefile: do not modify the build options during make reg-tests 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. --- diff --git a/Makefile b/Makefile index 396471062b..6c1d3ece12 100644 --- 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)