code generator in makefiles
walters at verbum.org
Sat Feb 19 14:42:17 PST 2005
On Sat, 2005-02-19 at 17:06 -0500, Havoc Pennington wrote:
>On Sat, 2005-02-19 at 16:13 -0500, Colin Walters wrote:
>> I had a quicky try at this, but I don't think it's really worth it in
>> the end. The problem is that you still need to use the BUILT_SOURCES
>> variable to tell Automake what files you're generating, and worse you
>> still need individual targets specified in the Makefile.am in general I
>> think. So you just don't save much. Unless I did something wrong here.
>I can understand BUILT_SOURCES and targets, the stampfile and
>intermediate file fiasco is what I can't figure out:
This code looks in large part to me like it was trying to work around an
Automake without BUILT_SOURCES. I'm pretty sure the existing code in
test/glib/Makefile.am is correct, and it's certainly much shorter than
the code you posted.
As for the intermediate file - well, if an error occurs during
compilation you don't want to have a new half-written target file with a
timestamp newer than the source, it will cause compilation to fail until
you delete it manually. My patch moves the logic for create tempfile
+rename into the tool itself.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050219/5c57756d/attachment.pgp
More information about the dbus