help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dependency problem


From: John Graham-Cumming
Subject: Re: dependency problem
Date: Thu, 28 Jun 2007 15:37:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stephan Beal wrote:
> -----------
> The -MP option instructs gcc to include phony targets for each 
> prerequisite. This completely eliminates the messy five-part sed 
> expression in our make-depend function. It seems that the automake 
> developers who invented the phony target technique caused this option 
> to be added to gcc.
> -----------
> 
> that topic is discussed starting on in section 10.3.1, page 110.

In the printed book it's page 153.

It's worth noting that the language above is very sloppy.  The -MP
option does not output a 'phony' target (which has a special meaning in
GNU Make), but simply outputs a rule with no commands for the target.

For example, if foo.c include foo.h then gcc -MM -MP foo.c
                                                    emits:

    foo.o: foo.c foo.h

    foo.h:

John.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGg7mVLphrp73n/hARAp7NAKCSJHG8JdVO+DNCfHZscfPrLz8jnACfZ8br
wyp//uS02daxoq1sTnoyJas=
=FOuY
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]