automake
[Top][All Lists]
Advanced

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

BUILT_SOURCES problem


From: Harlan Stenn
Subject: BUILT_SOURCES problem
Date: Wed, 18 Feb 2004 17:50:31 -0500

I see that the "install" target now depends on BUILT_SOURCES.  This is Good.

I have a different problem.

I have a pre-built dynamic library that gets checked in to the tree.

Don't ask, it's really a feature.

So I have a Makefile.am that contains:

 BUILT_SOURCES= setup.libs
 GEN_LIBS=      gen.libs                # a local script that DTRT.

 setup.libs: setup.libcrypto setup.libssl

 setup.libcrypto:
         $(GEN_LIBS) $(srcdir) libcrypto.lai libcrypto.so.0.9.7

 setup.libssl:
         $(GEN_LIBS) $(srcdir) libssl.lai libssl.so.0.9.7

 NULL=
 libdir = /usr/lib
 lib_LTLIBRARIES =       \
         libcrypto.la    \
         libssl.la       \
         $(NULL)

 libcrypto_la_SOURCES=
 libssl_la_SOURCES=

the .lai files are also checked in.

So if somebody does a "make all" or "make install" I'm OK - the gen.libs
script runs and the .libs/ subdir gets created and everybody is happy.

The problem is that I have stumbled on a case where some other Makefile is
getting invoked first, and that Makefile has a dependency on the
libcrypto.la file here.

When that "remote" Makefile trips this dependency it goes here and
effectively does a "make libcrypto.la".

The current automake does not have BUILT_SOURCES as a dependency of the
targets in the Makefile, so this Loses.

I know I can manually add a dependency (and that may work), but I have to
wonder if there are other cases like this out there, and so I'll ask:

Would it be good idea to have "more" generated targets depend on
BUILT_SOURCES?

This kinda feeds in to my other (apparently unanswered) query about:

 How do I get all generated Stuff to depend on the Makefile?

as that way, in a large project, a change to any Makefile.am will cause that
directory to be rebuilt (which may be a Good Thing for some people, which is
why I suggested this capability be handled thru an AUTOMAKE_OPTION).

H




reply via email to

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