]> git.saurik.com Git - apple/xnu.git/blame - SETUP/md/md.1
xnu-2050.24.15.tar.gz
[apple/xnu.git] / SETUP / md / md.1
CommitLineData
316670eb
A
1.\" Man page Copyright (c) 2002
2.\" Apple Computer
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.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS DOCUMENTATION IS PROVIDED BY THE APPLE ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED. IN NO EVENT SHALL APPLE BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\"
26.Dd "December 25, 2002"
27.Dt md 1
28.Os
29.Sh NAME
30.Nm md
31.Nd process raw dependency files produced by cpp -MD
32.Sh SYNOPSIS
33.Nm
34.Op Fl d
35.Op Fl f
36.Op Fl m Ar makefile
37.Op Fl u Ar makefile
38.Op Fl o Ar outputfile
39.Op Fl v
40.Op Fl x
41.Op Fl D Ar c|d|m|o|t|D
42.Sh DESCRIPTION
43The
44.Nm
45command basically does two things:
46.Pp
47Process the raw dependency files produced by the cpp -MD option.
48There is one line in the file for every #include encountered, but
49there are repeats and patterns like .../dir1/../dir2 that appear which
50should reduce to .../dir2.
51.Nm
52canonicalizes and flushes repeats from the dependency list.
53It also sorts the file names and "fills" them to a 78 character line.
54.Pp
55.Nm
56also updates the makefile directly with the dependency information,
57so the .d file can be thrown away (see
58.Ar d
59option). This is done to save space.
60.Nm
61assumes that dependency information in the makefile is sorted by .o
62file name and it procedes to merge in (add/or replace [as appropriate])
63the new dependency lines that it has generated.
64For time efficiency,
65.Nm
66assumes that any .d files it is given that were created
67before the creation date of the "makefile" were processed
68already. It ignores them unless the force flag
69.Op f
70is given.
71.Pp
72.Sh FLAG SUMMARY
73.Bl -tag -width indent
74.It Fl D Ar c|D|d|m|o|t
75Specify debugging option(s):
76.Bl -tag -width indent
77.It c
78show file contents
79.It D
80show very low level debugging
81.It d
82show new dependency crunching
83.It m
84show generation of makefile
85.It o
86show files being opened
87.It t
88show time comparisons
89.El
90.It Fl d
91Delete the .d file after it is processed
92.It Fl f
93Force an update of the dependencies in the makefile,
94even if the makefile is more recent than the .n file.
95(This implies that
96.Nm
97has been run already.)
98.It Fl m Ar makefile
99Specify the makefile to be upgraded. The defaults are
100.Ar makefile
101and then
102.Ar Makefile .
103.It Fl o Ar outputfile
104Specify an output file (other than a makefile) for the dependencies.
105.It Fl u Ar makefile
106Like
107.Fl m ,
108but the file will be created if necessary.
109.It Fl v
110Set the verbose flag.
111.It Fl x
112Expunge old dependency information from the makefile.
113.El
114.Sh SEE ALSO
115.Xr make 1
116.Sh BUGS
117Old, possibly not used by anyone.
118.Sh HISTORY
119The
120.Nm
121utility was written by Robert V. Baron at Carnegie-Mellon University.