Gary Holt > makepp-1.19 > Signature::target_newer



Annotate this POD


New  3
Open  1
View/Report Bugs


Signature::target_newer -- a signature class that uses the traditional Make algorithm


This is the default signature class for a few special cases, e.g., for rules that build Makefile or Otherwise, if you want to use it, you must specify it on the command line or explicitly in rules:

   target : dependencies
          : signature exact_match


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
    : signature target_newer
        co $(FIRST_DEPENDENCY)

If you did not add the ":signature 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.

Note that this rule will not work at all if you change the default signature from being a timestamp to being an MD5 checksum or something like that. So don't do that.

Note also that repositories will not work (currently) if you use the traditional algorithm.

syntax highlighting: