Deleted Added
full compact
mkdep.1 (38615) mkdep.1 (39123)
1.\" Copyright (c) 1987, 1990, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 25 unchanged lines hidden (view full) ---

34.Dd June 6, 1993
35.Dt MKDEP 1
36.Os BSD 4.2
37.Sh NAME
38.Nm mkdep
39.Nd construct Makefile dependency list
40.Sh SYNOPSIS
41.Nm
1.\" Copyright (c) 1987, 1990, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 25 unchanged lines hidden (view full) ---

34.Dd June 6, 1993
35.Dt MKDEP 1
36.Os BSD 4.2
37.Sh NAME
38.Nm mkdep
39.Nd construct Makefile dependency list
40.Sh SYNOPSIS
41.Nm
42.Op Fl anp
42.Op Fl ap
43.Op Fl f Ar file
44.Op Ar flags
45.Ar file ...
46.Sh DESCRIPTION
47.Nm Mkdep
48takes a set of flags for the C compiler and a list
49of C source files as arguments and constructs a set of include
50file dependencies which are written into the file ``.depend''.

--- 4 unchanged lines hidden (view full) ---

55
56depend:
57 mkdep ${CFLAGS} ${SRCS}
58.Ed
59.Pp
60where the macro SRCS is the list of C source files and the macro
61CFLAGS is the list of flags for the C compiler.
62.Pp
43.Op Fl f Ar file
44.Op Ar flags
45.Ar file ...
46.Sh DESCRIPTION
47.Nm Mkdep
48takes a set of flags for the C compiler and a list
49of C source files as arguments and constructs a set of include
50file dependencies which are written into the file ``.depend''.

--- 4 unchanged lines hidden (view full) ---

55
56depend:
57 mkdep ${CFLAGS} ${SRCS}
58.Ed
59.Pp
60where the macro SRCS is the list of C source files and the macro
61CFLAGS is the list of flags for the C compiler.
62.Pp
63The user has the ability to change the preprocessor and preprocessor options
64used. For instance, to use Gcc as the preprocessor and to ignore system
65headers, one would use
66.Bd -literal -offset indent
67depend:
68 env MKDEP_CPP="gcc -E" MKDEP_CPP_OPTS=-MM mkdep \\
69 ${CFLAGS} ${SRCS}
70.Ed
71.Pp
63The options are as follows:
64.Bl -tag -width Ds
65.It Fl a
66Append to the output file,
67so that multiple
68.Nm mkdep Ns 's
69may be run from a single Makefile.
70.It Fl f
71Write the include file dependencies to
72.Ar file ,
73instead of the default ``.depend''.
72The options are as follows:
73.Bl -tag -width Ds
74.It Fl a
75Append to the output file,
76so that multiple
77.Nm mkdep Ns 's
78may be run from a single Makefile.
79.It Fl f
80Write the include file dependencies to
81.Ar file ,
82instead of the default ``.depend''.
74.It Fl n
75Don't make dependencies on system headers. I.e. anything in <>'s.
76.It Fl p
77Cause
78.Nm
79to produce dependencies of the form:
80.Bd -literal -offset indent
81program: program.c
82.Ed
83.Pp
84so that subsequent makes will produce
85.Ar program
86directly from its C module rather than using an intermediate
87.Pa \&.o
88module.
89This is useful for programs whose source is contained in a single
90module.
83.It Fl p
84Cause
85.Nm
86to produce dependencies of the form:
87.Bd -literal -offset indent
88program: program.c
89.Ed
90.Pp
91so that subsequent makes will produce
92.Ar program
93directly from its C module rather than using an intermediate
94.Pa \&.o
95module.
96This is useful for programs whose source is contained in a single
97module.
98.Sh ENVIRONMENT
99.Bl -tag -width MKDEP_CPP_OPTS
100.It Ev CC
101Specifies the C compiler to use. The specified compiler is expected to have
102options consistant with the Gnu C compiler.
103.It Ev MKDEP_CPP
104Specifies the preprocessor to use. The default is "${CC} -E".
105.It Ev MKDEP_CPP_OPTS
106Specifie the non-CFLAGS options for the preprocessor. The default is
107"-M".
91.El
92.Sh SEE ALSO
93.Xr cc 1 ,
94.Xr cpp 1 ,
95.Xr make 1
96.Sh FILES
97.Bl -tag -width .depend -compact
98.It Pa .depend
99File containing list of dependencies.
100.El
101.Sh HISTORY
102The
103.Nm
104command appeared in
105.Bx 4.3 Tahoe .
108.El
109.Sh SEE ALSO
110.Xr cc 1 ,
111.Xr cpp 1 ,
112.Xr make 1
113.Sh FILES
114.Bl -tag -width .depend -compact
115.It Pa .depend
116File containing list of dependencies.
117.El
118.Sh HISTORY
119The
120.Nm
121command appeared in
122.Bx 4.3 Tahoe .