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

PATCH: better configure-time handling of program-transform



This reduces the basename calculation to only once, which should make
everyone happier.

Index: Makefile.in
===================================================================
RCS file: /cvs/zsh/zsh/Makefile.in,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 Makefile.in
--- Makefile.in	1999/11/30 21:10:36	1.1.1.7
+++ Makefile.in	1999/12/02 22:09:53
@@ -39,14 +39,14 @@
 @DEFS_MK@
 
 transform = @program_transform_name@
-tzsh = `echo zsh | sed "$(transform)"`
+tzsh = @tzsh@
 
 # ========== DEPENDENCIES FOR BUILDING ==========
 
 # default target
 all: config.h
 	@for subdir in Src Doc; do \
-	  (cd $$subdir && $(MAKE) $(MAKEDEFS) tzsh=$(tzsh) $@) || exit 1; \
+	  (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
 	done
 
 check test:
@@ -71,7 +71,7 @@
 
 # install/uninstall just the binary
 install.bin uninstall.bin:
-	@cd Src && $(MAKE) $(MAKEDEFS) tzsh=$(tzsh) $@
+	@cd Src && $(MAKE) $(MAKEDEFS) $@
 
 # install/uninstall just the modules
 install.modules uninstall.modules:
@@ -88,7 +88,7 @@
 
 # install/uninstall just the info pages
 install.info uninstall.info:
-	@cd Doc && $(MAKE) $(MAKEDEFS) tzsh=$(tzsh) $@
+	@cd Doc && $(MAKE) $(MAKEDEFS) $@
 
 # install/uninstall just the html pages
 install.html uninstall.html:
Index: configure.in
===================================================================
RCS file: /cvs/zsh/zsh/configure.in,v
retrieving revision 1.1.1.44
diff -u -r1.1.1.44 configure.in
--- configure.in	1999/11/30 18:16:49	1.1.1.44
+++ configure.in	1999/12/02 22:09:53
@@ -48,6 +48,15 @@
 dnl Handle --program-prefix, --program-suffix, etc.
 AC_ARG_PROGRAM
 
+u_ptn=`make -f - <<EOF
+all:
+	@echo ${program_transform_name}
+EOF
+`
+tzsh=`echo zsh | sed -e "${u_ptn}"`
+
+AC_SUBST(tzsh)dnl
+
 dnl Do you want to debug zsh?
 undefine([zsh-debug])dnl
 AC_ARG_ENABLE(zsh-debug,
@@ -1601,5 +1610,6 @@
 if test "$zshfndir" != no; then
 echo "functions install path    : ${zshfndir}
 installed functions       : ${FUNCTIONS_INSTALL}
+binary/info base name     : ${tzsh}
 "
 fi
Index: Doc/Makefile.in
===================================================================
RCS file: /cvs/zsh/zsh/Doc/Makefile.in,v
retrieving revision 1.1.1.29
diff -u -r1.1.1.29 Makefile.in
--- Doc/Makefile.in	1999/12/02 19:19:54	1.1.1.29
+++ Doc/Makefile.in	1999/12/02 22:09:54
@@ -35,7 +35,7 @@
 sdir_top        = @top_srcdir@
 INSTALL         = @INSTALL@
 
-tzsh = zsh
+tzsh = @tzsh@
 
 @DEFS_MK@
 
Index: Src/Makefile.in
===================================================================
RCS file: /cvs/zsh/zsh/Src/Makefile.in,v
retrieving revision 1.1.1.17
diff -u -r1.1.1.17 Makefile.in
--- Src/Makefile.in	1999/12/01 18:36:01	1.1.1.17
+++ Src/Makefile.in	1999/12/02 22:09:54
@@ -42,7 +42,7 @@
 sdir_src      = $(sdir)
 dir_src       = .
 
-tzsh = zsh
+tzsh = @tzsh@
 
 # ========= DEPENDENCIES FOR BUILDING ==========



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