]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/bind9/make/rules.in
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / bind9 / make / rules.in
1 # Copyright (C) 2004-2008  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.47.18.15 2008/02/18 23:46:01 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
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 BUILD_CC = @BUILD_CC@
105 BUILD_CFLAGS = @BUILD_CFLAGS@
106 BUILD_CPPFLAGS = @BUILD_CPPFLAGS@
107 BUILD_LDFLAGS = @BUILD_LDFLAGS@
108 BUILD_LIBS = @BUILD_LIBS@
109
110 .SUFFIXES:
111 .SUFFIXES: .c .@O@
112
113 ALWAYS_INCLUDES = -I${top_builddir}
114 ALWAYS_DEFINES = @ALWAYS_DEFINES@
115 ALWAYS_WARNINGS =
116
117 ALL_CPPFLAGS = \
118         ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \
119         ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES}
120
121 ALL_CFLAGS = ${EXT_CFLAGS} ${ALL_CPPFLAGS} ${CFLAGS} \
122         ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
123
124 .c.@O@:
125         ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
126
127 SHELL = @SHELL@
128 LIBTOOL = @LIBTOOL@
129 LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@
130 LIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@
131 LIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@
132 PURIFY = @PURIFY@
133
134 MKDEP = ${SHELL} ${top_builddir}/make/mkdep
135
136 cleandir: distclean
137 superclean: maintainer-clean
138
139 clean distclean maintainer-clean::
140         rm -f *.@O@ *.o *.lo *.la core *.core .depend
141         rm -rf .libs
142
143 distclean maintainer-clean::
144         rm -f Makefile
145
146 depend:
147         @for i in ${ALL_SUBDIRS}; do \
148                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
149                         echo "making depend in `pwd`/$$i"; \
150                         (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \
151                 fi; \
152         done
153         @if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \
154                 echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
155                 ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
156                 echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \
157                 ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \
158                 ${DEPENDEXTRA} \
159         elif [ X"${SRCS}" != X ] ; then \
160                 echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
161                 ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
162                 ${DEPENDEXTRA} \
163         elif [ X"${PSRCS}" != X ] ; then \
164                 echo ${MKDEP} ${ALL_CPPFLAGS} ${PSRCS}; \
165                 ${MKDEP} -p ${ALL_CPPFLAGS} ${PSRCS}; \
166                 ${DEPENDEXTRA} \
167         fi
168
169 FORCE:
170
171 ###
172 ### Libraries
173 ###
174
175 AR =            @AR@
176 ARFLAGS =       @ARFLAGS@
177 RANLIB =        @RANLIB@
178
179 ###
180 ### Installation
181 ###
182
183 INSTALL =               @INSTALL@
184 INSTALL_PROGRAM =       @INSTALL_PROGRAM@
185 LINK_PROGRAM =          @LN_S@
186 INSTALL_SCRIPT =        @INSTALL_SCRIPT@
187 INSTALL_DATA =          @INSTALL_DATA@
188
189 ###
190 ### Programs used when generating documentation.  It's ok for these
191 ### not to exist when not generating documentation.
192 ###
193
194 XSLTPROC =              @XSLTPROC@ --novalid --xinclude --nonet
195 PERL =                  @PERL@
196 LATEX =                 @LATEX@
197 PDFLATEX =              @PDFLATEX@
198 W3M =                   @W3M@
199
200 ###
201 ### DocBook -> HTML
202 ### DocBook -> man page
203 ###
204
205 .SUFFIXES: .docbook .html .1 .2 .3 .4 .5 .6 .7 .8
206
207 .docbook.html:
208         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-docbook-html.xsl $<
209
210 .docbook.1:
211         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
212
213 .docbook.2:
214         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
215
216 .docbook.3:
217         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
218
219 .docbook.4:
220         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
221
222 .docbook.5:
223         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
224
225 .docbook.6:
226         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
227
228 .docbook.7:
229         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
230
231 .docbook.8:
232         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<