Newbie on the list, so forgive me if this is asked frequently:

We have code generation, and we have  a rule like this:

fileout1.txt fileout2.txt fileout3.txt: filein.txt
        filegen.sh filein.txt

We run a parallel make (make -j x), and what I've found is that the rule often 
gets invoked three times, causes files to overwrite each other. We've had to 
make that part serial to avoid this, and it slows down the build. Some have 
suggested an approach like this:

filemarker.txt: filein.txt
        filegen.sh filein.txt
        touch filemarker.txt

This will work, but it leaves a clutter of files all over the place.

Is there a way to specify the rule so that the rule is only invoked once in a 
parallel make, or is there a technique that accomplishes the same thing?

Thanks!

Timothy K. Canham
Jet Propulsion Laboratory
Pasadena, CA
[email protected]
-------------------
Mars Science Laboratory Project 
Flight Software Team




_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to