Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: config.modules glitch in configure or make dependencies



On Sep 13, 10:18am, Peter Stephenson wrote:
} Subject: Re: config.modules glitch in configure or make dependencies
}
} "Bart Schaefer" wrote:
} > The config.modules code in zshconfig.ac does
} > 
} >     for modfile in `cd ${srcdir}; echo */*.mdd */*/*.mdd`; do
} 
} But this only runs if configure or config.status is run

Aha.  The actual problem is that this *isn't* done if config.status is
run -- it's only done if *configure* is run, which running config.status
only sometimes causes to happen.  In most cases config.status regenerates
only those files that result from processing a .in.

Consider the following patch; configure writes config.modules.sh and also
arranges that config.status will source it, and then sources it.  This has
the added benefit that one can run config.modules.sh at any time to change
the module configuration, rather than having to re-run a full configure.

Index: zshconfig.ac
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/zshconfig.ac,v
retrieving revision 1.14
diff -c -r1.14 zshconfig.ac
--- zshconfig.ac	25 May 2002 18:05:54 -0000	1.14
+++ zshconfig.ac	13 Sep 2002 15:41:03 -0000
@@ -1,5 +1,5 @@
 dnl
-dnl  configure.in: Configure template for zsh.
+dnl  zshconfig.ac: Configure template for zsh.
 dnl  Process this file with autoconf to produce a configure script.
 dnl
 dnl  Copyright (c) 1995-1997 Richard Coleman
@@ -1898,9 +1898,15 @@
 # level subdirectories.  Any existing line not containing 'auto=y' will be
 # retained, provided the .mdd file itself was found.
 CONFIG_MODULES=./config.modules
+cat <<EOM > ${CONFIG_MODULES}.sh
+srcdir="$srcdir"
+dynamic="$dynamic"
+CONFIG_MODULES="${CONFIG_MODULES}"
+EOM
+cat <<\EOM >> ${CONFIG_MODULES}.sh
 echo "creating ${CONFIG_MODULES}"
 userlist=" "
-if test -f config.modules; then
+if test -f ${CONFIG_MODULES}; then
   userlist="`sed -e '/^#/d' -e '/auto=y/d' -e 's/ .*/ /' -e 's/^name=/ /' \
         ${CONFIG_MODULES}`"
   mv ${CONFIG_MODULES} ${CONFIG_MODULES}.old
@@ -1986,6 +1992,11 @@
   fi
 done) >${CONFIG_MODULES}
 rm -f ${CONFIG_MODULES}.old
+EOM
+AC_OUTPUT_COMMANDS([if test -z "$CONFIG_FILES$CONFIG_HEADERS"; then
+  . ./${CONFIG_MODULES}.sh
+fi])
+. ./${CONFIG_MODULES}.sh
 
 CLEAN_MK="${srcdir}/Config/clean.mk"
 CONFIG_MK="${srcdir}/Config/config.mk"
@@ -1999,7 +2010,7 @@
 AC_SUBST_FILE(VERSION_MK)dnl
 
 AC_OUTPUT(Config/defs.mk Makefile Doc/Makefile Etc/Makefile Src/Makefile \
-Test/Makefile, \
+Test/Makefile,
 [test -z "$CONFIG_HEADERS" || echo > stamp-h])
 
 eval "zshbin1=${bindir}"
Index: Makefile.in
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Makefile.in,v
retrieving revision 1.5
diff -c -r1.5 Makefile.in
--- Makefile.in	5 Sep 2001 15:22:28 -0000	1.5
+++ Makefile.in	13 Sep 2002 15:30:19 -0000
@@ -144,7 +144,7 @@
 @CLEAN_MK@
 
 distclean-here:
-	rm -f Makefile config.h config.status config.log config.cache config.modules stamp-h Config/defs.mk
+	rm -f Makefile config.h config.status config.log config.cache config.modules config.modules.sh stamp-h Config/defs.mk
 
 realclean-here:
 	cd $(sdir) && rm -f config.h.in stamp-h.in configure


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author