1# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 2# 3# SPDX-License-Identifier: MPL-2.0 4# 5# This Source Code Form is subject to the terms of the Mozilla Public 6# License, v. 2.0. If a copy of the MPL was not distributed with this 7# file, you can obtain one at https://mozilla.org/MPL/2.0/. 8# 9# See the COPYRIGHT file distributed with this work for additional 10# information regarding copyright ownership. 11 12srcdir = @srcdir@ 13VPATH = @srcdir@ 14top_srcdir = @top_srcdir@ 15top_builddir = @top_builddir@ 16 17PANDOC = @PANDOC@ 18W3M = @W3M@ 19 20VERSION=@BIND9_VERSION@ 21 22SUBDIRS = make lib fuzz bin doc 23TARGETS = 24PREREQS = bind.keys.h 25 26MANOBJS = README HISTORY OPTIONS CONTRIBUTING CODE_OF_CONDUCT 27 28@BIND9_MAKE_RULES@ 29 30newrr: 31 cd lib/dns; ${MAKE} newrr 32 33bind.keys.h: ${top_srcdir}/bind.keys ${srcdir}/util/bindkeys.pl 34 ${PERL} ${srcdir}/util/bindkeys.pl < ${top_srcdir}/bind.keys > $@ 35 36distclean:: 37 rm -f config.cache config.h config.log config.status TAGS 38 rm -f libtool configure.lineno 39 rm -f util/conf.sh docutil/docbook2man-wrapper.sh 40 41# XXX we should clean libtool stuff too. Only do this after we add rules 42# to make it. 43maintainer-clean:: 44 rm -f configure 45 rm -f bind.keys.h 46 47docclean manclean maintainer-clean:: 48 rm -f ${MANOBJS} 49 50doc man:: ${MANOBJS} 51 52installdirs: 53 $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sysconfdir} 54 55install:: installdirs 56 ${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir} 57 58uninstall:: 59 rm -f ${DESTDIR}${sysconfdir}/bind.keys 60 61test check: 62 @if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \ 63 echo I: NOTE: The tests were not run because they require that; \ 64 echo I: the IP addresses 10.53.0.1 through 10.53.0.8 are configured; \ 65 echo I: as alias addresses on the loopback interface. Please run; \ 66 echo I: \'bin/tests/system/ifconfig.sh up\' as root to configure; \ 67 echo I: them, then rerun the tests. Run make force-test to run the; \ 68 echo I: tests anyway.; \ 69 exit 1; \ 70 fi 71 ${MAKE} test-force 72 73force-test: test-force 74 75test-force: 76 status=0; \ 77 (cd fuzz && ${MAKE} check) || status=1; \ 78 (cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \ 79 (test -f ${top_builddir}/unit/unittest.sh && \ 80 $(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \ 81 exit $$status 82 83README: README.md 84 ${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \ 85 ${W3M} -dump -cols 75 -O ascii -T text/html | \ 86 sed -e '$${/^$$/d;}' > $@ 87 88HISTORY: HISTORY.md 89 ${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \ 90 ${W3M} -dump -cols 75 -O ascii -T text/html | \ 91 sed -e '$${/^$$/d;}' > $@ 92 93OPTIONS: OPTIONS.md 94 ${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \ 95 ${W3M} -dump -cols 75 -O ascii -T text/html | \ 96 sed -e '$${/^$$/d;}' > $@ 97 98CONTRIBUTING: CONTRIBUTING.md 99 ${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \ 100 ${W3M} -dump -cols 75 -O ascii -T text/html | \ 101 sed -e '$${/^$$/d;}' > $@ 102 103CODE_OF_CONDUCT: CODE_OF_CONDUCT.md 104 ${PANDOC} --email-obfuscation=none -s --metadata title="CODE OF CONDUCT" -f markdown-smart -t html CODE_OF_CONDUCT.md | \ 105 ${W3M} -dump -cols 75 -O ascii -T text/html | \ 106 sed -e '$${/^$$/d;}' > $@ 107 108unit:: 109 sh ${top_builddir}/unit/unittest.sh 110 111clean:: 112