From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27851 invoked from network); 6 Dec 1999 16:33:23 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Dec 1999 16:33:23 -0000 Received: (qmail 20193 invoked by alias); 6 Dec 1999 16:33:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8917 Received: (qmail 20185 invoked from network); 6 Dec 1999 16:33:16 -0000 From: "Bart Schaefer" Message-Id: <991206163241.ZM24748@candle.brasslantern.com> Date: Mon, 6 Dec 1999 16:32:41 +0000 In-Reply-To: Comments: In reply to Zefram "Re: PATCH: Program transform name, again" (Dec 6, 10:14am) References: X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Program transform name, again MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 6, 10:14am, Zefram wrote: } Subject: Re: PATCH: Program transform name, again } } No, no, this is all wrong. You should be doing } } tzsh=`echo zsh | sed '@program_transform_name@'` } } and then in each installed filename replace the substring "zsh" with } "$(tzsh)". Oh, of course. How silly of me. This should be installed INSTEAD OF Clint's 8915, which arrived just as I pasted the patch below into my editor buffer. They're almost identical, but I've covered quoting of commas in the transformed name and avoided using slashes as sed separators in case the name prefix has one. Also, this fixes the @setfilename line inside zsh.texi, which Clint missed. Index: Doc/Makefile.in =================================================================== @@ -80,7 +80,8 @@ zsh.texi: $(sdir)/zsh.texi.in @test -f $< -a -s $< - sed '/@setfilename/{; s/@setfilename //; $(transform) ; s/^/@setfilename /;}' < $< > zsh.texi + tzsh=`echo zsh | sed '$(transform); s/,/\\\\,/g'`; \ + sed "/@setfilename/{; s/@setfilename //; s,zsh,$$tzsh, ; s/^/@setfilename /;}" < $< > zsh.texi .yo.1: @case $@ in \ @@ -169,23 +170,24 @@ # 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 \ - tzsh=`echo $$file | sed '$(transform)'`; \ + tfile=`echo $$file | sed "s,zsh,$$tzsh,"`; \ if test -f $$file; then \ - cp -f $$file $$tzsh; \ + cp -f $$file $$tfile; \ elif test -f $(sdir)/$$file; then \ - cp -f $(sdir)/$$file $$tzsh; \ + cp -f $(sdir)/$$file $$tfile; \ else :; \ fi || exit 1; \ - $(INSTALL_DATA) $$tzsh $(DESTDIR)$(mandir)/man1 || exit 1; \ + $(INSTALL_DATA) $$tfile $(DESTDIR)$(mandir)/man1 || 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.info | sed '$(transform)'`; \ - for file in $$tzsh $$tzsh-[1-9]*; do \ + 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 \ @@ -204,8 +206,9 @@ # uninstall man pages uninstall.man: for file in $(MAN); do \ - tzsh=`echo zsh | sed '$(transform)'`; \ - rm -f $(DESTDIR)$(mandir)/man1/$$tzsh; \ + tzsh=`echo zsh | sed '$(transform); s/,/\\\\,/g'`; \ + tfile=`echo $$file | sed "s,zsh,$$tzsh,"`; \ + rm -f $(DESTDIR)$(mandir)/man1/$$tfile; \ done # uninstall info pages -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com