* Bruno Haible wrote on Tue, Oct 05, 2010 at 10:35:13PM CEST: > > AM_SUBST_NOTMAKE exists in Automake 1.11. > > Thanks; this is good and would solve half of the problem. But an expansion > that contains #if and #pragma would also collide with 'make' syntax, as > explained in > <http://lists.gnu.org/archive/html/bug-gnulib/2008-10/msg00300.html>.
IOW, config.status should be used instead of sed for all the generated headers. I don't really have time to look into this, but if anyone wants to, it seemed fairly easy to do at the time: the only thing missing is a cd back to top_builddir and having a relative path to the input and output files, then you can use ./config.status --file=- < in > out. Not changing directory is bad because config.status writes in config.log in the current directory. Cheers, Ralf