]>
Commit | Line | Data |
---|---|---|
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 | |
43 | The | |
44 | .Nm | |
45 | command basically does two things: | |
46 | .Pp | |
47 | Process the raw dependency files produced by the cpp -MD option. | |
48 | There is one line in the file for every #include encountered, but | |
49 | there are repeats and patterns like .../dir1/../dir2 that appear which | |
50 | should reduce to .../dir2. | |
51 | .Nm | |
52 | canonicalizes and flushes repeats from the dependency list. | |
53 | It also sorts the file names and "fills" them to a 78 character line. | |
54 | .Pp | |
55 | .Nm | |
56 | also updates the makefile directly with the dependency information, | |
57 | so the .d file can be thrown away (see | |
58 | .Ar d | |
59 | option). This is done to save space. | |
60 | .Nm | |
61 | assumes that dependency information in the makefile is sorted by .o | |
62 | file name and it procedes to merge in (add/or replace [as appropriate]) | |
63 | the new dependency lines that it has generated. | |
64 | For time efficiency, | |
65 | .Nm | |
66 | assumes that any .d files it is given that were created | |
67 | before the creation date of the "makefile" were processed | |
68 | already. It ignores them unless the force flag | |
69 | .Op f | |
70 | is given. | |
71 | .Pp | |
72 | .Sh FLAG SUMMARY | |
73 | .Bl -tag -width indent | |
74 | .It Fl D Ar c|D|d|m|o|t | |
75 | Specify debugging option(s): | |
76 | .Bl -tag -width indent | |
77 | .It c | |
78 | show file contents | |
79 | .It D | |
80 | show very low level debugging | |
81 | .It d | |
82 | show new dependency crunching | |
83 | .It m | |
84 | show generation of makefile | |
85 | .It o | |
86 | show files being opened | |
87 | .It t | |
88 | show time comparisons | |
89 | .El | |
90 | .It Fl d | |
91 | Delete the .d file after it is processed | |
92 | .It Fl f | |
93 | Force an update of the dependencies in the makefile, | |
94 | even if the makefile is more recent than the .n file. | |
95 | (This implies that | |
96 | .Nm | |
97 | has been run already.) | |
98 | .It Fl m Ar makefile | |
99 | Specify the makefile to be upgraded. The defaults are | |
100 | .Ar makefile | |
101 | and then | |
102 | .Ar Makefile . | |
103 | .It Fl o Ar outputfile | |
104 | Specify an output file (other than a makefile) for the dependencies. | |
105 | .It Fl u Ar makefile | |
106 | Like | |
107 | .Fl m , | |
108 | but the file will be created if necessary. | |
109 | .It Fl v | |
110 | Set the verbose flag. | |
111 | .It Fl x | |
112 | Expunge old dependency information from the makefile. | |
113 | .El | |
114 | .Sh SEE ALSO | |
115 | .Xr make 1 | |
116 | .Sh BUGS | |
117 | Old, possibly not used by anyone. | |
118 | .Sh HISTORY | |
119 | The | |
120 | .Nm | |
121 | utility was written by Robert V. Baron at Carnegie-Mellon University. |