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 <[email protected]>          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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to