[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The automake/libtool way to make a dynamic lib from multiple sources
From: |
Ralf Wildenhues |
Subject: |
Re: The automake/libtool way to make a dynamic lib from multiple sources |
Date: |
Fri, 22 Sep 2006 04:52:46 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
* Ryan McDougall wrote on Fri, Sep 22, 2006 at 04:10:40AM CEST:
>
> The problem with this is that with this method that I have to manually
> specify the dependencies, right?
>
> A: foo
> cd src/A && $(MAKE) $(AM_MAKEFLAGS) libA.la
> .PHONY: A
>
> foo:
> cd src/foo && $(MAKE) $(AM_MAKEFLAGS) libfoo.la
> .PHONY: foo
Yes, that would be a bit ugly (as you'd be specifying the same
information in more than one place). You could put the dependency in
the makefile in src/A though:
../foo/libfoo.la:
cd ../foo && $(MAKE) $(AM_MAKEFLAGS) libfoo.la
.PHONY: ../foo/libfoo.la
(The phony qualifier is because the rule does not list the real
dependencies of libfoo.la).
Mind you though that this approach will cause more `make' instances to
be invoked than necessary; depending on the size of the foo/Makefile
this may be slowing down the build a bit.
Generally, there are always trade-offs between recursive and
nonrecursive make setups. Both have their merits and their backdraws,
there's Peter Miller's classic paper "Recursive Make Considered Harmful"
and also some arguments for the other side in this thread
http://thread.gmane.org/gmane.comp.sysutils.automake.general/7250
(some of the arguments there are specific to Automake-generated portable
makefiles, as opposed to, say, hand-written makefiles for GNU make).
Cheers,
Ralf
- Re: The automake/libtool way to make a dynamic lib from multiple sources, (continued)
Re: The automake/libtool way to make a dynamic lib from multiple sources, Ryan McDougall, 2006/09/21
- Re: The automake/libtool way to make a dynamic lib from multiple sources,
Ralf Wildenhues <=