From: Junio C Hamano Date: Thu, 11 Apr 2024 21:39:30 GMT Subject: Re: [PATCH v2 2/2] fuzz: link fuzz programs with `make all` on Linux Message-ID: In-Reply-To: <8846a7766a1e14373272f7115d37a3b774f51a71.1712858920.git.steadmon@google.com> Josh Steadmon writes: > @@ -752,23 +755,6 @@ SCRIPTS = $(SCRIPT_SH_GEN) \ > > - ... > -# Always build fuzz objects even if not testing, to prevent bit-rot. > -all:: $(FUZZ_OBJS) > -... > -FUZZ_PROGRAMS += $(patsubst %.o,%,$(filter-out %dummy-cmd-main.o,$(FUZZ_OBJS))) > - > # Empty... > EXTRA_PROGRAMS = As Peff said earlier, I suspect there is no need to move things for dependencies (make rules are somewhat declarative), but grouping all the things related to fuzzing is a good idea, so I am OK with the new location. > +# Always build fuzz objects even if not testing, to prevent bit-rot. > +all:: $(FUZZ_OBJS) > + > +FUZZ_PROGRAMS += $(patsubst %.o,%,$(filter-out %dummy-cmd-main.o,$(FUZZ_OBJS))) > + > +# Build fuzz programs when possible, even without the necessary fuzzing support, > +# to prevent bit-rot. > +ifdef LINK_FUZZ_PROGRAMS > +all:: $(FUZZ_PROGRAMS) > +endif OK. Will queue. Thanks.