summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--configure.in26
2 files changed, 22 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index f210659cb2b..86a685d988c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2011-05-24 Glenn Morris <rgm@gnu.org>
+ * configure.in: Avoid using variables inside AC_CONFIG_FILES.
+
* configure.in (OPT_MAKEFILES_IN): Remove.
(SUBDIR_MAKEFILES): New variable, passed to AC_CONFIG_FILES.
(SUBDIR_MAKEFILES_IN): New output variable.
diff --git a/configure.in b/configure.in
index f0520902abb..e4b3a4ec7fc 100644
--- a/configure.in
+++ b/configure.in
@@ -3701,20 +3701,34 @@ fi
test "${exec_prefix}" != NONE &&
exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`]
-SUBDIR_MAKEFILES="lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile"
+dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES.
+dnl You _can_ use that variable here, so long as any directory using
+dnl automake (ie lib/) is explicitly listed and not "hidden" in a variable
+dnl (else you get "no `Makefile.am' found for any configure output").
+dnl This will work, but you get a config.status that is not quite right
+dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html).
+dnl That doesn't have any obvious consequences for Emacs, but on the whole
+dnl it seems better to just live with the duplication.
+SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile"
+
+AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \
+ doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
+ doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile \
+ leim/Makefile])
dnl test/ is not present in release tarfiles.
opt_makefile=test/automated/Makefile
-test -f $srcdir/${opt_makefile}.in && \
+if test -f $srcdir/${opt_makefile}.in; then
SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
+ dnl Again, it's best not to use a variable. Though you can add
+ dnl ", [], [opt_makefile='$opt_makefile']" and it should work.
+ AC_CONFIG_FILES([test/automated/Makefile])
+fi
-SUBDIR_MAKEFILES_IN=`echo " lib/Makefile ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
+SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
AC_SUBST(SUBDIR_MAKEFILES_IN)
-dnl Any directory using automake (ie lib/) has to be explicitly listed,
-dnl else automake fails with "no `Makefile.am' found for any configure output".
-AC_CONFIG_FILES([Makefile lib/Makefile ${SUBDIR_MAKEFILES}])
dnl Make the necessary directories, if they don't exist.
AC_CONFIG_COMMANDS([mkdirs], [