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 <psm...@gnu.org> 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 _______________________________________________ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make