Handling targets built in multiple ways
Learn how to handle targets built in multiple ways.
Because omake (and clearmake) compare build
scripts, undesirable results might occur if your build environment includes more than
one way to build a particular target. For example, suppose that the target
test_prog_3
appears in two makefiles in two directories. The first
is in its source directory, util_src:
test_prog_3.exe: ...
cl /Fl test_prog_3.c ...
The second is in another directory, app_src:
..\util_src\test_prog_3.exe: ...
cd ..\util_src & cl /Fl test_prog_3.c
Derived objects built with these scripts might be equivalent, because they are built as the same file name (test_prog_3) in the same VOB directory (util_src). But by default, a build in the app_src directory never reuses or winks in a DO built in the util_src directory, because build-script comparison fails.
You can suppress build-script comparison for this target by using an
omake special build target, .NOCMP_SCRIPT
, or a
clearmake special build target, .NO_CMP_SCRIPT
in the makefile or in an associated BOS file:
.NO_CMP_SCRIPT: ..\util_src\test_prog_3.exe (clearmake build target)
.NOCMP_SCRIPT: ..\util_src\test_prog_3.exe (omake build target)
To suspend build-script comparison once, you can use either omake -O or clearmake -O.