bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make -jN runs some rules more than once


From: Edward Welbourne
Subject: Re: make -jN runs some rules more than once
Date: Sat, 12 Sep 2015 10:54:54 +0000

>> a.gz b.gz:
>>         touch a
>>         gzip a
>>         touch b
>>         gzip b

Paule explained (in detail)
>  multiple explicit targets are just a shorthand way of writing multiple rules,

... and if you actually want to do two things at the same time, you can
do it, via a phony intermediate:

a.gz b.gz .PHONY: zippem
zippem:
        touch a
        gzip a
        touch b
        gzip b

so that both targets get built by zippem the one time it gets run.  In
principle, the empty rules to make a.gz from zippem and b.gz from zippem
both get run; but they're both no-ops.  This is a somewhat bogus thing
to do, of course, but I'm guessing your original rule was willfully
over-simplified from something where it won't be as bogus ...

        Eddy.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]