help-make
[Top][All Lists]
Advanced

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

Re: Does (normal) prerequisite order matter?


From: Matt England
Subject: Re: Does (normal) prerequisite order matter?
Date: Thu, 24 Nov 2005 20:29:01 -0600

At 11/19/2005 04:51 AM, Brendan Heading wrote:
I don't yet see this explained clearly in any of the any of the manual (at http://www.gnu.org/software/make/manual/html_chapter/make_toc.html ), and I have read most of the manual, including the parts on rule-writing.

The manual definitely says that the prereqs are always processed left-to-right for non-parallel builds.

Can you possibly point out the section/verbiage that refers to this? I went on a sincere search for this a while back and didn't see it. Thanks for any help.

-Matt

I'd suggest avoiding using any of make's more advanced syntax, and instead look into your prerequisites and understand why they are interdependent. Then you can do something like

target: prereq1 prereq2

prereq2:prereq1
        <do prereq2>
prereq1:
        <do prereq1>

With the above syntax, we are explicitly telling make to order the prereq processing in a certain way even if there are parallel builds.

Sounds like good advice.

However, a problem arises with vpath and directories that are created at makefile run time. I plan on starting a separate email thread on this topic.

-Matt




reply via email to

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