1*62117Sbostic.\" Copyright (c) 1987, 1990, 1993 2*62117Sbostic.\" The Regents of the University of California. All rights reserved. 331323Sbostic.\" 443728Scael.\" %sccs.include.redist.man% 531323Sbostic.\" 6*62117Sbostic.\" @(#)mkdep.1 8.1 (Berkeley) 06/06/93 733503Sbostic.\" 844957Scael.Dd 944957Scael.Dt MKDEP 1 1044957Scael.Os BSD 4.2 1144957Scael.Sh NAME 1244957Scael.Nm mkdep 1344957Scael.Nd construct Makefile dependency list 1444957Scael.Sh SYNOPSIS 1544957Scael.Nm mkdep 1644957Scael.Op Fl ap 1745927Sbostic.Op Fl f Ar file 1844957Scael.Op Ar flags 1944957Scael.Ar file ... 2044957Scael.Sh DESCRIPTION 2144957Scael.Nm Mkdep 2244957Scaeltakes a set of flags for the C compiler and a list 2335381Sbosticof C source files as arguments and constructs a set of include 2445927Sbosticfile dependencies which are written into the file ``.depend''. 2545927SbosticAn example of its use in a Makefile might be: 2649962Scael.Bd -literal -offset indent 2745927SbosticCFLAGS= -O -I../include 2831323SbosticSRCS= file1.c file2.c 2931323Sbostic 3031323Sbosticdepend: 3131323Sbostic mkdep ${CFLAGS} ${SRCS} 3249962Scael.Ed 3344957Scael.Pp 3431323Sbosticwhere the macro SRCS is the list of C source files and the macro 3536095SbosticCFLAGS is the list of flags for the C compiler. 3644957Scael.Pp 3745927SbosticThe options are as follows: 3849962Scael.Bl -tag -width Ds 3949962Scael.It Fl a 4045927SbosticAppend to the output file, 4145927Sbosticso that multiple 4249962Scael.Nm mkdep Ns 's 4345927Sbosticmay be run from a single Makefile. 4449962Scael.It Fl f 4545927SbosticWrite the include file dependencies to 4645927Sbostic.Ar file , 4745927Sbosticinstead of the default ``.depend''. 4849962Scael.It Fl p 4945927SbosticCause 5044957Scael.Nm mkdep 5145927Sbosticto produce dependencies of the form: 5249962Scael.Bd -literal -offset indent 5345927Sbosticprogram: program.c 5449962Scael.Ed 5545927Sbostic.Pp 5644957Scaelso that subsequent makes will produce 5744957Scael.Ar program 5844957Scaeldirectly from its C module rather than using an intermediate 5944957Scael.Pa \&.o 6045927Sbosticmodule. 6145927SbosticThis is useful for programs whose source is contained in a single 6245927Sbosticmodule. 6349962Scael.El 6444957Scael.Sh SEE ALSO 6544957Scael.Xr cc 1 , 6644957Scael.Xr cpp 1 , 6744957Scael.Xr make 1 6845927Sbostic.Sh FILES 6949962Scael.Bl -tag -width .depend -compact 7049962Scael.It Pa .depend 7149962ScaelFile containing list of dependencies. 7249962Scael.El 7344957Scael.Sh HISTORY 7449962ScaelThe 7549962Scael.Nm mkdep 7649962Scaelcommand appeared in 7749962Scael.Bx 4.3 Tahoe . 78