zsh-workers
 help / color / mirror / code / Atom feed
From: Adam Spiers <adam@spiers.net>
To: zsh workers mailing list <zsh-workers@sunsite.auc.dk>
Subject: PATCH: Re: duplicate targets in Makefile rule
Date: Thu, 10 Feb 2000 15:36:49 +0000	[thread overview]
Message-ID: <20000210153649.A14796@thelonious.new.ox.ac.uk> (raw)
In-Reply-To: <E12Iucf-0000Ms-00@crucigera.fysh.org>

Zefram (zefram@fysh.org) wrote:
> Adam Spiers wrote:
> >+ifeq ($(sdir),.)
> 
> This only works for certain makes.  pmake, for example, doesn't have this
> conditional syntax.

Ah, right.

> I repeat the suggestion that we use a non-filename
> (e.g. "texi") instead of "zsh.texi" for the pseudo-target.

OK, here's an attempt at that.  I haven't tested it with srcdir != `.'
yet though.  If someone else could check it through I'd appreciate it.

While looking through this file, other issues occurred to me:

- The rule for zshall.1 contains a case switch on $@.  Surely $@ will
  always be zshall.1?

- If I understand it correctly, the man pages get built inside the
  source tree rather than in $(sdir), but install.man tries to install
  them from $(sdir).  Also, install.html appears to assume that the
  HTML file(s) get built inside the source tree.  What's the correct
  policy?  Are all these docs platform-independent, and even if they
  are, should they get built inside the source tree?  Has anyone
  actually attempted a build outside the source tree recently?

- When the relevant converters are run on a source file in another
  directory, e.g. texi2info foo/bar.texi, where does the output get
  sent?  That's another reason for needing to test with sdir != `.',
  but I'm going to have to leave that to someone else due to time
  restrictions.

Index: Doc/Makefile.in
===================================================================
RCS file: /projects/zsh/zsh/Doc/Makefile.in,v
retrieving revision 1.1.1.60
diff -u -r1.1.1.60 Makefile.in
--- Doc/Makefile.in	2000/02/07 01:59:21	1.1.1.60
+++ Doc/Makefile.in	2000/02/10 15:13:44
@@ -51,7 +51,7 @@
 
 # yodl documentation
 
-YODLDOC = $(MAN) zsh.texi
+YODLDOC = $(MAN) texi
 
 MODDOCSRC = \
 Zsh/mod_cap.yo Zsh/mod_clone.yo \
@@ -73,26 +73,31 @@
 
 # ========== DEPENDENCIES FOR BUILDING ==========
 
-all: $(MAN) zsh.texi ../META-FAQ
+all: man texi ../META-FAQ
 .PHONY: all
 
-everything: all zsh.dvi zsh_us.ps zsh_a4.ps zsh_toc.html
+everything: all dvi ps html
 .PHONY: everything
 
-zsh.dvi: $(sdir)/zsh.texi
-	$(TEXI2DVI) $(sdir)/zsh.texi
+dvi: $(sdir)/zsh.dvi
+.PHONY: dvi
 
-zsh.texi $(sdir)/zsh.texi:
-	case $@ in \
-	  */*) target=$@ ;; \
-	  *) target=$(sdir)/$@ ;; \
-	esac; \
-	$(YODL) -o $$target -I$(sdir) -w ztexi.yo version.yo zsh.yo; \
-	test -f $$target
+$(sdir)/zsh.dvi: $(sdir)/zsh.texi
+	$(TEXI2DVI) $<
+
+texi: $(sdir)/zsh.texi
+.PHONY: texi
+
+$(sdir)/zsh.texi:
+	$(YODL) -o $@ -I$(sdir) -w ztexi.yo version.yo zsh.yo; \
+	test -f $@
 
-zsh.info: $(sdir)/zsh.texi
-	$(MAKEINFO) $(sdir)/zsh.texi
+info: $(sdir)/zsh.info
+.PHONY: info
 
+$(sdir)/zsh.info: $(sdir)/zsh.texi
+	$(MAKEINFO) $<
+
 .yo.1:
 	case $@ in \
 	  */*) target=$@ ;; \
