Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mkdep(1) [osf1 man page]

mkdep(1)						      General Commands Manual							  mkdep(1)

NAME
mkdep - generate dependency list from a C program SYNOPSIS
mkdep [-a] [-f depend_file] [-p] [cc_options] file... The mkdep command generates a dependency list file from a C source program. OPTIONS
Causes mkdep to append its output to the end of the dependency file instead of creating a new dependency file. If the dependency file does not exist, mkdep creates it. Specifies a name for the dependency file; overrides the default file name Inhibits mkdep from appending the suffix to the names of object files listed in the output. DESCRIPTION
The mkdep command uses cc(1) to compile a list of dependency files required to build the named C program file or files. The list is for- matted so that it is suitable for inclusion into a makefile for make(1). Duplicate dependency listings for a given program are included only once in the output. You can specify C compiler options by including them in the command line; mkdep passes all unrecognized options through to the compiler. By default, mkdep writes to a file named -f option to specify an alternative output file name. EXAMPLES
The following example illustrates the use of mkdep with the -p option: % cat hello.c #include <stdio.h> main() { printf("%s0","Hello World!"); } % mkdep -p -f hello.depend hello.c % cat hello.depend hello: hello.c /usr/include/stdio.h /usr/include/standards.h hello: /usr/include/sys/types.h /usr/include/standards.h hello: /usr/include/mach/machine/vm_types.h /usr/include/sys/limits.h hello: /usr/include/standards.h /usr/include/machine/machlimits.h hello: /usr/include/sys/syslimits.h /usr/include/float.h hello: /usr/include/standards.h /usr/include/fp_class.h hello: /usr/include/machine/machtime.h SEE ALSO
Commands: cc(1), make(1) mkdep(1)

Check Out this Related Man Page

ccmakedep(1)						      General Commands Manual						      ccmakedep(1)

NAME
ccmakedep - create dependencies in makefiles using a C compiler SYNOPSIS
ccmakedep [ cpp-flags ] [ -wwidth ] [ -smagic-string ] [ -fmakefile ] [ -oobject-suffix ] [ -v ] [ -a ] [ -cccompiler ] [ -- options -- ] sourcefile ... DESCRIPTION
The ccmakedep program calls a C compiler to preprocess each sourcefile, and uses the output to construct makefile rules describing their dependencies. These rules instruct make(1) on which object files must be recompiled when a dependency has changed. By default, ccmakedep places its output in the file named makefile if it exists, otherwise Makefile. An alternate makefile may be speci- fied with the -f option. It first searches the makefile for a line beginning with # DO NOT DELETE or one provided with the -s option, as a delimiter for the dependency output. If it finds it, it will delete everything following this up to the end of the makefile and put the output after this line. If it doesn't find it, the program will append the string to the makefile and place the output after that. EXAMPLE
Normally, ccmakedep will be used in a makefile target so that typing 'make depend' will bring the dependencies up to date for the makefile. For example, SRCS = file1.c file2.c ... CFLAGS = -O -DHACK -I../foobar -xyz depend: ccmakedep -- $(CFLAGS) -- $(SRCS) OPTIONS
The program will ignore any option that it does not understand, so you may use the same arguments that you would for cc(1), including -D and -U options to define and undefine symbols and -I to set the include path. -a Append the dependencies to the file instead of replacing existing dependencies. -cccompiler Use this compiler to generate dependencies. -fmakefile Filename. This allows you to specify an alternate makefile in which ccmakedep can place its output. Specifying "-" as the file name (that is, -f-) sends the output to standard output instead of modifying an existing file. -sstring Starting string delimiter. This option permits you to specify a different string for ccmakedep to look for in the makefile. The default is "# DO NOT DELETE". -v Be verbose: display the C compiler command before running it. -- options -- If ccmakedep encounters a double hyphen (--) in the argument list, then any unrecognized arguments following it will be silently ignored. A second double hyphen terminates this special treatment. In this way, ccmakedep can be made to safely ignore esoteric compiler arguments that might normally be found in a CFLAGS make macro (see the EXAMPLE section above). -D, -I, and -U options appearing between the pair of double hyphens are still processed normally. SEE ALSO
cc(1), make(1), makedepend(1), ccmakedep(1). AUTHOR
ccmakedep was written by the X Consortium. Colin Watson wrote this manual page, originally for the Debian Project, based partly on the manual page for makedepend(1). X Version 11 imake 1.0.2 ccmakedep(1)
Man Page