Accommodating the different names of build tools

The fact that the HCL VersionVault build utility has a unique name, omake (or clearmake), might conflict with existing build procedures that implement recursive builds.

Most make variants automatically define the make macro $(MAKE) as the name of the build program, as it was typed on the command line:

% my_make hello.o
(sets MAKE to my_make)
Z:\avob> make hello.obj
(sets MAKE to make)
Z:\avob> omake hello.obj
(sets MAKE to omake)
Z:\avob> clearmake hello.obj
(sets MAKE to clearmake)
Z:\avob> my_make hello.obj
(sets MAKE to my_make)

This definition enables recursive builds to use $(MAKE) to invoke the same build program at each level. The section Optimizing winkin by avoiding pseudotargets includes one such example; here is another one:SUBDIRS = lib util src

all:

for %DIR in ($(SUBDIRS)) do cd %DIR & $(MAKE) all

Executing this build script with omake (or clearmake) invokes omake all (or clearmake all) recursively in each sub-directory.