I think you are misunderstanding what this syntax means:a b c d e:This does not indicate that 'some_command' will produce all of these targets. Rather, it is short hand for this: a:To specify a (static) rule that builds multiple targets, an intermediate timestamp file is needed. Something like: all: a b c d eNote that pattern rules do support multiple targets for a single rule. Depending on your needs, you may be able to use a pattern rule instead of a static rule. Tom. On 2/8/2010 2:47 PM, Warren Dodge wrote: I have a make file that is causing me a problem when I try to use the -j option to speed things up.Here is a simplified version of it that shows my problem. ### Makefile ######## all: a b c d e touch all a b c d e: script.5files ############################################################################# script.5files contains this touch a b c d e ############################################################################# Basically, I want to build the all target if any one of the 5 files is missing. The script will always build all five files if it is run. As seen it appears to do that. rm ? all make all script.5files touch all make all make: `all' is up to date. rm a make all script.5files touch all rm b d make all script.5files touch all ############################################################################# Now if I add a -j to the mix it does something strange rm ? all make -j all script.5files script.5files script.5files script.5files script.5files touch all It senses it can do all in parallel and runs the script 5 times. In this simple case it doesn't really hurt but in my real script it totally messes thing up as it is a lengthy process to create the 5 files via a perl script. I kind of think what it is doing is expected but I am not totally sure. What I would wonder is why make did not sense that the prerequisites for all are totally made by just one execution of the script and thus -j would only call the script once. If there is another way to approach this I'd like to know it. This is driving me nuts. _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make --
![]() Tom Honermann | Senior Principal Software Engineer | 503.276.2354 Oracle | PeopleTools Development 1211 SW 5th Ave, Suite 9080, Portland, OR 97204 |
_______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make