Programming Utilities Guide

Reporting Hidden Dependencies to make

You might need to write a command for processing hidden dependencies. For instance, you might need to trace document source files that are included in a troff document by way of .so requests. When .KEEP_STATE is in effect, make sets the environment variable SUNPRO_DEPENDENCIES to the value:

SUNPRO_DEPENDENCIES='report-file target'

After the command has terminated, make checks to see if the file has been created, and if it has, make reads it and writes reported dependencies to .make.state in the form:

target:dependency ...

where target is the same as in the environment variable.