Hi Ralf, Please see below:
Ralf Wildenhues wrote: > Hi Liviu, > * Liviu Nicoara wrote on Tue, May 30, 2006 at 06:59:53PM CEST: >> ## Makefile.am: >> >> lib_LTLIBRARIES = libfoo.la >> libfoo_la_SOURCES = main.cpp >> EXTRA_libfoo_la_SOURCES = x86.s x86_64.s power5.s >> libfoo_la_LIBADD = $(MY_EXTRA_SOURCES) >> libfoo_la_DEPENDENCIES = $(MY_EXTRA_SOURCES) > > Remove the last two lines and add $(MY_EXTRA_SOURCES) to > libfoo_la_SOURCES. If I add them as a substituted variable in _SOURCES automake will complain: "7.1.3 Conditional compilation of sources You can't put a configure substitution (e.g., @FOO@ or $(FOO) where FOO is defined via AC_SUBST) into a _SOURCES variable. The reason for this is a bit hard to explain, but suffice to say that it simply won't work. Automake will give an error if you try to do this." If I add them explicitly the infrastructure build them all. But the power5.s is supposed to be used only on POWER5 platforms, x86.s only on 32 bit x86, and so on. > If above hint does not work, then please show the failing code, this > time quoting from, well, the code, rather than memory, please. ;-) :-) I'll put together a *very* small test case and post it next. Tgz is ok? > Both should work. FWIW, I don't reckon conditionals as less "nice" than > AC_SUBSTed variables. They allow you to omit the EXTRA_*SOURCES line. I just feel more comfortable writing sh conditionals in configure.ac than I feel doing it in Makefile.am. Thanks. _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool