Makefile.in 3.62 KB
Newer Older
1
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
Mark Andrews committed
2
#
3 4 5
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 7 8
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
Mark Andrews's avatar
Mark Andrews committed
9

Bob Halley's avatar
Bob Halley committed
10 11 12
srcdir =	@srcdir@
VPATH =		@srcdir@
top_srcdir =	@top_srcdir@
13
top_builddir =  @top_builddir@
Bob Halley's avatar
Bob Halley committed
14

15
VERSION=@BIND9_VERSION@
Bob Halley's avatar
Bob Halley committed
16

17
SUBDIRS =	make lib fuzz bin doc
Bob Halley's avatar
Bob Halley committed
18
TARGETS =
Evan Hunt's avatar
Evan Hunt committed
19
PREREQS =	bind.keys.h
Bob Halley's avatar
Bob Halley committed
20

21
MANOBJS =	README HISTORY OPTIONS CONTRIBUTING PLATFORMS CODE_OF_CONDUCT \
22
		${MANPAGES} ${HTMLPAGES}
23

Bob Halley's avatar
Bob Halley committed
24 25
@BIND9_MAKE_RULES@

26 27 28
newrr:
	cd lib/dns; ${MAKE} newrr

Evan Hunt's avatar
Evan Hunt committed
29 30 31
bind.keys.h: ${top_srcdir}/bind.keys ${srcdir}/util/bindkeys.pl
	${PERL} ${srcdir}/util/bindkeys.pl < ${top_srcdir}/bind.keys > $@

Bob Halley's avatar
Bob Halley committed
32
distclean::
33
	rm -f config.cache config.h config.log config.status TAGS
34
	rm -f libtool configure.lineno
35
	rm -f util/conf.sh docutil/docbook2man-wrapper.sh
Bob Halley's avatar
Bob Halley committed
36

37 38 39 40
# XXX we should clean libtool stuff too.  Only do this after we add rules
# to make it.
maintainer-clean::
	rm -f configure
Evan Hunt's avatar
Evan Hunt committed
41
	rm -f bind.keys.h
42

43 44 45 46 47
docclean manclean maintainer-clean::
	rm -f ${MANOBJS}

doc man:: ${MANOBJS}

48
installdirs:
49 50
	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} \
	${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir}
51
	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
52

53
install:: installdirs
Evan Hunt's avatar
Evan Hunt committed
54
	${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir}
Brian Wellington's avatar
Brian Wellington committed
55

Evan Hunt's avatar
Evan Hunt committed
56 57 58
uninstall::
	rm -f ${DESTDIR}${sysconfdir}/bind.keys

59
test check:
60
	@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \
61 62 63 64 65 66 67 68 69 70 71 72 73
	echo I: NOTE: The tests were not run because they require that; \
	echo I:	the IP addresses 10.53.0.1 through 10.53.0.8 are configured; \
	echo I:	as alias addresses on the loopback interface.  Please run; \
	echo I:	\'bin/tests/system/ifconfig.sh up\' as root to configure; \
	echo I:	them, then rerun the tests. Run make force-test to run the; \
	echo I:	tests anyway.; \
	exit 1; \
	fi
	${MAKE} test-force

force-test: test-force

test-force:
74
	status=0; \
75
	(cd fuzz && ${MAKE} check) || status=1; \
76
	(cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \
77 78
	(test -f ${top_builddir}/unit/unittest.sh && \
		$(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \
Mark Andrews's avatar
Mark Andrews committed
79
	exit $$status
80

81
README: README.md
82
	${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \
83 84
		${W3M} -dump -cols 75 -O ascii -T text/html | \
		sed -e '$${/^$$/d;}' > $@
85 86

HISTORY: HISTORY.md
87
	${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \
88 89
		${W3M} -dump -cols 75 -O ascii -T text/html | \
		sed -e '$${/^$$/d;}' > $@
90 91

OPTIONS: OPTIONS.md
92
	${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \
93 94
		${W3M} -dump -cols 75 -O ascii -T text/html | \
		sed -e '$${/^$$/d;}' > $@
95

Evan Hunt's avatar
Evan Hunt committed
96
CONTRIBUTING: CONTRIBUTING.md
97
	${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \
98 99
		${W3M} -dump -cols 75 -O ascii -T text/html | \
		sed -e '$${/^$$/d;}' > $@
Evan Hunt's avatar
Evan Hunt committed
100

101
PLATFORMS: PLATFORMS.md
102
	${PANDOC} --email-obfuscation=none -s --metadata title="PLATFORMS" -f markdown-smart -t html PLATFORMS.md | \
103 104 105
		${W3M} -dump -cols 75 -O ascii -T text/html | \
		sed -e '$${/^$$/d;}' > $@

106
CODE_OF_CONDUCT: CODE_OF_CONDUCT.md
Tinderbox User's avatar
Tinderbox User committed
107
	${PANDOC} --email-obfuscation=none -s --metadata title="CODE OF CONDUCT" -f markdown-smart -t html CODE_OF_CONDUCT.md | \
108 109 110
		${W3M} -dump -cols 75 -O ascii -T text/html | \
		sed -e '$${/^$$/d;}' > $@

111
unit::
112
	sh ${top_builddir}/unit/unittest.sh
113

114
clean::