1 | # Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") |
---|
2 | # Copyright (C) 1998-2003 Internet Software Consortium. |
---|
3 | # |
---|
4 | # Permission to use, copy, modify, and distribute this software for any |
---|
5 | # purpose with or without fee is hereby granted, provided that the above |
---|
6 | # copyright notice and this permission notice appear in all copies. |
---|
7 | # |
---|
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH |
---|
9 | # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
---|
10 | # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, |
---|
11 | # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
---|
12 | # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE |
---|
13 | # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
---|
14 | # PERFORMANCE OF THIS SOFTWARE. |
---|
15 | |
---|
16 | # $Id: rules.in,v 1.1.1.4 2005-04-15 15:34:46 ghudson Exp $ |
---|
17 | |
---|
18 | ### |
---|
19 | ### Common Makefile rules for BIND 9. |
---|
20 | ### |
---|
21 | |
---|
22 | ### |
---|
23 | ### Paths |
---|
24 | ### |
---|
25 | ### Note: paths that vary by Makefile MUST NOT be listed |
---|
26 | ### here, or they won't get expanded correctly. |
---|
27 | |
---|
28 | prefix = @prefix@ |
---|
29 | exec_prefix = @exec_prefix@ |
---|
30 | bindir = @bindir@ |
---|
31 | sbindir = @sbindir@ |
---|
32 | includedir = @includedir@ |
---|
33 | libdir = @libdir@ |
---|
34 | sysconfdir = @sysconfdir@ |
---|
35 | localstatedir = @localstatedir@ |
---|
36 | mandir = @mandir@ |
---|
37 | |
---|
38 | DESTDIR = |
---|
39 | |
---|
40 | @SET_MAKE@ |
---|
41 | |
---|
42 | top_builddir = @BIND9_TOP_BUILDDIR@ |
---|
43 | |
---|
44 | ### |
---|
45 | ### All |
---|
46 | ### |
---|
47 | ### Makefile may define: |
---|
48 | ### TARGETS |
---|
49 | |
---|
50 | all: subdirs ${TARGETS} |
---|
51 | |
---|
52 | ### |
---|
53 | ### Subdirectories |
---|
54 | ### |
---|
55 | ### Makefile may define: |
---|
56 | ### SUBDIRS |
---|
57 | |
---|
58 | ALL_SUBDIRS = ${SUBDIRS} nulldir |
---|
59 | |
---|
60 | # |
---|
61 | # We use a single-colon rule so that additional dependencies of |
---|
62 | # subdirectories can be specified after the inclusion of this file. |
---|
63 | # The "depend" target is treated the same way. |
---|
64 | # |
---|
65 | subdirs: |
---|
66 | @for i in ${ALL_SUBDIRS}; do \ |
---|
67 | if [ "$$i" != "nulldir" -a -d $$i ]; then \ |
---|
68 | echo "making all in `pwd`/$$i"; \ |
---|
69 | (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" all) || exit 1; \ |
---|
70 | fi; \ |
---|
71 | done |
---|
72 | |
---|
73 | install:: all |
---|
74 | |
---|
75 | install clean distclean maintainer-clean doc docclean man manclean:: |
---|
76 | @for i in ${ALL_SUBDIRS}; do \ |
---|
77 | if [ "$$i" != "nulldir" -a -d $$i ]; then \ |
---|
78 | echo "making $@ in `pwd`/$$i"; \ |
---|
79 | (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \ |
---|
80 | fi; \ |
---|
81 | done |
---|
82 | |
---|
83 | ### |
---|
84 | ### C Programs |
---|
85 | ### |
---|
86 | ### Makefile must define |
---|
87 | ### CC |
---|
88 | ### Makefile may define |
---|
89 | ### CFLAGS |
---|
90 | ### LDFLAGS |
---|
91 | ### CINCLUDES |
---|
92 | ### CDEFINES |
---|
93 | ### CWARNINGS |
---|
94 | ### User may define externally |
---|
95 | ### EXT_CFLAGS |
---|
96 | |
---|
97 | CC = @CC@ |
---|
98 | CFLAGS = @CFLAGS@ |
---|
99 | LDFLAGS = @LDFLAGS@ |
---|
100 | STD_CINCLUDES = @STD_CINCLUDES@ |
---|
101 | STD_CDEFINES = @STD_CDEFINES@ |
---|
102 | STD_CWARNINGS = @STD_CWARNINGS@ |
---|
103 | |
---|
104 | .SUFFIXES: |
---|
105 | .SUFFIXES: .c .@O@ |
---|
106 | |
---|
107 | ALWAYS_INCLUDES = -I${top_builddir} |
---|
108 | ALWAYS_DEFINES = @ALWAYS_DEFINES@ |
---|
109 | ALWAYS_WARNINGS = |
---|
110 | |
---|
111 | ALL_CPPFLAGS = \ |
---|
112 | ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \ |
---|
113 | ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES} |
---|
114 | |
---|
115 | ALL_CFLAGS = ${EXT_CFLAGS} ${CFLAGS} \ |
---|
116 | ${ALL_CPPFLAGS} \ |
---|
117 | ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS} |
---|
118 | |
---|
119 | .c.@O@: |
---|
120 | ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $< |
---|
121 | |
---|
122 | SHELL = @SHELL@ |
---|
123 | LIBTOOL = @LIBTOOL@ |
---|
124 | LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@ |
---|
125 | LIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@ |
---|
126 | LIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@ |
---|
127 | PURIFY = @PURIFY@ |
---|
128 | |
---|
129 | MKDEP = ${SHELL} ${top_builddir}/make/mkdep |
---|
130 | |
---|
131 | cleandir: distclean |
---|
132 | superclean: maintainer-clean |
---|
133 | |
---|
134 | clean distclean maintainer-clean:: |
---|
135 | rm -f *.@O@ *.lo *.la core *.core .depend |
---|
136 | rm -rf .libs |
---|
137 | |
---|
138 | distclean maintainer-clean:: |
---|
139 | rm -f Makefile |
---|
140 | |
---|
141 | depend: |
---|
142 | @for i in ${ALL_SUBDIRS}; do \ |
---|
143 | if [ "$$i" != "nulldir" -a -d $$i ]; then \ |
---|
144 | echo "making depend in `pwd`/$$i"; \ |
---|
145 | (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \ |
---|
146 | fi; \ |
---|
147 | done |
---|
148 | @if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \ |
---|
149 | echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ |
---|
150 | ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ |
---|
151 | echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \ |
---|
152 | ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \ |
---|
153 | ${DEPENDEXTRA} \ |
---|
154 | elif [ X"${SRCS}" != X ] ; then \ |
---|
155 | echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ |
---|
156 | ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ |
---|
157 | ${DEPENDEXTRA} \ |
---|
158 | elif [ X"${PSRCS}" != X ] ; then \ |
---|
159 | echo ${MKDEP} ${ALL_CPPFLAGS} ${PSRCS}; \ |
---|
160 | ${MKDEP} -p ${ALL_CPPFLAGS} ${PSRCS}; \ |
---|
161 | ${DEPENDEXTRA} \ |
---|
162 | fi |
---|
163 | |
---|
164 | FORCE: |
---|
165 | |
---|
166 | ### |
---|
167 | ### Libraries |
---|
168 | ### |
---|
169 | |
---|
170 | AR = @AR@ |
---|
171 | ARFLAGS = @ARFLAGS@ |
---|
172 | RANLIB = @RANLIB@ |
---|
173 | |
---|
174 | ### |
---|
175 | ### Installation |
---|
176 | ### |
---|
177 | |
---|
178 | INSTALL = @INSTALL@ |
---|
179 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
---|
180 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
---|
181 | INSTALL_DATA = @INSTALL_DATA@ |
---|
182 | |
---|
183 | ### |
---|
184 | ### DocBook -> HTML |
---|
185 | ### DocBook -> man page |
---|
186 | ### |
---|
187 | |
---|
188 | .SUFFIXES: .docbook .html .1 .2 .3 .4 .5 .6 .7 .8 |
---|
189 | |
---|
190 | OPENJADE = @OPENJADE@ |
---|
191 | SGMLCATALOG = @SGMLCATALOG@ |
---|
192 | HTMLSTYLE = @HTMLSTYLE@ |
---|
193 | XMLDCL = @XMLDCL@ |
---|
194 | DOCBOOK2MANSPEC = @DOCBOOK2MANSPEC@ |
---|
195 | JADETEX = @JADETEX@ |
---|
196 | PDFJADETEX = @PDFJADETEX@ |
---|
197 | |
---|
198 | ONSGMLS = onsgmls |
---|
199 | SGMLSPL = sgmlspl |
---|
200 | |
---|
201 | # |
---|
202 | # Note: this rule assumes the docbook.dsl stylesheet |
---|
203 | # is being used. If another stylesheet is used, the |
---|
204 | # filename 'r1.htm' in the rule might have to be |
---|
205 | # be changed. |
---|
206 | # |
---|
207 | .docbook.html: |
---|
208 | ${OPENJADE} -c ${SGMLCATALOG} -t sgml -d ${HTMLSTYLE} $< |
---|
209 | echo "" >> r1.htm |
---|
210 | cat ${top_srcdir}/docutil/HTML_COPYRIGHT r1.htm > $@ |
---|
211 | rm -f r1.htm |
---|
212 | |
---|
213 | .docbook.1: |
---|
214 | sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@ |
---|
215 | .docbook.2: |
---|
216 | sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@ |
---|
217 | .docbook.3: |
---|
218 | sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@ |
---|
219 | .docbook.4: |
---|
220 | sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@ |
---|
221 | .docbook.5: |
---|
222 | sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@ |
---|
223 | .docbook.6: |
---|
224 | sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@ |
---|
225 | .docbook.7: |
---|
226 | sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@ |
---|
227 | .docbook.8: |
---|
228 | sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@ |
---|