Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: Makefile target given more than once (Re: 3.1.6-dev-17)



> } > Hrm.  This would appear to be gmake cleverly discovering that
> when $(sdir)
> } > is ".", zsh.texi and $(sdir)/zsh.texi are the same target.
> }
> } So far it is just noise. But why we need two targets? One is obviously
> } redundant.
>
> No, that's not true.
>
> The $(sdir)/zsh.texi target is used in dependencies elsewhere in the
> Makefile.
>
> The zsh.texi target is for (cd Doc; make zsh.texi) which is executed by
> the top-level Makefile and also may be typed by a user.
>

Here I'm confused. Top-level Makefile never does (cd Doc; make zsh.texi); it
does all, install, clean ... but never subdir-specific targets.

So, we need zsh.texi in source dir to include it with distribution (for
users without yodl). Right?

I suggest to use placeholder like texi, dvi, html etc as main targets and
make them depend on actual files. Like

all: man texi

man: $(MAN)

texi: $(sdir)/zsh.texi

That is what e.g. bash does.

/andrej



Messages sorted by: Reverse Date, Date, Thread, Author