Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkdepend(1) — GL2 W3.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

MKDEPEND(1)  —  Silicon Graphics

NAME

mkdepend − compute header file dependencies

SYNOPSIS

mkdepend [-c compilehow] [-e sedprog] [-f force] [-i] makefile file ... 

DESCRIPTION

Mkdepend infers make dependencies from source containing C #include directives.  Given a shell command compilehow which consists of cc followed by options, mkdepend processes its file arguments and edits the generated dependency information into makefile. 

The -e flag passes an immediate program to sed, which is applied to raw dependency information of the following form: target: dependent

Thus one may substitute pathname prefixes with envariable parameters, for example. 

The -f flag causes mkdepend to add a dependent named force to each target file’s dependency list.  Using -f ’$(FRC)’ and setting FRC=FRC in a make’s environment, one may rebuild certain objects without first removing them. 

Normally, old dependencies are deleted from the makefile.  The -i option causes mkdepend to preserve old dependencies.  When invoked from a makefile, the following rule enables incremental updates to the dependency database:

incdepend: $(SRCS)
mkdepend -c "$(CC) $(CFLAGS)" -i Makefile $?
touch incdepend

Version 3.6  —  December 20, 1987

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