[Omake] Adding version control/time stamp info to the module
Aleksey Nogin
nogin at metaprl.org
Wed May 16 09:51:11 PDT 2007
On 16.05.2007 06:22, Dmitry Bely wrote:
> I need to attach a resource file to the DLL built by omake. The
> resource file is generated from the version control info and the
> current time stamp. How to properly set dependencies between the DLL
> and the resource file, not rebuilding everything all the time? My best
> try is (simplified Omakefile):
>
> version.h: version.h.in
> <version control tool> $< $@
> VersInfo.res: VersInfo.rc version.h
> <resource compiler> $<
Is the current date given explicitly in the command line? Or is it used
implicitly by the "version control tool"?
> .BUILD_BEGIN: VersInfo.res
> rm -f version.h
Why is this here? Note that .BUILD_BEGIN is built first whenever you run
OMake, so this would case version.h to be deleted every time.
> But this way VersInfo.res is rebuild on every omake invocation
> (although the DLL itself does not).
Of course - your .BUILD_BEGIN deletes version.h, then the regular build
phase starts, version.h is rebuilt, it's now different (as the time
stamp have changed), so the VersInfo.res is then rebuilt as well.
One option would be to have version.h depend on "all the source files",
so that it is rebuilt whenever something changes, and get rid of the
.BUILD_BEGIN rule.
Aleksey
More information about the Omake
mailing list