On Sun, 1 Oct 2023 at 00:59, Nick Bowler <nbow...@draconx.ca> wrote:

> Suggestion 2) All explicit --enable-foo/--disable-foo arguments to
> a configure script are available in shell variables; in the case of
> --disable-dependency-tracking you can do something like this in
> configure.ac:
>
>   AM_CONDITIONAL([NO_DEPS], [test x"$enable_dependency_tracking" = x"no"])
>
> then in Makefile.am:
>
>   if NO_DEPS
>   # stuff to do when dependency tracking is disabled
>   else
>   # stuff to do otherwise
>   endif
>
> Note that these approaches are different in the case where dependency
> tracking is disabled because it is not supported by the user's tools,
> rather than by explicit request.  This may or may not matter for your
> use case.


Thanks, Nick, Youi've made it easy for me without spelunking and trying to
guess what's documented.  I think I'll go with the documented approach as I
am not concerned about the corner case.  I don't know what tool deficiency
might trigger it, but I'm going to assume for now that it's good enough to
optimize build time only when --disable-depedency-tracking is used.

Cheers,
Dave Hart

Reply via email to