[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: bug or feature ?
From: |
Paul Smith |
Subject: |
Re: Fwd: bug or feature ? |
Date: |
Wed, 28 Oct 2009 08:21:05 -0400 |
On Wed, 2009-10-28 at 11:12 +0200, Denis Onischenko wrote:
> The following fragment from glibc's Makefile has the same problem:
>
> $(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
> $(make-target-directory)
> touch $@
>
> How the "touch $@" command can be executed only once to make all the
> targets, when the target name is not known in advance ?
There is no way to do this, currently, in GNU make except through
pattern rules. Just listing one pattern target with a bunch of
non-pattern rules won't do it.
> Is the above rule equivalent to the following rules?
>
> $(objpfx)stubs ../po/manual.pot:
> $(make-target-directory)
> touch $@
>
>
> $(objpfx)stamp%:
> $(make-target-directory)
> touch $@
Yes, exactly. If you run "make -p" you'll see that this is exactly how
make has parsed that makefile into its internal database.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist