Hi,

I concocted a contrived example where the presence of a prerequisite alters
the execution of GNU Make depending on its presence. I also use second
expansion. This is the makefile:

.SECONDEXPANSION:
file_x  := f.q
build_x := touch

%.tcl: $(interference) $$(file_$$*)
        $(build_$*) \
  $@

%.q: %.tcl
        touch $@

To run, first touch a few files so they exist:
$ touch f.q file.txt

Next, run make (this works):
$ make x.tcl
touch \
  x.tcl

Ok, clean up:
$ rm x.tcl

Now interfere with the process:
$ make x.tcl interference=file.txt
make x.tcl
\
  f.tcl
make: f.tcl: Command not found
make: *** [f.tcl] Error 127

This problem feels familiar. Can someone explain this behaviour?

Thanks,
Martin
_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to