1 # Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
2 # Copyright (C) 1998-2003 Internet Software Consortium.
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.
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.
16 # $Id: rules.in,v 1.64.130.2 2009/01/10 23:46:57 tbox Exp $
19 ### Common Makefile rules for BIND 9.
25 ### Note: paths that vary by Makefile MUST NOT be listed
26 ### here, or they won't get expanded correctly.
29 exec_prefix = @exec_prefix@
32 includedir = @includedir@
34 sysconfdir = @sysconfdir@
35 localstatedir = @localstatedir@
37 datarootdir = @datarootdir@
43 top_builddir = @BIND9_TOP_BUILDDIR@
48 ### Makefile may define:
51 all: subdirs ${TARGETS}
56 ### Makefile may define:
59 ALL_SUBDIRS = ${SUBDIRS} nulldir
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.
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; \
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; \
87 ### Makefile must define
89 ### Makefile may define
95 ### User may define externally
101 STD_CINCLUDES = @STD_CINCLUDES@
102 STD_CDEFINES = @STD_CDEFINES@
103 STD_CWARNINGS = @STD_CWARNINGS@
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@
114 ALWAYS_INCLUDES = -I${top_builddir}
115 ALWAYS_DEFINES = @ALWAYS_DEFINES@
119 ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \
120 ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES}
122 ALL_CFLAGS = ${EXT_CFLAGS} ${ALL_CPPFLAGS} ${CFLAGS} \
123 ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
126 ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
130 LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@
131 LIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@
132 LIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@
135 MKDEP = ${SHELL} ${top_builddir}/make/mkdep
138 superclean: maintainer-clean
140 clean distclean maintainer-clean::
141 rm -f *.@O@ *.o *.lo *.la core *.core .depend
144 distclean maintainer-clean::
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; \
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}; \
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}; \
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}; \
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}; \
177 elif [ X"${SRCS}" != X ] ; then \
178 echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
179 ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
181 elif [ X"${PSRCS}" != X ] ; then \
182 echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
183 ${MKDEP} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
203 INSTALL_PROGRAM = @INSTALL_PROGRAM@
204 LINK_PROGRAM = @LN_S@
205 INSTALL_SCRIPT = @INSTALL_SCRIPT@
206 INSTALL_DATA = @INSTALL_DATA@
209 ### Programs used when generating documentation. It's ok for these
210 ### not to exist when not generating documentation.
213 XSLTPROC = @XSLTPROC@ --novalid --xinclude --nonet
216 PDFLATEX = @PDFLATEX@
221 ### DocBook -> man page
224 .SUFFIXES: .docbook .html .1 .2 .3 .4 .5 .6 .7 .8
227 ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-docbook-html.xsl $<
230 ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
233 ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
236 ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
239 ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
242 ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
245 ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
248 ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
251 ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<