add packaging
[platform/upstream/imake.git] / ccmakedep.man
1 .TH ccmakedep 1 __xorgversion__
2 .SH NAME
3 ccmakedep \- create dependencies in makefiles using a C compiler
4 .SH SYNOPSIS
5 .B ccmakedep
6 [
7 .BI cpp-flags
8 ] [
9 .BI \-w width
10 ] [
11 .BI \-s magic-string
12 ] [
13 .BI \-f makefile
14 ] [
15 .BI \-o object-suffix
16 ] [
17 .B \-v
18 ] [
19 .B \-a
20 ] [
21 .BI \-cc compiler
22 ] [
23 \-\^\-
24 .I options
25 \-\^\-
26 ]
27 .I sourcefile
28 \^.\|.\|.
29 .SH DESCRIPTION
30 The
31 .B ccmakedep
32 program calls a C compiler to preprocess each
33 .IR sourcefile ,
34 and uses the output to construct
35 .I makefile
36 rules describing their dependencies.
37 These rules instruct
38 .BR make (1)
39 on which object files must be recompiled when a dependency has changed.
40 .PP
41 By default,
42 .B ccmakedep
43 places its output in the file named
44 .I makefile
45 if it exists, otherwise
46 .I Makefile.
47 An alternate makefile may be specified with the
48 .B \-f
49 option.
50 It first searches the makefile for a line beginning with
51 .sp
52 \&    # DO NOT DELETE
53 .sp
54 or one provided with the
55 .B \-s
56 option, as a delimiter for the dependency output.
57 If it finds it, it will delete everything following this up to the end of
58 the makefile and put the output after this line.
59 If it doesn't find it, the program will append the string to the makefile
60 and place the output after that.
61 .SH EXAMPLE
62 Normally,
63 .B ccmakedep
64 will be used in a makefile target so that typing 'make depend' will bring
65 the dependencies up to date for the makefile.
66 For example,
67 .nf
68     SRCS\0=\0file1.c\0file2.c\0.\|.\|.
69     CFLAGS\0=\0\-O\0\-DHACK\0\-I\^.\^.\^/foobar\0\-xyz
70     depend:
71             ccmakedep\0\-\^\-\0$(CFLAGS)\0\-\^\-\0$(SRCS)
72 .fi
73 .SH OPTIONS
74 The program will ignore any option that it does not understand, so you may
75 use the same arguments that you would for
76 .BR cc (1),
77 including
78 .B \-D
79 and
80 .B \-U
81 options to define and undefine symbols and
82 .B \-I
83 to set the include path.
84 .TP
85 .B \-a
86 Append the dependencies to the file instead of replacing existing
87 dependencies.
88 .TP
89 .BI \-cc compiler
90 Use this compiler to generate dependencies.
91 .TP
92 .BI \-f makefile
93 Filename.
94 This allows you to specify an alternate makefile in which
95 .B ccmakedep
96 can place its output.
97 Specifying \(lq\-\(rq as the file name (that is,
98 .BR \-f\- )
99 sends the output to standard output instead of modifying an existing file.
100 .TP
101 .BI \-s string
102 Starting string delimiter.
103 This option permits you to specify a different string for
104 .B ccmakedep
105 to look for in the makefile.
106 The default is \(lq# DO NOT DELETE\(rq.
107 .TP
108 .BI \-v
109 Be verbose: display the C compiler command before running it.
110 .TP
111 .BI \-\^\- " options " \-\^\-
112 If
113 .B ccmakedep
114 encounters a double hyphen (\-\^\-) in the argument list, then any
115 unrecognized arguments following it will be silently ignored.
116 A second double hyphen terminates this special treatment.
117 In this way,
118 .B ccmakedep
119 can be made to safely ignore esoteric compiler arguments that might
120 normally be found in a CFLAGS
121 .B make
122 macro (see the
123 .B EXAMPLE
124 section above).
125 .BR \-D ,
126 .BR \-I ,
127 and
128 .B \-U
129 options appearing between the pair of double hyphens are still processed
130 normally.
131 .SH "SEE ALSO"
132 .BR cc (1),
133 .BR make (1),
134 .BR makedepend (1),
135 .BR ccmakedep (1).
136 .SH AUTHOR
137 .B ccmakedep
138 was written by the X Consortium.
139 .PP
140 Colin Watson wrote this manual page, originally for the Debian Project,
141 based partly on the manual page for
142 .BR makedepend (1).