Using the clearmake makefile special target
The .JAVAC target enables clearmake to use
heuristics on audits of Java builds to accurately infer .class
dependencies.
These dependencies are then stored in .class.dep files, enabling future
clearmake runs to build .class
targets such that each
compiler invocation builds only one .class
file.
Using .JAVAC causes clearmake to take the following actions:
- Examines the audit of any target with the file name extension .class.
- Infers the class dependencies from the relative order of .java and .class files that the compiler accesses.
- Records these dependencies in .class.dep files
- In subsequent builds, reads .class.dep files to augment the makefiles and
build the
.class
targets in an order that agrees with the dependency checking of the compiler and precludes it from building anything not specified on the command line.