bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU make 4.3.90 release candidate available


From: Frank Heckenbach
Subject: Re: GNU make 4.3.90 release candidate available
Date: Sun, 02 Oct 2022 22:14:10 +0200

I noticed a change in behaviour which I didn't find mentioned in
(or an apparent consequence of) the listed backward-incompatible
changes.

I have a pattern rule like "%.c %.h &: %.y" for a tool (Bison) that
may generate two output files (.c and .h), but in some cases
(depending on the option "--defines") only one of them (.c).

With previous make versions, this rule would work in both cases,
even if no .h file was generated (or expected):

% cat Makefile
all: foo.c

%.c %.h &: %.y; touch "$@"

foo.y: ; touch "$@"

clean: ; rm -f foo.y foo.c
% make-4.3
touch "foo.y"
touch "foo.c"
% make-4.3
make-4.3: Nothing to be done for 'all'.

With the new version, make keeps remaking foo.c because foo.h does
not exist:

% make clean
rm -f foo.y foo.c
% make
touch "foo.y"
touch "foo.c"
% make
touch "foo.c"
% make
touch "foo.c"

Now, it's not a problem to me, I'll use something like
"%.c $(if $(...),,%.h) &: %.y" (which is arguably more correct,
anyway), just wanted to let you know in case this change in
behaviour was not intended.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]