From 31ace3492324d1bcae673f60b80b0314cbe8d63c Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 8 Dec 1999 16:22:24 +0000 Subject: zsh-workers/8950 --- Config/defs.mk.in | 7 +++-- Doc/.cvsignore | 3 +- Doc/.distfiles | 2 +- Doc/Makefile.in | 84 ++++++++++++++++++++++++++++--------------------------- Makefile.in | 4 --- Src/Makefile.in | 30 +++++++++----------- configure.in | 1 + 7 files changed, 65 insertions(+), 66 deletions(-) diff --git a/Config/defs.mk.in b/Config/defs.mk.in index f159cf9dc..8ec2a3056 100644 --- a/Config/defs.mk.in +++ b/Config/defs.mk.in @@ -28,12 +28,15 @@ SHELL = /bin/sh @SET_MAKE@ +# install basename +tzsh = @tzsh@ + # installation directories prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ -MODDIR = $(libdir)/@tzsh@/$(VERSION) +MODDIR = $(libdir)/$(tzsh)/$(VERSION) infodir = @infodir@ mandir = @mandir@ fndir = @fndir@ @@ -80,7 +83,7 @@ DLCFLAGS='$(DLCFLAGS)' DLLDFLAGS='$(DLLDFLAGS)' \ LIBLDFLAGS='$(LIBLDFLAGS)' EXELDFLAGS='$(EXELDFLAGS)' \ LIBS='$(LIBS)' DL_EXT='$(DL_EXT)' DLLD='$(DLLD)' \ AWK='$(AWK)' YODL='$(YODL)' YODL2TXT='$(YODL2TXT)' YODL2HTML='$(YODL2HTML)' \ -FUNCTIONS_INSTALL='$(FUNCTIONS_INSTALL)' +FUNCTIONS_INSTALL='$(FUNCTIONS_INSTALL)' tzsh='$(tzsh)' # override built-in suffix list .SUFFIXES: diff --git a/Doc/.cvsignore b/Doc/.cvsignore index 386da0724..8ff3c2a87 100644 --- a/Doc/.cvsignore +++ b/Doc/.cvsignore @@ -1,7 +1,7 @@ Makefile version.yo zsh*.1 -zsh.texi* +zsh.texi zsh.info* zsh_*.html zsh.aux zsh.toc @@ -13,3 +13,4 @@ zsh.vr zsh.vrs zsh.log zsh.dvi zsh.tp zsh.tps zsh_*.ps +infodir diff --git a/Doc/.distfiles b/Doc/.distfiles index 5dd643049..85ecba62c 100644 --- a/Doc/.distfiles +++ b/Doc/.distfiles @@ -5,7 +5,7 @@ DISTFILES_SRC=' zsh.yo zshbuiltins.yo zshcompctl.yo zshcompsys.yo zshcompwid.yo zshexpn.yo zshmisc.yo zshmodules.yo zshoptions.yo zshparam.yo zshzftpsys.yo zshzle.yo - zsh.texi.in + zsh.texi zsh.1 zshbuiltins.1 zshcompctl.1 zshcompsys.1 zshcompwid.1 zshexpn.1 zshmisc.1 zshmodules.1 zshoptions.1 zshparam.1 zshzle.1 zshall.1 zshzftpsys.1 diff --git a/Doc/Makefile.in b/Doc/Makefile.in index 51500d53b..2ebc052ee 100644 --- a/Doc/Makefile.in +++ b/Doc/Makefile.in @@ -50,7 +50,7 @@ zshexpn.1 zshmisc.1 zshmodules.1 \ zshoptions.1 zshparam.1 zshzftpsys.1 zshzle.1 zshall.1 # yodl documentation -YODLDOC = $(MAN) zsh.texi.in +YODLDOC = $(MAN) zsh.texi YODLSRC = zmacros.yo zman.yo ztexi.yo Zsh/arith.yo Zsh/builtins.yo \ Zsh/compat.yo Zsh/compctl.yo Zsh/compsys.yo Zsh/compwid.yo Zsh/cond.yo \ Zsh/exec.yo Zsh/expn.yo \ @@ -66,29 +66,32 @@ Zsh/seealso.yo Zsh/zftpsys.yo Zsh/zle.yo # ========== DEPENDENCIES FOR BUILDING ========== -transform = @program_transform_name@ - all: $(MAN) zsh.texi ../META-FAQ everything: all zsh.dvi zsh_us.ps zsh_a4.ps zsh_toc.html zsh.dvi: zsh.texi - $(TEXI2DVI) zsh.texi + $(TEXI2DVI) $(sdir)/zsh.texi -$(sdir)/zsh.texi.in: $(sdir)/zsh.yo - $(YODL) -o $(sdir)/zsh.texi.in -I$(sdir) -w ztexi.yo version.yo zsh.yo +zsh.texi: + case $@ in \ + */*) target=$@ ;; \ + *) target=$(sdir)/$@ ;; \ + esac; \ + $(YODL) -o $$target -I$(sdir) -w ztexi.yo version.yo zsh.yo; \ + test -f $$target -zsh.texi: $(sdir)/zsh.texi.in - @test -f $< -a -s $< - tzsh=`echo zsh | sed '$(transform); s/,/\\\\,/g'`; \ - sed "/@setfilename/{s/@setfilename //; s,zsh,$$tzsh, ; s/^/@setfilename /;}" < $< > zsh.texi +zsh.info: zsh.texi + $(MAKEINFO) $(sdir)/zsh.texi .yo.1: case $@ in \ */*) target=$@ ;; \ *) target=$(sdir)/$@ ;; \ esac; \ - $(YODL) -I$(sdir) -w zman.yo version.yo $< | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target || exit 1; \ + case '$(YODL)' in :*) ;; *) \ + $(YODL) -I$(sdir) -w zman.yo version.yo $< | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target \ + ;; esac; \ test -f $$target zsh_us.ps: zsh.dvi @@ -105,11 +108,15 @@ zshall.1: zsh.yo */*) target=$@ ;; \ *) target=$(sdir)/$@ ;; \ esac; \ - $(YODL) -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target || exit 1; \ + case '$(YODL)' in :*) ;; *) \ + $(YODL) -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target \ + ;; esac; \ test -f $$target ../META-FAQ: META-FAQ.yo Zsh/metafaq.yo - $(YODL) -I$(sdir) META-FAQ.yo | sed -e '/NEXTLINE/N' -e '/DELLINE/d' -e '/^SECTHEAD$$/{N;s/^SECTHEAD.//;h;s/./-/g;H;g;}' -e 's/ *$$//' > $(sdir_top)/META-FAQ + case '$(YODL)' in :*) ;; *) \ + $(YODL) -I$(sdir) META-FAQ.yo | sed -e '/NEXTLINE/N' -e '/DELLINE/d' -e '/^SECTHEAD$$/{N;s/^SECTHEAD.//;h;s/./-/g;H;g;}' -e 's/ *$$//' > $(sdir_top)/META-FAQ \ + ;; esac test -f $(sdir_top)/META-FAQ $(YODLDOC): version.yo @@ -168,46 +175,40 @@ uninstall: uninstall.man # install man pages, creating install directory if necessary install.man: $(MAN) $(sdir_top)/mkinstalldirs $(DESTDIR)$(mandir)/man1 - tzsh=`echo zsh | sed '$(transform); s/,/\\\\,/g'`; \ for file in $(MAN); do \ - tfile=`echo $$file | sed "s,zsh,$$tzsh,"`; \ - sed "s/zshall/$${tzsh}all/; s/zshmisc/$${tzsh}misc/; s/zshexpn/$${tzsh}expn/; s/zshparam/$${tzsh}param/; s/zshoptions/$${tzsh}options/; s/zshbuiltins/$${tzsh}builtins/; s/zshzle/$${tzsh}zle/; s/zshcompwid/$${tzsh}compwid/; s/zshcompctl/$${tzsh}compctl/; s/zshmodules/$${tzsh}modules/; s/zshcompsys/$${tzsh}compsys/;" \ - $(sdir)/$$file >$(DESTDIR)$(mandir)/man1/$$tfile || exit 1; \ + $(INSTALL_DATA) $(sdir)/$$file $(DESTDIR)$(mandir)/man1/`echo $$file | sed 's|zsh|$(tzsh)|'` || exit 1; \ done # install info pages, creating install directory if necessary install.info: zsh.texi - $(MAKEINFO) zsh.texi $(sdir_top)/mkinstalldirs $(DESTDIR)$(infodir) - tzsh=`echo zsh | sed '$(transform)'`; \ - for file in $$tzsh.info $$tzsh.info-[1-9]*; do \ - if test -f $$file; then \ - $(INSTALL_DATA) $$file $(DESTDIR)$(infodir); \ - elif test -f $(sdir)/$$file; then \ - $(INSTALL_DATA) $(sdir)/$$file $(DESTDIR)$(infodir); \ - else :; \ - fi || exit 1; \ - done; \ - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ - install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/$$tzsh.info; \ - else true; fi - -install.html: zsh_toc.html - $(sdir_top)/mkinstalldirs $(DESTDIR)$(htmldir) - $(INSTALL_DATA) *.html $(DESTDIR)$(htmldir) + rm -rf infodir + mkdir infodir + if ( \ + sed '/^@setfilename/s|zsh|$(tzsh)|' \ + < $(sdir)/zsh.texi > infodir/tzsh.texi && \ + (cd infodir && $(MAKEINFO) tzsh.texi) && \ + for file in infodir/$(tzsh).info*; do \ + $(INSTALL_DATA) $$file $(DESTDIR)$(infodir) || exit 1; \ + done \ + ); then \ + rm -rf infodir; \ + exit 0; \ + else \ + rm -rf infodir; \ + exit 1; \ + fi # uninstall man pages uninstall.man: for file in $(MAN); do \ - tzsh=`echo zsh | sed '$(transform); s/,/\\\\,/g'`; \ - tfile=`echo $$file | sed "s,zsh,$$tzsh,"`; \ - rm -f $(DESTDIR)$(mandir)/man1/$$tfile; \ + rm -f $(DESTDIR)$(mandir)/man1/`echo $$file | sed 's|zsh|$(tzsh)|'`; \ done # uninstall info pages uninstall.info: - tzsh=`echo zsh | sed '$(transform)'`; \ - rm -f $(DESTDIR)$(infodir)/$$tzsh.info $(DESTDIR)$(infodir)/$$tzsh.info-[1-9]* + rm -f $(DESTDIR)$(infodir)/$(tzsh).info + rm -f $(DESTDIR)$(infodir)/$(tzsh).info-[1-9]* # ========== DEPENDENCIES FOR CLEANUP ========== @@ -215,12 +216,13 @@ clean-here: rm -f *.html *.info* *.dvi *.ps rm -f *.aux *.cp *.cps *.fn *.fns *.ky *.log rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs + rm -rf infodir distclean-here: clean-here - rm -f Makefile *.1 *.texi + rm -f Makefile realclean-here: distclean-here - cd $(sdir) && rm -f version.yo ../META-FAQ zsh.yo + cd $(sdir) && rm -f version.yo ../META-FAQ zsh.texi $(MAN) @CLEAN_MK@ diff --git a/Makefile.in b/Makefile.in index f11b06d97..0dbf92616 100644 --- a/Makefile.in +++ b/Makefile.in @@ -87,10 +87,6 @@ install.fns uninstall.fns: install.info uninstall.info: @cd Doc && $(MAKE) $(MAKEDEFS) $@ -# install/uninstall just the html pages -install.html uninstall.html: - @cd Doc && $(MAKE) $(MAKEDEFS) $@ - # ========== DEPENDENCIES FOR CLEANUP ========== @CLEAN_MK@ diff --git a/Src/Makefile.in b/Src/Makefile.in index f99e2c965..7ad9dc918 100644 --- a/Src/Makefile.in +++ b/Src/Makefile.in @@ -68,7 +68,7 @@ ZSH_NXPORT = ENTRYOBJ = modentry..o NNTRYOBJ = -LDRUNPATH = LD_RUN_PATH=$(libdir)/zsh +LDRUNPATH = LD_RUN_PATH=$(libdir)/$(tzsh) NDRUNPATH = zsh: $(@L@IBZSH) $(@L@STMP) $(MAIN_OBJS) zsh.export @@ -150,8 +150,6 @@ ansi2knr: ansi2knr.o # ========== DEPENDENCIES FOR INSTALLING ========== -transform = @program_transform_name@ - install: install.bin install.modules uninstall: uninstall.bin uninstall.modules @@ -161,29 +159,27 @@ uninstall.bin: uninstall.bin-here # install binary, creating install directory if necessary install.bin-here: zsh install.bin-@L@ $(sdir_top)/mkinstalldirs $(DESTDIR)$(bindir) - tzsh=`echo zsh | sed '$(transform)'`; \ - $(INSTALL_PROGRAM) $(STRIPFLAGS) zsh $(DESTDIR)$(bindir)/$$tzsh-$(VERSION) && \ - if test -f $(DESTDIR)$(bindir)/$$tzsh; then \ - rm -f $(DESTDIR)$(bindir)/$$tzsh.old; \ - $(LN) $(DESTDIR)$(bindir)/$$tzsh $(DESTDIR)$(bindir)/$$tzsh.old; \ - else :; fi && \ - rm -f $(DESTDIR)$(bindir)/$$tzsh.new && \ - $(LN) $(DESTDIR)$(bindir)/$$tzsh-$(VERSION) $(DESTDIR)$(bindir)/$$tzsh.new && \ - mv $(DESTDIR)$(bindir)/$$tzsh.new $(DESTDIR)$(bindir)/$$tzsh + $(INSTALL_PROGRAM) $(STRIPFLAGS) zsh $(DESTDIR)$(bindir)/$(tzsh)-$(VERSION) + if test -f $(DESTDIR)$(bindir)/$(tzsh); then \ + rm -f $(DESTDIR)$(bindir)/$(tzsh).old; \ + $(LN) $(DESTDIR)$(bindir)/$(tzsh) $(DESTDIR)$(bindir)/$(tzsh).old; \ + else :; fi + rm -f $(DESTDIR)$(bindir)/$(tzsh).new + $(LN) $(DESTDIR)$(bindir)/$(tzsh)-$(VERSION) $(DESTDIR)$(bindir)/$(tzsh).new + mv $(DESTDIR)$(bindir)/$(tzsh).new $(DESTDIR)$(bindir)/$(tzsh) install.bin-N: install.bin-L: $(LIBZSH) - $(sdir_top)/mkinstalldirs $(DESTDIR)$(libdir)/zsh - $(INSTALL_PROGRAM) $(LIBZSH) $(DESTDIR)$(libdir)/zsh/$(LIBZSH) + $(sdir_top)/mkinstalldirs $(DESTDIR)$(libdir)/$(tzsh) + $(INSTALL_PROGRAM) $(LIBZSH) $(DESTDIR)$(libdir)/$(tzsh)/$(LIBZSH) # uninstall binary uninstall.bin-here: uninstall.bin-@L@ - tzsh=`echo zsh | sed '$(transform)'`; \ - rm -f $(DESTDIR)$(bindir)/$$tzsh-$(VERSION) $(DESTDIR)$(bindir)/$$tzsh + rm -f $(DESTDIR)$(bindir)/$(tzsh)-$(VERSION) $(DESTDIR)$(bindir)/$(tzsh) uninstall.bin-N: uninstall.bin-L: - rm -f $(DESTDIR)$(libdir)/zsh/$(LIBZSH) + rm -f $(DESTDIR)$(libdir)/$(tzsh)/$(LIBZSH) # ========== DEPENDENCIES FOR CLEANUP ========== diff --git a/configure.in b/configure.in index 85140f155..7b0a51cd6 100644 --- a/configure.in +++ b/configure.in @@ -1595,6 +1595,7 @@ module linker flags : ${LDFLAGS} ${LIBLDFLAGS} ${DLLDFLAGS}" fi echo "\ library flags : ${LIBS} +installation basename : ${tzsh_name} binary install path : ${zshbin2} man page install path : ${zshman} info install path : ${zshinfo}" -- cgit 1.4.1