Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: pws-19: look no ed
- X-seq: zsh-workers 6330
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: Zsh Workers List <zsh-workers@xxxxxxxxxxxxxx>
- Subject: PATCH: pws-19: look no ed
- Date: Sat, 22 May 1999 15:05:34 +0200
- In-reply-to: "Scott RoLanD"'s message of "Fri, 21 May 1999 13:57:33 DFT." <19990521135733.A26046@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Scott RoLanD wrote:
> ed was indeed my problem; here is a patch for configure.in:
This would be the correct approach for the configure system as it stands.
However, Bart privately asked the typically enlightened question,
> Why aren't we using AC_SUBST_FILE for this, BTW?
The answer seems to be that defs.mk is both included by the substitution
process, but itself needs to be substituted. That can be avoided by first
making defs.mk from defs.mk.in, so that the basic definitions are made once
and for all. This is much better as it uses standard macros and avoids the
hackery which was causing Scott problems in configure.
Two subtleties came up (as usual, fiddling with the make system is like
being in a nightmare trying to work out why banging your head against the
wall produces a shower of wet fish with purple spots reciting the Saga of
Burnt Njal, but never mind): first, config.status still needs modifying so
as to allow it to substitute files which occur in the build directories as
well as the source directories; there's a comment about this in
mkmakemod.sh. It might be worth thinking about an autoconf patch to allow
this.
Second, some of the variables in defs.mk were being substituted at the last
minute when mkmakemod.sh was run: this script creates first a Makefile.in
(or in Src, Makemod.in) from Makemod.in.in (a name I like not), then a
Makefile by running config.status, so those variables in defs.mk shouldn't
have been substituted by this stage. I decided that in that case they had
no business in defs.mk anyway and shifted them to Makemod.in.in, and
similarly for the non-modular builds in Doc etc. Your bafflement at this
exercise is nothing to mine.
I have managed a complete rebuild from scratch with this, so I don't think
there are any further problems that can't be avoided. This now removes the
necessity for ed. I think that's a good thing, because not only Scott but
two other people reported what turns out to be this problem; with hindsight
this is why the build failed on QNX.
After this patch, Config/defs.mk as it exists in the distribution is
scheduled for demolition, but there's no corresponding hunk. It will in
any case be overwritten the next time you run configure.
One final minor thing: previously, all files Config/*.mk were
automatically candidates for replacement in Makefiles, while now they need
to be mentioned explicitly in configure.in.
--- Config/defs.mk.in.asf Sat May 22 14:36:21 1999
+++ Config/defs.mk.in Sat May 22 14:36:04 1999
@@ -0,0 +1,81 @@
+#
+# Basic Makefile definitions
+#
+# Copyright (c) 1995-1997 Richard Coleman
+# All rights reserved.
+#
+# Permission is hereby granted, without written agreement and without
+# license or royalty fees, to use, copy, modify, and distribute this
+# software and to distribute modified versions of this software for any
+# purpose, provided that the above copyright notice and the following
+# two paragraphs appear in all copies of this software.
+#
+# In no event shall Richard Coleman or the Zsh Development Group be liable
+# to any party for direct, indirect, special, incidental, or consequential
+# damages arising out of the use of this software and its documentation,
+# even if Richard Coleman and the Zsh Development Group have been advised of
+# the possibility of such damage.
+#
+# Richard Coleman and the Zsh Development Group specifically disclaim any
+# warranties, including, but not limited to, the implied warranties of
+# merchantability and fitness for a particular purpose. The software
+# provided hereunder is on an "as is" basis, and Richard Coleman and the
+# Zsh Development Group have no obligation to provide maintenance,
+# support, updates, enhancements, or modifications.
+#
+
+# fundamentals
+SHELL = /bin/sh
+@SET_MAKE@
+
+# installation directories
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+MODDIR = $(libdir)/zsh/$(VERSION)
+infodir = @infodir@
+mandir = @mandir@
+
+# compilation
+CC = @CC@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
+DLCFLAGS = @DLCFLAGS@
+DLLDFLAGS = @DLLDFLAGS@
+LIBLDFLAGS = @LIBLDFLAGS@
+EXELDFLAGS = @EXELDFLAGS@
+LIBS = @LIBS@
+DL_EXT = @DL_EXT@
+DLLD = @DLLD@
+EXPOPT = @EXPOPT@
+IMPOPT = @IMPOPT@
+
+# utilities
+AWK = @AWK@
+YODL = @YODL@
+YODL2TXT = $(YODL)2txt
+YODL2HTML = $(YODL)2html
+
+# install utility
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+# flags passed to recursive makes in subdirectories
+MAKEDEFS = \
+prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
+libdir='$(libdir)' MODDIR='$(MODDIR)' infodir='$(infodir)' mandir='$(mandir)' \
+CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' CFLAGS='$(CFLAGS)' \
+LDFLAGS='$(LDFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' \
+DLCFLAGS='$(DLCFLAGS)' DLLDFLAGS='$(DLLDFLAGS)' \
+LIBLDFLAGS='$(LIBLDFLAGS)' EXELDFLAGS='$(EXELDFLAGS)' \
+LIBS='$(LIBS)' DL_EXT='$(DL_EXT)' DLLD='$(DLLD)' \
+AWK='$(AWK)' YODL='$(YODL)' YODL2TXT='$(YODL2TXT)' YODL2HTML='$(YODL2HTML)'
+
+# override built-in suffix list
+.SUFFIXES:
--- Doc/Makefile.in.asf Sat May 22 13:29:25 1999
+++ Doc/Makefile.in Sat May 22 14:36:28 1999
@@ -27,8 +27,14 @@
subdir = Doc
dir_top = ..
-@@version.mk@@
-@@defs.mk@@
+@VERSION_MK@
+
+# source/build directories
+VPATH = @srcdir@
+sdir = @srcdir@
+sdir_top = @top_srcdir@
+
+@DEFS_MK@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
@@ -195,7 +201,7 @@
# ========== DEPENDENCIES FOR CLEANUP ==========
-@@clean.mk@@
+@CLEAN_MK@
clean-here:
rm -f *.html *.info* *.dvi *.ps
@@ -210,4 +216,4 @@
# ========== DEPENDENCIES FOR MAINTENANCE ==========
-@@config.mk@@
+@CONFIG_MK@
--- Etc/Makefile.in.asf Sat May 22 13:29:25 1999
+++ Etc/Makefile.in Sat May 22 14:36:48 1999
@@ -28,8 +28,14 @@
dir_top = ..
SUBDIRS =
-@@version.mk@@
-@@defs.mk@@
+@VERSION_MK@
+
+# source/build directories
+VPATH = @srcdir@
+sdir = @srcdir@
+sdir_top = @top_srcdir@
+
+@DEFS_MK@
# ========== DEPENDENCIES FOR BUILDING ==========
@@ -43,7 +49,7 @@
# ========== DEPENDENCIES FOR CLEANUP ==========
-@@clean.mk@@
+@CLEAN_MK@
mostlyclean-here:
rm -f FAQ.html
@@ -56,4 +62,4 @@
# ========== DEPENDENCIES FOR MAINTENANCE ==========
-@@config.mk@@
+@CONFIG_MK@
--- Makefile.in.asf Sat May 22 13:29:25 1999
+++ Makefile.in Sat May 22 14:37:13 1999
@@ -28,8 +28,14 @@
dir_top = .
SUBDIRS = Doc Etc Src
-@@version.mk@@
-@@defs.mk@@
+@VERSION_MK@
+
+# source/build directories
+VPATH = @srcdir@
+sdir = @srcdir@
+sdir_top = @top_srcdir@
+
+@DEFS_MK@
# ========== DEPENDENCIES FOR BUILDING ==========
@@ -81,7 +87,7 @@
# ========== DEPENDENCIES FOR CLEANUP ==========
-@@clean.mk@@
+@CLEAN_MK@
distclean-here:
rm -f Makefile config.h config.status config.log config.cache stamp-h
@@ -91,7 +97,7 @@
# ========== DEPENDENCIES FOR MAINTENANCE ==========
-@@config.mk@@
+@CONFIG_MK@
config: config.h
--- Src/Makefile.in.asf Sat May 22 13:29:25 1999
+++ Src/Makefile.in Sat May 22 14:38:21 1999
@@ -28,8 +28,14 @@
dir_top = ..
SUBDIRS =
-@@version.mk@@
-@@defs.mk@@
+@VERSION_MK@
+
+# source/build directories
+VPATH = @srcdir@
+sdir = @srcdir@
+sdir_top = @top_srcdir@
+
+@DEFS_MK@
sdir_src = $(sdir)
dir_src = .
@@ -85,7 +91,7 @@
rm-modobjs-tmp:
rm -f stamp-modobjs.tmp
-@@config.mk@@
+@CONFIG_MK@
Makemod modules.index prep: modules-bltin $(CONFIG_INCS)
( cd $(sdir_top) && $(SHELL) $(subdir)/mkmodindex.sh $(subdir) ) \
@@ -201,7 +207,7 @@
mostlyclean-modules clean-modules distclean-modules realclean-modules: Makemod
@$(MAKE) -f Makemod $(MAKEDEFS) `echo $@ | sed 's/-modules//'`
-@@clean.mk@@
+@CLEAN_MK@
# ========== RECURSIVE MAKES ==========
--- Src/Makemod.in.in.asf Sat May 22 13:29:25 1999
+++ Src/Makemod.in.in Sat May 22 14:38:32 1999
@@ -30,8 +30,14 @@
# dir_top is done by mkmakemod.sh
# SUBDIRS is done by mkmakemod.sh
-@@version.mk@@
-@@defs.mk@@
+@VERSION_MK@
+
+# source/build directories
+VPATH = @srcdir@
+sdir = @srcdir@
+sdir_top = @top_srcdir@
+
+@DEFS_MK@
sdir_src = $(sdir_top)/Src
dir_src = $(dir_top)/Src
@@ -134,7 +140,7 @@
# ========== DEPENDENCIES FOR CLEANUP ==========
-@@clean.mk@@
+@CLEAN_MK@
mostlyclean-here:
rm -f *.o *.$(DL_EXT)
--- configure.in.asf Sat May 22 13:12:49 1999
+++ configure.in Sat May 22 14:11:50 1999
@@ -1279,30 +1279,28 @@
AC_SUBST(L)dnl
AC_SUBST(RTLD_GLOBAL_OK)dnl
+CLEAN_MK="${srcdir}/Config/clean.mk"
+CONFIG_MK="${srcdir}/Config/config.mk"
+DEFS_MK="${srcdir}/Config/defs.mk"
+VERSION_MK="${srcdir}/Config/version.mk"
+
+AC_SUBST_FILE(CLEAN_MK)dnl
+AC_SUBST_FILE(CONFIG_MK)dnl
+AC_SUBST_FILE(DEFS_MK)dnl
+AC_SUBST_FILE(VERSION_MK)dnl
+
real_no_create=$no_create
no_create=yes
-AC_OUTPUT(Makefile Doc/Makefile Etc/Makefile Src/Makefile, \
+
+AC_OUTPUT(Config/defs.mk Makefile Doc/Makefile Etc/Makefile Src/Makefile, \
[test -z "$CONFIG_HEADERS" || echo > stamp-h])
dnl The standard config.status is missing some essential features.
dnl So add them now.
-[(
- echo '1,$s@^#( *ac_file_inputs=#).*$@#1`echo $ac_file_in | sed -e "s%^%:%" -e "s%:##([^!]##)% $ac_given_srcdir/##1%g" -e "s%:!% %"`@'
- echo '/ac_sed_cmds=cat/+a'
- echo ''
- echo 'ac_sed_inc_cmds="'
- quote_sed='s,\.,#.,g'
- for name in `echo '' ${srcdir}/Config/*.mk | sed "s, ${srcdir}/Config/, ,g"`; do
- echo '/^@@'`echo $name | sed -e "$quote_sed"`'@@#$/{r $ac_given_srcdir/Config/'$name
- echo 'd;}'
- done
- echo '"'
- echo '.'
- echo '1,$s@^#( *#)#(sed -e "#$ac_comsub *#)$@#1sed -e "$ac_sed_inc_cmds" $ac_file_inputs | #2@'
- echo '1,$s@^#( *"#) *$ac_file_inputs |@#1 |@'
- echo 'w'
- echo 'q'
-) | tr '#' '\\' | ed $CONFIG_STATUS >/dev/null 2>/dev/null]
+[cp -f $CONFIG_STATUS $CONFIG_STATUS.old
+sed '1,$s@^\( *ac_file_inputs=\).*$@\1`echo $ac_file_in | sed -e "s%^%:%" -e "s%:\\([^!]\\)% $ac_given_srcdir/\\1%g" -e "s%:!% %"`@' \
+ $CONFIG_STATUS.old >$CONFIG_STATUS
+ rm -f $CONFIG_STATUS.old]
test "$real_no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author