[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make -jN runs some rules more than once
From: |
Brian Malehorn |
Subject: |
Re: make -jN runs some rules more than once |
Date: |
Sun, 13 Sep 2015 18:37:57 -0700 |
On Sat, Sep 12, 2015 at 3:54 AM, Edward Welbourne <address@hidden> wrote:
> a.gz b.gz .PHONY: zippem
> zippem:
> touch a
> gzip a
> touch b
> gzip b
Yes, this is approximately my solution. I don't use a PHONY target
though, I "touch zippem" at the end so it won't re-build zippem every
time I run "make".
> I'm guessing your original rule was willfully
> over-simplified from something where it won't be as bogus ...
Indeed, my problem isn't this simple. I have a single script that builds
5 different files, and it's not worth it to try breaking the script up.
On Fri, Sep 11, 2015 at 5:35 AM, Paul Smith <address@hidden> wrote:
> E.g., multiple explicit targets are just a shorthand way of writing
> multiple rules, so make still expects to run one instance of the recipe
> for each target. It is NOT a statement to make that one invocation of
> the recipe will build all the targets.
>
> This interpretation has been true of every make ever created since the
> first one in the 1970's and is mandated by the POSIX standard (not to
> mention hundreds of thousands of makefiles already in existence).
That's unfortunate. But I can see how in a time before -jN, this
decision would be perfectly acceptable, and now it's too late to
change. Thanks for the response.