@@ -102,16 +107,28 @@
 	    $(YODL) -I$(sdir) -w zman.yo version.yo $< | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target \
 	;; esac; \
 	test -f $$target
+
+ps: us_ps a4_ps
+.PHONY: ps
+
+us_ps: $(sdir)/zsh_us.ps
+.PHONY: us_ps
 
-zsh_us.ps: zsh.dvi
-	$(DVIPS) -t letter -o $@ zsh.dvi
+$(sdir)/zsh_us.ps: $(sdir)/zsh.dvi
+	$(DVIPS) -t letter -o $@ $<
 
-zsh_a4.ps: zsh.dvi
-	$(DVIPS) -t a4 -o $@ zsh.dvi
+a4_ps: $(sdir)/zsh_a4.ps
+.PHONY: a4_ps
 
-zsh_toc.html: $(sdir)/zsh.texi
-	$(TEXI2HTML) $(sdir)/zsh.texi
+$(sdir)/zsh_a4.ps: $(sdir)/zsh.dvi
+	$(DVIPS) -t a4 -o $@ $<
 
+html: $(sdir)/zsh_toc.html
+.PHONY: html
+
+$(sdir)/zsh_toc.html: $(sdir)/zsh.texi
+	$(TEXI2HTML) $<
+
 zshall.1: zsh.yo
 	case $@ in \
 	  */*) target=$@ ;; \
@@ -129,8 +146,11 @@
 	test -f $(sdir_top)/META-FAQ
 
 $(YODLDOC): version.yo
+
+$(sdir)/zsh.texi: $(YODLSRC)
 
-zsh.texi: $(YODLSRC)
+man: $(MAN)
+.PHONY: man
 
 $(MAN): zmacros.yo zman.yo
 
@@ -225,7 +245,7 @@
 .PHONY: uninstall
 
 # install man pages, creating install directory if necessary
-install.man: $(MAN)
+install.man: man
 	$(sdir_top)/mkinstalldirs $(DESTDIR)$(mandir)/man1
 	for file in $(MAN); do \
 	    $(INSTALL_DATA) $(sdir)/$$file $(DESTDIR)$(mandir)/man1/`echo $$file | sed 's|zsh|$(tzsh)|'` || exit 1; \
@@ -233,7 +253,7 @@
 .PHONY: install.man
 
 # install info pages, creating install directory if necessary
-install.info: zsh.texi
+install.info: texi
 	$(sdir_top)/mkinstalldirs $(DESTDIR)$(infodir)
 	rm -rf infodir
 	mkdir infodir
@@ -267,7 +287,7 @@
 .PHONY: uninstall.info
 
 # install HTML manual
-install.html: zsh_toc.html
+install.html: html
 	$(sdir_top)/mkinstalldirs $(DESTDIR)$(htmldir)
 	for file in zsh_*.html; do \
 	    $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir) || exit 1; \


  reply	other threads:[~2000-02-10 15:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-09 23:58 Adam Spiers
2000-02-10  9:57 ` Zefram
2000-02-10 13:37   ` Adam Spiers
2000-02-10 13:54     ` Andrej Borsenkow
2000-02-10 14:23       ` Adam Spiers
2000-02-10 14:31         ` Zefram
2000-02-10 15:36           ` Adam Spiers [this message]
2000-02-10 15:43             ` PATCH: " Zefram
2000-02-10 17:03               ` Adam Spiers
2000-02-10 17:11                 ` Zefram
2000-02-21  2:12                   ` Adam Spiers
2000-02-21 10:07                     ` Zefram
2000-02-21 10:39                       ` Adam Spiers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000210153649.A14796@thelonious.new.ox.ac.uk \
    --to=adam@spiers.net \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).