|
|
BSD 4.3reno
.\" Copyright (c) 1987, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms are permitted provided
.\" that: (1) source distributions retain this entire copyright notice and
.\" comment, and (2) distributions including binaries display the following
.\" acknowledgement: ``This product includes software developed by the
.\" University of California, Berkeley and its contributors'' in the
.\" documentation or other materials provided with the distribution and in
.\" all advertising materials mentioning features or use of this software.
.\" Neither the name of the University nor the names of its contributors may
.\" be used to endorse or promote products derived from this software without
.\" specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" @(#)mkdep.1 5.10 (Berkeley) 7/24/90
.\"
.Dd July 24, 1990
.Dt MKDEP 1
.Os BSD 4.2
.Sh NAME
.Nm mkdep
.Nd construct Makefile dependency list
.Sh SYNOPSIS
.Nm mkdep
.Op Fl ap
.Op Fl f Ar depend_file
.Op Ar flags
.Ar file ...
.Sh DESCRIPTION
.Nm Mkdep
takes a set of flags for the C compiler and a list
of C source files as arguments and constructs a set of include
file dependencies which are written into the file
.Ar depend_file ,
or
.Pa \&.depend
by default. An example of its use in a Makefile
might be:
.Pp
.Ds I
CFLAGS= -O -DDEBUG -I../include -I.
SRCS= file1.c file2.c
depend:
mkdep ${CFLAGS} ${SRCS}
.De
.Pp
where the macro SRCS is the list of C source files and the macro
CFLAGS is the list of flags for the C compiler.
.Pp
Options:
.Tw Ds
.Tp Fl p
.Nm mkdep
produces dependencies of the form
.Dq Li program: program.c
so that subsequent makes will produce
.Ar program
directly from its C module rather than using an intermediate
.Pa \&.o
module. This is useful in directories that
contain many programs, each of whose source is contained in a single
C module.
.Tp Fl a
Append to the output file,
so that multiple
.Sf Nm mkdep \&'s
may be run from a single Makefile.
.Tp
.Sh SEE ALSO
.Xr cc 1 ,
.Xr cpp 1 ,
.Xr make 1
.Sh HISTORY
.Nm Mkdep
appeared in the 4.3 Tahoe BSD release.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.