A simple clearmake build scenario

clearmake is designed to let developers in makefile-based build environments continue working in their accustomed manner.

The following simple build scenario demonstrates how little adjustment is required to begin building with clearmake.

  1. Go to a development directory within any VOB.
  2. Edit some source files. Typically, you need to edit some sources before performing a build; accordingly, you check out some file elements and revise the checked-out versions.
  3. Start a build. You can use your existing makefiles, but invoke clearmake instead of your standard make program. For example:
    clearmake
    (build the default target)
    clearmake cwd.obj libproj.lib
    (build one or more particular targets)
    clearmake -k monet CFLAGS=-g
    (use standard options and make-macro overrides)

(Avoid specifying make-macro overrides on the command line. For more information, see Specifying build options)

clearmake builds targets (or avoids building them) in a manner similar to, but more sophisticated than, other make variants.

The following figure illustrates some typical build scenarios in which derived objects are rebuilt, reused, or winked in.

Figure 1: clearmake build scenario

build scenario

clearmake builds new derived objects for checked-out source files, reuses derived objects for checked-in source files that have previously built the object, and winks in derived objects from other views as appropriate for checked-in source files that have not previously built the object.

Note that clearmake does not attempt to verify that you have actually changed the file; the checkout makes a rebuild necessary. As you work, saving a file or invoking clearmake causes a rebuild of the dependents of the updated file, in the standard make manner.

For source files that you have not checked out, clearmake might or might not build a new derived object:

  • It might reuse a derived object that appears in your view, produced by a previous build.
  • It might wink in an existing derived object built in another view. (It is even possible that a winked-in DO was originally created in your view, shared, and then deleted from your view, for example, by a make clean command.)
  • Changes to other aspects of your build environment might trigger a clearmake rebuild: revision to a header file; change to the build script, use of a make-macro override; change to an environment variable used in the build script.