1ccmakedep(1) General Commands Manual ccmakedep(1)
2
3
4
6 ccmakedep - create dependencies in makefiles using a C compiler
7
9 ccmakedep [ cpp-flags ] [ -wwidth ] [ -smagic-string ] [ -fmakefile ] [
10 -oobject-suffix ] [ -v ] [ -a ] [ -cccompiler ] [ -- options -- ]
11 sourcefile ...
12
14 The ccmakedep program calls a C compiler to preprocess each sourcefile,
15 and uses the output to construct makefile rules describing their depen‐
16 dencies. These rules instruct make(1) on which object files must be
17 recompiled when a dependency has changed.
18
19 By default, ccmakedep places its output in the file named makefile if
20 it exists, otherwise Makefile. An alternate makefile may be specified
21 with the -f option. It first searches the makefile for a line begin‐
22 ning with
23
24 # DO NOT DELETE
25
26 or one provided with the -s option, as a delimiter for the dependency
27 output. If it finds it, it will delete everything following this up to
28 the end of the makefile and put the output after this line. If it
29 doesn't find it, the program will append the string to the makefile and
30 place the output after that.
31
33 Normally, ccmakedep will be used in a makefile target so that typing
34 'make depend' will bring the dependencies up to date for the makefile.
35 For example,
36 SRCS = file1.c file2.c ...
37 CFLAGS = -O -DHACK -I../foobar -xyz
38 depend:
39 ccmakedep -- $(CFLAGS) -- $(SRCS)
40
42 The program will ignore any option that it does not understand, so you
43 may use the same arguments that you would for cc(1), including -D and
44 -U options to define and undefine symbols and -I to set the include
45 path.
46
47 -a Append the dependencies to the file instead of replacing exist‐
48 ing dependencies.
49
50 -cccompiler
51 Use this compiler to generate dependencies.
52
53 -fmakefile
54 Filename. This allows you to specify an alternate makefile in
55 which ccmakedep can place its output. Specifying “-” as the
56 file name (that is, -f-) sends the output to standard output
57 instead of modifying an existing file.
58
59 -sstring
60 Starting string delimiter. This option permits you to specify a
61 different string for ccmakedep to look for in the makefile. The
62 default is “# DO NOT DELETE”.
63
64 -v Be verbose: display the C compiler command before running it.
65
66 -- options --
67 If ccmakedep encounters a double hyphen (--) in the argument
68 list, then any unrecognized arguments following it will be
69 silently ignored. A second double hyphen terminates this spe‐
70 cial treatment. In this way, ccmakedep can be made to safely
71 ignore esoteric compiler arguments that might normally be found
72 in a CFLAGS make macro (see the EXAMPLE section above). -D, -I,
73 and -U options appearing between the pair of double hyphens are
74 still processed normally.
75
77 cc(1), make(1), makedepend(1), ccmakedep(1).
78
80 ccmakedep was written by the X Consortium.
81
82 Colin Watson wrote this manual page, originally for the Debian Project,
83 based partly on the manual page for makedepend(1).
84
85
86
87X Version 11 imake 1.0.7 ccmakedep(1)