mdep
Section: Misc. Reference Manual Pages (1)
Updated: Benetics Local
Index
Return to Main Contents
NAME
mdep - generate the dependency list for C sources
SYNOPSIS
mdep [ -D symbol ] [ -I searchpath ] [ -r ] [ -x abc ]
sourcefiles
DESCRIPTION
The purpose of mdep is to generate the list of include file
dependencies for some source file. The source files are expected to be
C language source files, and may include either .c or .h files (or any
other file, for that matter). The source files are examined for lines
containing the `#include' statement (also `$include' for those of us who
use UNIFY), and those file names are included in the list of dependencies.
Additional features are provided by command line options: recursive
expansion of include files (includes that include includes), suppression
of expansion of specific include files, and Defining symbols so that the
appropriate dependencies are generated.
Options
- -D symbol
-
Define a symbol (as you would to the C preprocessor) to cause the
recognition of the appropriate sections of code. Since mdep does
not read #define statements in the source files, this is the only way of
causing symbols to be defined. Conversely, symbols are #undef by
default. Multiple occurrences of the -D option, with argument, may
appear in the command line.
- -I searchpath
-
Define a directory to be searched for include files, as is done for the
C preprocessor. Multiple occurrences of the -I option, with argument,
may appear in the command line.
- -r
-
Perform recursive expansion of include files. Thus, if an include file
includes other files, include those file names (and so on) in the
dependency list. This option is moderated by the -x option.
- -x filename
-
Exclude a file from recursive expansion. The filename associated with
this option may omit the .h suffix, and mdep will append the
suffix.
Arguments
- sourcefile
-
One or more C source files to be processed. The files may actually be
any ascii file.
EXAMPLES
The following example shows the command to process mdep.c and the output
from the command:
- % mdep -r mdep.c
mdep.o: \
/usr/include/sys/types.h \
/usr/include/sys/dir.h \
/usr/include/stdio.h
To generate the dependency list for file `foo.c' that includes `foo.h'
which includes some standard files:
- % mdep -r -I/usr/local/include foo.c
foo.o: \
./foo.h \
/usr/include/stdio.h
SEE ALSO
make(1)
AUTHOR
Steven M. List
Benetics Corporation
Mountain View, CA.
{cdp,idi,greipa,oliveb,sun,tolerant}!bene!luke!steven
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- Options
-
- Arguments
-
- EXAMPLES
-
- SEE ALSO
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 06:31:31 GMT, December 12, 2024