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