From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25233 invoked from network); 10 Feb 2000 14:23:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Feb 2000 14:23:19 -0000 Received: (qmail 8809 invoked by alias); 10 Feb 2000 14:23:13 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9661 Received: (qmail 8801 invoked from network); 10 Feb 2000 14:23:13 -0000 Date: Thu, 10 Feb 2000 14:23:11 +0000 From: Adam Spiers To: zsh workers mailing list Subject: Re: duplicate targets in Makefile rule Message-ID: <20000210142311.A14018@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh workers mailing list References: <20000210133736.A12687@thelonious.new.ox.ac.uk> <000501bf73ce$4f1c3890$21c9ca95@mow.siemens.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <000501bf73ce$4f1c3890$21c9ca95@mow.siemens.ru> X-Home-Page: http://www.new.ox.ac.uk/~adam/ X-OS: Linux 2.2.12 i686 Andrej Borsenkow (Andrej.Borsenkow@mow.siemens.ru) wrote: > Sorry? Pls, see 9543, 9687, 9593 and more in this thread. Hmm. I did do a search on zsh-workers before I e-mailed the list about this, but the engine came up with no matches, and for some reason, I still can't get any query similar to `zsh.texi;given;once;rule' to produce the relevant articles, even with `partial match' switched on. Anyway, thanks for the pointers, and sorry for the extra noise. Just for reference, I think you meant 9587 rather than 9687. > The current problem is, zsh.texi should be in source dir (as it is supposed > to exists even if user does not have yodl) - so, it belongs to src dir. The > change you proposed make zsh.texi target name dependent on source dir > location. So, it you want to rebuild just the texi, you'll have to know > exact src location and type "make /path/to/source/dir/zsh.texi" > > For this reason I suggested having standard targets man, texi, info etc and > make them depend on actual files. Like > > texi: $(sdir)/zsh.texi > > $(sdir)/zsh.texi: ... (as currently) > > Then you can just say "make texi" or "make man". Looks better to me :-) > > So far there was no reply. Maybe that's because you followed your suggestion with `That's what bash does.' ;-) Anyway, this needs to be resolved fairly swiftly, as presumably anyone using gmake is currently unable to build the docs. I don't know enough about the Makefile structure in general to comment on your suggestion, but here's another suggestion which feel free to shoot down in flames :-) It works for when sdir is `.', but is untested otherwise. 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 14:16:11 @@ -82,7 +82,13 @@ zsh.dvi: $(sdir)/zsh.texi $(TEXI2DVI) $(sdir)/zsh.texi -zsh.texi $(sdir)/zsh.texi: +ifeq ($(sdir),.) + ZSHTEXIS=zsh.texi +else + ZSHTEXIS=zsh.texi $(sdir)/zsh.texi +endif + +$(ZSHTEXIS): case $@ in \ */*) target=$@ ;; \ *) target=$(sdir)/$@ ;; \