bug-make
[Top][All Lists]
Advanced

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

Target is not updated properly if intermediate prerequisite is in groupe


From: Mikhail P
Subject: Target is not updated properly if intermediate prerequisite is in grouped targets rule with dry run, but ok in a real run
Date: Mon, 29 Nov 2021 21:16:38 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2

Greetings!

I get unexpected behavior with the following toy makefile when d_file is newer than a_file

a_file : b_file
    echo "making a_file from $<" > $@

b_file c_file &: d_file
    echo "making b_file from $<" > b_file
    echo "making c_file from $<" > c_file

d_file :
    echo "making d_file" > $@

If I run make with this file I get the needed a_file and intermediate b_file, c_file and d_file which is good. If I touch d_file and run make -n I get

echo "making b_file from d_file" > b_file
echo "making c_file from d_file" > c_file

If I remove dry run switch than additionally the command

echo "making a_file from $<" > $@

is executed. Why dry run shows incorrect commands? Isn't it obvious in a dry run tha file a_file should also be updated?

Thanks,

-Mikhail




reply via email to

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