zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: config.modules glitch in configure or make dependencies
Date: Fri, 13 Sep 2002 15:46:06 +0000	[thread overview]
Message-ID: <1020913154606.ZM18273@candle.brasslantern.com> (raw)
In-Reply-To: <19433.1031908704@csr.com>

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   


  reply	other threads:[~2002-09-13 15:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-11 14:20 Bart Schaefer
2002-09-12  9:37 ` Peter Stephenson
2002-09-12 14:58   ` Bart Schaefer
2002-09-13  9:18     ` Peter Stephenson
2002-09-13 15:46       ` Bart Schaefer [this message]
2002-09-13 15:57         ` Peter Stephenson
2002-09-13 17:53           ` Bart Schaefer
2002-09-13 18:31             ` Clint Adams
2002-09-13 22:47               ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1020913154606.ZM18273@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).