I've been using AC_SUBST_FILE to put common targets into my
makefile.am's.  eg, Makefile.am contains:

@FOO_TARGET@

where configure.ac contains
FOO_TARGET=foo_target
AC_SUBST_FILE(FOO_TARGET)

and foo_target contains:

foo:
        echo foo

I would like to do this via AC_SUBST, but this completely hoses
the Makefile.  For example, if configure.ac instead contains:

BAR_TARGET="bar:
        echo bar"
AC_SUBST( BAR_TARGET)

Then Make bails since Makefile now contains the invalid construct:
BAR_TARGET = bar:
        echo bar

I'd like to get away from AC_SUBST_FILE, but I don't see a way
around the manner in which automake is building the Makefile.
Is there a way to construct a generic target via AC_SUBST?



Reply via email to