Damien Miller
2021-Aug-11 06:59 UTC
[PATCH] Use AC_SUBST_FILE to replace @DEPEND@ with contents of .depend
On Sun, 18 Apr 2021, Michael Forney wrote:> AC_SUBST_FILE[0] is similar to AC_SUBST, but instead of replacing > a variable with its value, it replaces a variable with the contents > of the file named by the value. This is exactly what we want in > order to insert the contents of .depend at the end of the Makefile. > > Using AC_SUBST for this purpose poses some problems if $as_echo > involves running an external command (i.e. printf is not built-in), > in which case the size of .depend may exceed the operating system's > argument size limit. In particular, since autoconf 2.70, $as_echo > no longer uses `print -r` on ksh shells[1], causing the following > message when creating config.log on Linux with oksh: > > ./configure: printf: Argument list too long > > AC_SUBST_FILE requires the substitution string to be on its own > line, so drop the unneeded leading comment (the first line of .depend > has a '#' of its own).I actually have a few workflows that run make against the Makefile.in (e.g. generating cat format manpages as part of release) and these break with @DEPEND@ on it's own, uncommented line. I'll need to adjust these before merging this. It's unfortunate that AC_SUBST_FILE has the whole-line restriction whereas AC_SUBST does not :( -d
Thorsten Glaser
2021-Aug-11 15:14 UTC
[PATCH] Use AC_SUBST_FILE to replace @DEPEND@ with contents of .depend
On Wed, 11 Aug 2021, Damien Miller wrote:> I actually have a few workflows that run make against the Makefile.in > (e.g. generating cat format manpages as part of release) and these > break with @DEPEND@ on it's own, uncommented line. I'll need to adjust > these before merging this.Can?t you put #@DEPEND@ on a line of its own? Put a leading newline into the @DEPEND@ contents. bye, //mirabilos -- 15:41?<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)