help-make
[Top][All Lists]
Advanced

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

Re: Actions that may or may not update their targets


From: John Graham-Cumming
Subject: Re: Actions that may or may not update their targets
Date: Mon, 19 Feb 2007 15:49:25 +0100
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

Sam Yates wrote:
> Can anyone offer suggestions as to how to make make 3.81
> perform this feat?

What about doing something evil like:

    foo.sentinel:
        touch $@

    FOO_MAKER = $(shell touch foo.sentinel)

    foo:

    bar: _DUMMY := $(FOO_MAKER)
    bar: foo foo.sentinel
        @echo Making $@

Basically I've stuck the foo-maker target inside a target specific
variable for bar which means that it'll get run before bar's targets.

John.
- --
John Graham-Cumming
address@hidden

Home: http://www.jgc.org/
Blog: http://www.jgc.org/blog/

POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/
GNU Make Debugger: http://gmd.sf.net/
Fast, Parallel Builds: http://www.electric-cloud.com/

Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/

Help out in the fight against spam
http://www.spamorham.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF2bj1Lphrp73n/hARAkkQAKCPq1uP6xIph0hPEpx0Zas2NjoPWQCeNjqK
Ldy82NW2Nh51GHiWS8VKSIo=
=rIbY
-----END PGP SIGNATURE-----




reply via email to

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