On Tue, Oct 18, 2022 at 01:01:14PM +0200, Ulrich Drepper via Gcc-patches wrote:
> This is of course not a new problem in general.  GNU make has for a long
> time support for order-only prerequisites.  With those one can exactly
> express what is needed:
> 
> ifeq ($(ENABLE_MAINTAINER_RULES), true)
> FOO.h: FOO.gperf
> else
> FOO.h: | FOO.gperf
> endif
>         gperf ...
> 
> ifeq ($(ENABLE_MAINTAINER_RULES), true)
> FOO.gperf: CSV
> else
> FOO.gperf: | CSV
> endif
>         python ...
> 
> The question here is whether there is a reason not to depend on GNU make
> features (and whatever other make implemented this extension).

GCC requires GNU make and we already use order-only prerequisities in
gcc/Makefile.in :
# In order for parallel make to really start compiling the expensive
# objects from $(OBJS) as early as possible, build all their
# prerequisites strictly before all objects.
$(ALL_HOST_OBJS) : | $(generated_files)

        Jakub

Reply via email to