Stephen Fisher wrote:
On Tue, Aug 02, 2011 at 11:22:03AM -0400, Jeff Morriss wrote:
If there was a way to tell if it was changed and only then generate it,
I would say yes. If it is re-generated without changes, I suspect the
compiler would recompile it every time.
'make' does that for you :-)
Yes.. :) but what about if the file's modification time is changed
because it was re-generated even though the contents of the file are the
same? Or will the generating program not re-generate it?
'make' won't regenerate it unless the source files have changed (e.g.,
if you type "make" twice in asn1/snmp, it'll only run asn2wrs once).
BUT, we do have some room for improvement there because it does COPY the
source over to epan/dissectors twice. A "cp -p" (assuming that's
portable and has a Windows equivalent) would help (by preserving the
timestamps) as would simply sending the generation output directly to
epan/dissectors .