Re: BUILT_SOURCES too clumsy
In the meantime I have patched automake, e.g. diff -ur automake-1.9.5/lib/am/library.am automake-1.9.5.new/lib/am/library.am --- automake-1.9.5/lib/am/library.am2003-06-02 09:08:40.0 +0200 +++ automake-1.9.5.new/lib/am/library.am 2005-05-22 20:22:51.0 +0200 @@ -15,6 +15,7 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +$(%XLIBRARY%_OBJECTS): $(%XLIBRARY%_PREDEPEND) %LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) %DIRSTAMP% -rm -f %LIBRARY% $(%XLIBRARY%_AR) %LIBRARY% $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_LIBADD) It makes sure that the stuff in $(libmy_a_PREDEPEND) gets built before the library objects. The patches for *_LTLIBRARIES and *_PROGRAMS look the same. What do you think? Would you expect any problems with this? Regards Harri
Re: BUILT_SOURCES too clumsy
Hi, On Sun, May 22, 2005 at 05:02:09PM +0200, Harald Dunkel wrote: > The targets in BUILT_SOURCES are unconditionally built for > 'make all' and 'make install' and 'make check'. Very clumsy. yes, it is. Yet it can be useful in certain situations. > I would like to generate some code for an optional convenience > library exactly when needed. Perhaps you could place the library to a separate directory. Then you'd use AM_CONDITIONAL(MYLIB, ...) in configure.ac and if MYLIB SUBDIRS += mylib endif to control whether the recursion of make goes into that dir. If the make won't recurse, it won't build BUILT_SOURCES there. Yes, this is just another workaround, but perhaps it'll help you. Stepan Kasal
BUILT_SOURCES too clumsy
Hi folks, The targets in BUILT_SOURCES are unconditionally built for 'make all' and 'make install' and 'make check'. Very clumsy. I would like to generate some code for an optional convenience library exactly when needed. Would there be a way to introduce a derived variable libmylib_a_PREDEPEND, similar to BUILT_SOURCES, but bound to the primary to build? Regards Harri