]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - contrib/bind9/make/rules.in
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / contrib / bind9 / make / rules.in
1 # Copyright (C) 2004-2009  Internet Systems Consortium, Inc. ("ISC")
2 # Copyright (C) 1998-2003  Internet Software Consortium.
3 #
4 # Permission to use, copy, modify, and/or 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.64.130.2 2009/01/10 23:46:57 tbox 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 datarootdir =   @datarootdir@
38
39 DESTDIR =
40
41 @SET_MAKE@
42
43 top_builddir =  @BIND9_TOP_BUILDDIR@
44
45 ###
46 ### All
47 ###
48 ### Makefile may define:
49 ###     TARGETS
50
51 all: subdirs ${TARGETS}
52
53 ###
54 ### Subdirectories
55 ###
56 ### Makefile may define:
57 ###     SUBDIRS
58
59 ALL_SUBDIRS = ${SUBDIRS} nulldir
60
61 #
62 # We use a single-colon rule so that additional dependencies of
63 # subdirectories can be specified after the inclusion of this file.
64 # The "depend" target is treated the same way.
65 #
66 subdirs:
67         @for i in ${ALL_SUBDIRS}; do \
68                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
69                         echo "making all in `pwd`/$$i"; \
70                         (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" all) || exit 1; \
71                 fi; \
72         done
73
74 install:: all
75
76 install clean distclean maintainer-clean doc docclean man manclean::
77         @for i in ${ALL_SUBDIRS}; do \
78                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
79                         echo "making $@ in `pwd`/$$i"; \
80                         (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \
81                 fi; \
82         done
83
84 ###
85 ### C Programs
86 ###
87 ### Makefile must define
88 ###     CC
89 ### Makefile may define
90 ###     CFLAGS
91 ###     LDFLAGS
92 ###     CINCLUDES
93 ###     CDEFINES
94 ###     CWARNINGS
95 ### User may define externally
96 ###     EXT_CFLAGS
97
98 CC =            @CC@
99 CFLAGS =        @CFLAGS@
100 LDFLAGS =       @LDFLAGS@
101 STD_CINCLUDES = @STD_CINCLUDES@
102 STD_CDEFINES =  @STD_CDEFINES@
103 STD_CWARNINGS = @STD_CWARNINGS@
104
105 BUILD_CC = @BUILD_CC@
106 BUILD_CFLAGS = @BUILD_CFLAGS@
107 BUILD_CPPFLAGS = @BUILD_CPPFLAGS@
108 BUILD_LDFLAGS = @BUILD_LDFLAGS@
109 BUILD_LIBS = @BUILD_LIBS@
110
111 .SUFFIXES:
112 .SUFFIXES: .c .@O@
113
114 ALWAYS_INCLUDES = -I${top_builddir}
115 ALWAYS_DEFINES = @ALWAYS_DEFINES@
116 ALWAYS_WARNINGS =
117
118 ALL_CPPFLAGS = \
119         ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \
120         ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES}
121
122 ALL_CFLAGS = ${EXT_CFLAGS} ${ALL_CPPFLAGS} ${CFLAGS} \
123         ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
124
125 .c.@O@:
126         ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
127
128 SHELL = @SHELL@
129 LIBTOOL = @LIBTOOL@
130 LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@
131 LIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@
132 LIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@
133 PURIFY = @PURIFY@
134
135 MKDEP = ${SHELL} ${top_builddir}/make/mkdep
136
137 cleandir: distclean
138 superclean: maintainer-clean
139
140 clean distclean maintainer-clean::
141         rm -f *.@O@ *.o *.lo *.la core *.core .depend
142         rm -rf .libs
143
144 distclean maintainer-clean::
145         rm -f Makefile
146
147 depend:
148         @for i in ${ALL_SUBDIRS}; do \
149                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
150                         echo "making depend in `pwd`/$$i"; \
151                         (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \
152                 fi; \
153         done
154         @if [ X"${VPATH}" != X ] ; then \
155                 if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \
156                         echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
157                         ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
158                         echo ${MKDEP} -vpath ${VPATH} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
159                         ${MKDEP} -vpath ${VPATH} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
160                         ${DEPENDEXTRA} \
161                 elif [ X"${SRCS}" != X ] ; then \
162                         echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
163                         ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
164                         ${DEPENDEXTRA} \
165                 elif [ X"${PSRCS}" != X ] ; then \
166                         echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
167                         ${MKDEP} -vpath ${VPATH} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
168                         ${DEPENDEXTRA} \
169                 fi \
170         else \
171                 if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \
172                         echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
173                         ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
174                         echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
175                         ${MKDEP} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
176                         ${DEPENDEXTRA} \
177                 elif [ X"${SRCS}" != X ] ; then \
178                         echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
179                         ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
180                         ${DEPENDEXTRA} \
181                 elif [ X"${PSRCS}" != X ] ; then \
182                         echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
183                         ${MKDEP} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
184                         ${DEPENDEXTRA} \
185                 fi \
186         fi
187
188 FORCE:
189
190 ###
191 ### Libraries
192 ###
193
194 AR =            @AR@
195 ARFLAGS =       @ARFLAGS@
196 RANLIB =        @RANLIB@
197
198 ###
199 ### Installation
200 ###
201
202 INSTALL =               @INSTALL@
203 INSTALL_PROGRAM =       @INSTALL_PROGRAM@
204 LINK_PROGRAM =          @LN_S@
205 INSTALL_SCRIPT =        @INSTALL_SCRIPT@
206 INSTALL_DATA =          @INSTALL_DATA@
207
208 ###
209 ### Programs used when generating documentation.  It's ok for these
210 ### not to exist when not generating documentation.
211 ###
212
213 XSLTPROC =              @XSLTPROC@ --novalid --xinclude --nonet
214 PERL =                  @PERL@
215 LATEX =                 @LATEX@
216 PDFLATEX =              @PDFLATEX@
217 W3M =                   @W3M@
218
219 ###
220 ### DocBook -> HTML
221 ### DocBook -> man page
222 ###
223
224 .SUFFIXES: .docbook .html .1 .2 .3 .4 .5 .6 .7 .8
225
226 .docbook.html:
227         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-docbook-html.xsl $<
228
229 .docbook.1:
230         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
231
232 .docbook.2:
233         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
234
235 .docbook.3:
236         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
237
238 .docbook.4:
239         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
240
241 .docbook.5:
242         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
243
244 .docbook.6:
245         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
246
247 .docbook.7:
248         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
249
250 .docbook.8:
251         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<