From 6f6d96de199564f6e1ae70b78cfc548911145df3 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 4 Mar 2020 16:21:06 +0100 Subject: [PATCH] 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. --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 396471062..6c1d3ece1 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)