[Omake] Adding version control/time stamp info to the module

Dmitry Bely dmitry.bely at gmail.com
Wed May 16 06:22:58 PDT 2007


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> $<

.BUILD_BEGIN: VersInfo.res
  rm -f version.h

dll=<...>
mlfiles=<...>
cfiles=<...>
BUILD_DLL_FLAGS += -linkopt VersInfo.res # attach .res to the DLL
.DEFAULT: $(BuildDLL $(dll), $(mlfiles), $(cfiles))

But this way VersInfo.res is rebuild on every omake invocation
(although the DLL itself does not). Can I get rid of this? I have to
add that I am using vmount, so some dependencies are required
(otherwise VersInfo.rc, version.h.in etc. are not copied to the
destination directory).

- Dmitry Bely


More information about the Omake mailing list