Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkdepend(1) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

cpp(1)

make(1)

sed(1)



MKDEPEND(1)                                                        MKDEPEND(1)



NAME
     mkdepend - compute header file dependencies

SYNOPSIS
     mkdepend [-c compiler] [-e sedprog] [-f force] [-i] [-p count] [-r] [-s
     sentinel] depfile [file ...]

DESCRIPTION
     Mkdepend infers make(1) dependencies from source containing C #include
     directives.  It invokes cc(1) with the -M option to compile dependencies
     given a list of source files, and edits the generated dependency
     information into depfile, which may be a makefile or a make include file.

     The -c option substitutes compiler, which may be an elaborate, quoted
     invocation of a compiler, for the default cc -M.  This option is useful
     in an environment where the -D and -I options of cc are used to govern
     header file inclusion.

     The -e option passes an editing program to sed(1), which is applied to
     raw dependency information of the following form:

          object: source


     Thus one may substitute pathname prefixes with envariable parameters, or
     rewrite the conventional .o object suffix.

     The -f option causes mkdepend to add a dependent named force to each
     target file's dependency list.  Using -f '$(FORCE)' and setting
     FORCE=FORCE in a make's environment, one may rebuild certain objects
     without first removing them.  This example assumes that no file named
     FORCE exists in any of make's current working directories.

     Normally, existing dependencies are deleted from the makefile.  The -i
     option causes mkdepend to preserve old dependencies, replacing only those
     involving targets based on the file arguments.  The following rule
     incrementally updates a dependency file named Makedepend:

          Makedepend: $(CFILES)
               mkdepend -c "$(CC) $(CFLAGS) -M" -i $@ $?


     The -r option causes mkdepend to read raw dependencies from its file
     arguments, or from standard input if no file arguments are given.  The -p
     option is like -r, but also collapses dependencies of targets in
     subdirectories where possible.  The count argument specifies the number
     of subdirectories.  For example,

          subdir1/object: source
          subdir2/object: source
          subdir3/object: source




                                                                        Page 1





MKDEPEND(1)                                                        MKDEPEND(1)



     would be rewritten by mkdepend -p 3 as

          object: source


     -p is useful in conjunction with make's VPATH variable.

     The -c, -p, and -r options override one another.

     The -s option inserts its sentinel argument in the comment lines which
     delimit dependencies in depfile.  This option is useful for maintaining
     multiple sets of dependencies in a single file.

NOTES
     This command will be removed from the next major release.  Use cc
     -MDupdate instead.

SEE ALSO
     cc(1), cpp(1), make(1), sed(1)




































                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026