Mpp::BuildCheck::target_newer -- a build check class that uses the traditional Make algorithm
This is the default build check class for a few special cases, e.g., for rules that build Makefile or Makefile.in. Otherwise, if you want to use it, you must specify it on the command line or explicitly in rules:
target : dependencies : build_check target_newer $(commands_to_build)
This class forces a recompilation if the target is older than any of its dependencies. It also does not require the command to be the same as on the last build, nor does it it make sure that the architecture is the same. This is generally not a reliable way to build things, but it is occasionally useful for special purpose things where a target may be modified by some commands not executed under make's control. For example, if you want your makefile to pull the latest version out of an RCS archive, but only if the RCS archive is more recent, you could have a rule like this:
%: %,v : build_check target_newer co $(FIRST_DEPENDENCY)
If you did not add the "
:build_check target_newer", the rule would not work as expected. If you checked the file out of the RCS archive, then modified it, makepp's default rule would notice that the file's signature did not match the signature from the last build, so it would check it out for you again.