From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27680 invoked by alias); 24 Nov 2013 05:06:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32045 Received: (qmail 28509 invoked from network); 24 Nov 2013 05:06:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <131123210612.ZM31978@torch.brasslantern.com> Date: Sat, 23 Nov 2013 21:06:12 -0800 In-reply-to: Comments: In reply to Martin Vaeth "Re: Helpfiles again (was Re: modify functions hierarchy (was: etc.))" (Nov 23, 9:25pm) References: <131111084228.ZM26372@torch.brasslantern.com> <20131112101139.31d67b73@pwslap01u.europe.root.pri> <20131112174805.26ecab48@pwslap01u.europe.root.pri> <20131112210424.177c035b@pws-pc.ntlworld.com> <20131113092831.2ed6ab94@pwslap01u.europe.root.pri> <20131113112112.1b080b79@pwslap01u.europe.root.pri> <131113080606.ZM11640@torch.brasslantern.com> <131117103047.ZM30518@torch.brasslantern.com> <131117130118.ZM1041@torch.brasslantern.com> <20131120192608.3af3b92c@pws-pc.ntlworld.com> <131120220100.ZM12300@torch.brasslantern.com> <20131123174827.249f9678@pws-pc.ntlworld.com> <131123114714.ZM18477@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Helpfiles again (was Re: modify functions hierarchy (was: etc.)) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Nov 23, 9:25pm, Martin Vaeth wrote: } Subject: Re: Helpfiles again (was Re: modify functions hierarchy (was: etc } } Bart Schaefer wrote: } > } > Why do we care at this point whether $(runhelpdir) is defined? } } Because if the user does not want to install the helpfiles, he can say } } ./configure --disable-runhelpdir That's not the way this ought to be done. The absence of tools like "ansi2knr" and "yodl" is not handled by obscuring the dependencies, it's handled by checking for their availability in configure and substituting no-op replacements (which is the reason for the existence of e.g. the doc tarball), so the "make" targets still have the correct dependency chain. How about the following as a compromise. When --disable-runhelpdir, assure that $(runhelp) is also empty string, otherwise $(runhelp) is "runhelp". Then use $(runhelp) in dependency lists, so e.g. "make all" has no indirect dependency on running perl etc., but the dependencies for the "runhelp" target can be accurate. (Could have done this by substitution of @runhelp@ in Doc/Makefile.in but it seems more consistent to put it in Config/defs.mk.in and use $(runhelp) instead.) This isn't quite as good as what's done with yodl because it means the doc tarball has to assure help.txt is newer than zshbuiltins.1. On the other hand, it can be prevented from griping the way the "texi" target does when neither the [contents of the] doc tarball nor yodl itself is available. diff --git a/Config/defs.mk.in b/Config/defs.mk.in index 5c19cc4..2c813a3 100644 --- a/Config/defs.mk.in +++ b/Config/defs.mk.in @@ -52,6 +52,7 @@ scriptdir = @scriptdir@ sitescriptdir = @sitescriptdir@ htmldir = @htmldir@ runhelpdir = @runhelpdir@ +runhelp = @runhelp@ # compilation CC = @CC@ diff --git a/Doc/Makefile.in b/Doc/Makefile.in index eae3301..50e210f 100644 --- a/Doc/Makefile.in +++ b/Doc/Makefile.in @@ -83,7 +83,7 @@ Zsh/seealso.yo Zsh/tcpsys.yo Zsh/zftpsys.yo Zsh/zle.yo # ========== DEPENDENCIES FOR BUILDING ========== -all: man runhelp texi ../META-FAQ +all: man $(runhelp) texi ../META-FAQ .PHONY: all everything: all dvi html pdf info @@ -184,13 +184,14 @@ $(sdir)/zsh.texi: $(YODLSRC) man: $(MAN) .PHONY: man -runhelp: man - test x"$(runhelpdir)" = x"" || { \ - test -r $(sdir)/help.txt && test -r $(sdir)/help/ztcp; \ - } || perl $(sdir_top)/Util/helpfiles \ +runhelp: help.txt +.PHONY: runhelp + +help.txt: zshbuiltins.1 + @-rm -f $(sdir)/help.txt $(sdir)/help/* + perl $(sdir_top)/Util/helpfiles \ $(sdir)/zshbuiltins.1 $(sdir)/help $(sdir)/help.txt \ || { rm -f $(sdir)/help.txt $(sdir)/help/*; false; } -.PHONY: runhelp $(MAN): zmacros.yo zman.yo @@ -312,7 +313,7 @@ install.man: man .PHONY: install.man # install runhelp pages, creating install directory if necessary -install.runhelp: runhelp +install.runhelp: $(runhelp) if test x"$(runhelpdir)" != x""; then \ ${SHELL} $(sdir_top)/mkinstalldirs $(DESTDIR)$(runhelpdir); \ $(INSTALL_DATA) $(sdir)/help/* $(DESTDIR)$(runhelpdir); \ diff --git a/configure.ac b/configure.ac index 607c612..5ca364b 100644 --- a/configure.ac +++ b/configure.ac @@ -268,6 +268,9 @@ else fi], [runhelpdir=yes]) if test x"$runhelpdir" = xyes; then runhelpdir=${datadir}/${tzsh_name}/'${VERSION}'/help + runhelp=runhelp +else + runhelp= fi ifdef([fndir],[undefine([fndir])])dnl @@ -310,6 +313,7 @@ else fi], [additionalfpath=""]) AC_SUBST(runhelpdir)dnl +AC_SUBST(runhelp)dnl AC_SUBST(additionalfpath)dnl AC_SUBST(fndir)dnl AC_SUBST(sitefndir)dnl