Here is my makefile:
LOTS_OF_FILES := one two three four five six
all: $(LOTS_OF_FILES)
COMMAND_WHICH_BUILDS_LOTS_OF_FILES := for file in $(LOTS_OF_FILES); do echo
hello >> $$file; done
$(LOTS_OF_FILES): Makefile
$(COMMAND_WHICH_BUILDS_LOTS_OF_FILES)
clean:
rm -rf $(LOTS_OF_FILES)
Here is the output:
$ make clean; make -j2
rm -rf one two three four five six
for file in one two three four five six; do echo hello >> $file; done
for file in one two three four five six; do echo hello >> $file; done
Why does the "COMMAND_WHICH_BUILDS_LOTS_OF_FILES" get run twice?
The strange thing is that this is not predictable: sometimes, the "COMMAND..."
only gets run once. I see it get run twice about 70% of the time on my system.
Dave
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make