Subject: Re: [PATCH v2 2/2] fuzz: link fuzz programs with `make all` on Linux

From: Junio C Hamano <[email-masked]>
Date: Thu, 11 Apr 2024 14:39:30 -0700

Josh Steadmon <[email-masked]> 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.