aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-05-24 15:12:58 -0400
committerGlenn Morris2011-05-24 15:12:58 -0400
commitbdd556a2b38dffdd7b9867eec8113d9ba8e66ed9 (patch)
tree6ff2b0d886a47e4f0cd865fa80ea0e9287065543
parent91513f63c626f3ae01476a76115bf0099f472de9 (diff)
downloademacs-bdd556a2b38dffdd7b9867eec8113d9ba8e66ed9.tar.gz
emacs-bdd556a2b38dffdd7b9867eec8113d9ba8e66ed9.zip
* configure.in: Avoid using variables inside AC_CONFIG_FILES.
-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 @@
12011-05-24 Glenn Morris <rgm@gnu.org> 12011-05-24 Glenn Morris <rgm@gnu.org>
2 2
3 * configure.in: Avoid using variables inside AC_CONFIG_FILES.
4
3 * configure.in (OPT_MAKEFILES_IN): Remove. 5 * configure.in (OPT_MAKEFILES_IN): Remove.
4 (SUBDIR_MAKEFILES): New variable, passed to AC_CONFIG_FILES. 6 (SUBDIR_MAKEFILES): New variable, passed to AC_CONFIG_FILES.
5 (SUBDIR_MAKEFILES_IN): New output variable. 7 (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
3701test "${exec_prefix}" != NONE && 3701test "${exec_prefix}" != NONE &&
3702 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] 3702 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`]
3703 3703
3704SUBDIR_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" 3704dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES.
3705dnl You _can_ use that variable here, so long as any directory using
3706dnl automake (ie lib/) is explicitly listed and not "hidden" in a variable
3707dnl (else you get "no `Makefile.am' found for any configure output").
3708dnl This will work, but you get a config.status that is not quite right
3709dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html).
3710dnl That doesn't have any obvious consequences for Emacs, but on the whole
3711dnl it seems better to just live with the duplication.
3712SUBDIR_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"
3713
3714AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \
3715 doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
3716 doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile \
3717 leim/Makefile])
3705 3718
3706dnl test/ is not present in release tarfiles. 3719dnl test/ is not present in release tarfiles.
3707opt_makefile=test/automated/Makefile 3720opt_makefile=test/automated/Makefile
3708 3721
3709test -f $srcdir/${opt_makefile}.in && \ 3722if test -f $srcdir/${opt_makefile}.in; then
3710 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" 3723 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
3724 dnl Again, it's best not to use a variable. Though you can add
3725 dnl ", [], [opt_makefile='$opt_makefile']" and it should work.
3726 AC_CONFIG_FILES([test/automated/Makefile])
3727fi
3711 3728
3712SUBDIR_MAKEFILES_IN=`echo " lib/Makefile ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` 3729SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
3713 3730
3714AC_SUBST(SUBDIR_MAKEFILES_IN) 3731AC_SUBST(SUBDIR_MAKEFILES_IN)
3715dnl Any directory using automake (ie lib/) has to be explicitly listed,
3716dnl else automake fails with "no `Makefile.am' found for any configure output".
3717AC_CONFIG_FILES([Makefile lib/Makefile ${SUBDIR_MAKEFILES}])
3718 3732
3719dnl Make the necessary directories, if they don't exist. 3733dnl Make the necessary directories, if they don't exist.
3720AC_CONFIG_COMMANDS([mkdirs], [ 3734AC_CONFIG_COMMANDS([mkdirs], [