[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make question
From: |
Canham, Timothy K (316C) |
Subject: |
Make question |
Date: |
Fri, 5 Feb 2010 07:59:12 -0800 |
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
address@hidden
-------------------
Mars Science Laboratory Project
Flight Software Team
- Make question,
Canham, Timothy K (316C) <=