On Tue, 2009-04-07 at 23:12 +0200, Ralf Wildenhues wrote: > * Ryan Arnold wrote on Mon, Apr 06, 2009 at 10:06:20PM CEST: > > Moving from GLIBC's very robust and complicated handwritten Makefiles > > (written by Roland McGrath) to Automake has proven to be conceptually > > difficult while trying to maintain the sysdeps tree structure.
> Can you off-load the sysdeps detection into a couple of configure macros > and replace the corresponding file names with AC_SUBST substitutions? > You'd still have to list all possible files in some EXTRA_libdfp_a_SOURCES > variable somewhere, but at least that would get you going. Hi Ralf, So I've been trying out the AC_SUBST substitutions like you suggested. configure.ac: ... # This has main.c and helper.c computed from a sysdeps tree walk AC_SUBST(dfp_files) dfp_headers=helper.h AC_SUBST(dfp_headers) Makefile.am: ... dfp_source = $(dfp_files) $(dfp_headers) # filenames without a suffix. This is a local non-automake variable. dfp_SOURCES = $(dfp_source) Unfortunately autoconf & automake are able to detect substitutions and it complains that this hack is forbidden: configure.ac:324: `dfp_files' includes configure substitution `...@dfp_files@' configure.ac:324: and is referred to from `dfp_SOURCES'; configure.ac:324: configure substitutions are not allowed in _SOURCES variables configure.ac:328: `dfp_headers' includes configure substitution `...@dfp_headers@' configure.ac:328: and is referred to from `dfp_SOURCES'; configure.ac:328: configure substitutions are not allowed in _SOURCES variables autoreconf: automake failed with exit status: 1 Any thoughts? Anyone else? Ryan S. Arnold IBM Linux Technology Center Linux Toolchain Development
