Commit bdd556a2 authored by Glenn Morris's avatar Glenn Morris

* configure.in: Avoid using variables inside AC_CONFIG_FILES.

parent 91513f63
2011-05-24 Glenn Morris <rgm@gnu.org> 2011-05-24 Glenn Morris <rgm@gnu.org>
* configure.in: Avoid using variables inside AC_CONFIG_FILES.
* configure.in (OPT_MAKEFILES_IN): Remove. * configure.in (OPT_MAKEFILES_IN): Remove.
(SUBDIR_MAKEFILES): New variable, passed to AC_CONFIG_FILES. (SUBDIR_MAKEFILES): New variable, passed to AC_CONFIG_FILES.
(SUBDIR_MAKEFILES_IN): New output variable. (SUBDIR_MAKEFILES_IN): New output variable.
......
...@@ -3701,20 +3701,34 @@ fi ...@@ -3701,20 +3701,34 @@ fi
test "${exec_prefix}" != NONE && test "${exec_prefix}" != NONE &&
exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] 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. dnl test/ is not present in release tarfiles.
opt_makefile=test/automated/Makefile 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" 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) 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. dnl Make the necessary directories, if they don't exist.
AC_CONFIG_COMMANDS([mkdirs], [ AC_CONFIG_COMMANDS([mkdirs], [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment