[PATCH libICE docs] Add top-level target for documentation.

Gaetan Nadon memsize at videotron.ca
Tue Nov 23 07:07:50 PST 2010


On Mon, 2010-11-22 at 22:30 -0500, Trevor Woerner wrote:

> On Mon, Nov 22, 2010 at 7:21 PM, Gaetan Nadon <memsize at videotron.ca> wrote:
> > On Mon, 2010-11-22 at 17:26 -0500, Trevor Woerner wrote:
> > -.PHONY: ChangeLog INSTALL
> > +.PHONY: ChangeLog INSTALL documents
> >
> > I don't think it should be a PHONY target, "documents" is not a file.
> > It's like the lint target.
> 
> I thought this is exactly the sort of scenario where a PHONY target is
> used. From "info make":
> 
> "A phony target is one that is not really the name of a file. It is
> just a name for some commands to be executed when you make an explicit
> request."
> 
> In other words, when you're done performing "make documents" you don't
> actually end up with a file called "documents" the way you would if
> you did, say, a "make hello" in a "hello world" project. "make
> documents" is just a way to invoke this set of commands from within
> the Makefile.


Because we do not expect a file named "documents" to be created, the
target name
does not "have to" be a PHONY target, but it does not hurt if it is. In
contrast, ChangeLog
must be a PHONY target or it never rebuilds as it is considered up to
date.

As Julien suggested, it should be named install-docs perhaps. Try it out
with/without PHONY
for both ChangeLog and documents.

There is nothing wrong in the make info, but they are concerned about
not rebuilding a target
for every "make target" invocation. In our case, this is what we want as
we just want to invoke
the real doc target which takes care of the dependencies.

In the case of ChangeLog, we do want to rebuild the target (even if it
is a file) as it is generated
from git and we cannot know if it is up to date or not.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101123/8ccb7187/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101123/8ccb7187/attachment.pgp>


More information about the xorg-devel mailing list