[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Parallel make not working the way I expect...
From: |
David Wuertele |
Subject: |
Parallel make not working the way I expect... |
Date: |
Fri, 9 Feb 2007 20:44:30 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
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
- Parallel make not working the way I expect...,
David Wuertele <=