help-make
[Top][All Lists]
Advanced

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

Re: Question about order dependencies


From: Paul Smith
Subject: Re: Question about order dependencies
Date: Sun, 20 Sep 2009 17:09:52 -0400

On Sun, 2009-09-20 at 12:44 -0700, drwowe wrote:
> 
> 
> drwowe wrote:
> > 
> > Foo actually does have a logical dependency on bar.  In the real example
> > Foo builds an application and Bar builds a bunch of libraries. 
> Er, I think I said that backwards from my original post, just transpose foo
> and bar and they will be consistent.  The point is, the main application has
> a dependency on the libraries, but I want to skip the library build when
> specifically requesting the main build.

One straightforward way to do this, at the cost of a recursive
invocation of make, is something like:

        all: main-real
        main:
                @$(MAKE) -o libraries main-real
        main-real: <real "main" target stuff>
        libraries: <libraries target stuff>

It needs a little work to get the rebuild stuff down (when to rebuild
and when not to).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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