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)



On Feb 7, 10:34am, Andrej Borsenkow wrote:
} Subject: RE: Makefile target given more than once (Re: 3.1.6-dev-17)
}
} > } gmake[1]: Entering directory `/tools/src/zsh-3.1.6-dev-17/Doc'
} > } Makefile:217: target `zsh.texi' given more than once in the same rule.
} >
} > 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.

When $(sdir) is not "." (e.g., when building in a platform-specific
parallel tree) one or the other of those targets will fail if they are
not both present.  "make zsh.texi" doesn't actually create ./zsh.texi
when $(sdir) is not ".", but if you don't know what $(sdir) is it's
bothersome to figure out what you should type to get zsh.texi created.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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