Including a makefile version in a configuration record

Learn how to include a makefile version in a configuration record.

To record a makefile version in a CR, use one of the following methods:

  • Declare it as an explicit dependency in the makefile. To do this, you can use the $(MAKEFILE) variable. You must explicitly list any included makefiles that you want to record.

    The drawback to this method is that it causes targets that depend on the makefile to be rebuilt if there is any change to the makefile.

  • Make it an implicit dependency by referring to it in a build script and use the special target .DEPENDENCY_IGNORED_FOR_REUSE to ignore it in subsequent rebuild decisions. You must explicitly list any included makefiles that you want to record.

    For example:

    .DEPENDENCY_IGNORED_FOR_REUSE: $(MAKEFILE)
    targ: dep1 dep2
       cat $(MAKEFILE) > /dev/null
       touch targ

    The drawback to this method is that the makefile dependency is ignored for reuse, but it is not ignored for winkin.

  • Use the .MAKEFILES_IN_CONFIG_REC special target. For more information, see Special targets.