Makefile revision 597
6ca0e6973c8176100f4a426444823ae5e777e28fsascha#
ce8d7a0627c0f246376cccd980463f8250a6a97ebjh# CDDL HEADER START
cb5d3f2f217d457dada4883addb1dc9f3f17bb85fielding#
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# The contents of this file are subject to the terms of the
6ded37e63424e43b00ca7c9055d355e071d6a444rbb# Common Development and Distribution License (the "License").
ce3da141a81ef0e22f46e496675f602e3c483b88rbb# You may not use this file except in compliance with the License.
5a65270617de7ed4d14b193fdd6deb2d4890e1a6jorton#
65d743d7fbb53143636ee2dec8fe8d8a1a581a6bjerenkrantz# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# or http://www.opensolaris.org/os/licensing.
56ab8639aed4d3b2f031d9c1160c5f40af01bdebjerenkrantz# See the License for the specific language governing permissions
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# and limitations under the License.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha#
87a87c1e1afc7eb004bc10594a9de98411866a20jerenkrantz# When distributing Covered Code, include this CDDL HEADER in each
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1b92a71f5cbda8da4aa13af1034aab30b85bcd99minfrin# If applicable, add the following below this CDDL HEADER, with the
1b92a71f5cbda8da4aa13af1034aab30b85bcd99minfrin# fields enclosed by brackets "[]" replaced with your own identifying
b20fd88fb62a14780223a39488dba735d3643fdcwrowe# information: Portions Copyright [yyyy] [name of copyright owner]
11fc305f8a8a1264c398d80a30983db92514e068jerenkrantz#
11fc305f8a8a1264c398d80a30983db92514e068jerenkrantz# CDDL HEADER END
cb5d3f2f217d457dada4883addb1dc9f3f17bb85fielding#
8f9e3d3dc602155a189ed2f30ad4707af56a8368striker# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
ab86c68ce36c715e93f403dde41d0b9c1522c8b0sf#
88ecd979f1112454432371f55a1420240fae3743trawickinclude ../../make-rules/shared-macros.mk
ad1400ab704db9a0d0813670b183a699cea77333jorton
cac72a53f6327cd144ce5b26ce753f7a7ceb85a7jimCOMPONENT_NAME= bind
1fb1fa8713de956400293b715f191ae8675bfaf1fieldingCOMPONENT_VERSION= 9.6-ESV-R5-P1
1fb1fa8713de956400293b715f191ae8675bfaf1fieldingIPS_COMPONENT_VERSION= 9.6.3.5.1
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
1ddf25b77b03f7f4fd7a7676b62755da90cd3e0crbbCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
2795c373a9fb112dc77576c1dfc23119f02d598amanojCOMPONENT_PROJECT_URL= "http://www.isc.org/software/bind"
6ca0e6973c8176100f4a426444823ae5e777e28fsascha
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# hash from: sha1sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha1:\1/'
aa01f2bd8a4fc8a417b77d6fab108174f9ee1458jortonCOMPONENT_ARCHIVE_HASH= sha1:6d9873a66dda3ef43c1db9a1082ad428722f7d69
aa01f2bd8a4fc8a417b77d6fab108174f9ee1458jortonCOMPONENT_ARCHIVE_URL= \
aa01f2bd8a4fc8a417b77d6fab108174f9ee1458jorton http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
aa01f2bd8a4fc8a417b77d6fab108174f9ee1458jorton
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregamesinclude ../../make-rules/prep.mk
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregamesinclude ../../make-rules/configure.mk
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregamesinclude ../../make-rules/ips.mk
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregames
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregames# Build.
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregames#
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregames# FYI, The configure options are displayed by 'named -V'. Previously
e34761145134f5cfce7821fb60a06ec82b3b9650rjung# that was overriden by setting CONFIGARGS to hide build server
8e5d996e323397bbcc56710e856475911930a93bjerenkrantz# pathnames.
92c4ce31c526bc9e6272bc1157b496132c13d848rbb
92c4ce31c526bc9e6272bc1157b496132c13d848rbb# Traditionally all BIND executables are installed in sbin not bin.
92c4ce31c526bc9e6272bc1157b496132c13d848rbb# DNS libraries are in usr/lib/dns - Override settings from configure.mk
92c4ce31c526bc9e6272bc1157b496132c13d848rbbCONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/sbin
92c4ce31c526bc9e6272bc1157b496132c13d848rbbCONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib/dns
9ed3fee22fa1888a70ac42b7b6b8ea475fad0a6dfuankg
92c4ce31c526bc9e6272bc1157b496132c13d848rbbCONFIGURE_OPTIONS += --with-libtool
92c4ce31c526bc9e6272bc1157b496132c13d848rbbCONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_BINDIR.$(BITS))
92c4ce31c526bc9e6272bc1157b496132c13d848rbbCONFIGURE_OPTIONS += --sysconfdir=/etc
92c4ce31c526bc9e6272bc1157b496132c13d848rbbCONFIGURE_OPTIONS += --localstatedir=/var
92c4ce31c526bc9e6272bc1157b496132c13d848rbbCONFIGURE_OPTIONS += --with-openssl
92c4ce31c526bc9e6272bc1157b496132c13d848rbbCONFIGURE_OPTIONS += --enable-threads=yes
9ed3fee22fa1888a70ac42b7b6b8ea475fad0a6dfuankgCONFIGURE_OPTIONS += --enable-devpoll=yes
92c4ce31c526bc9e6272bc1157b496132c13d848rbbCONFIGURE_OPTIONS += --disable-openssl-version-check
92c4ce31c526bc9e6272bc1157b496132c13d848rbbCONFIGURE_OPTIONS += --enable-fixed-rrset
2b1f314755d8bf35d3e734339c8363c1cb57b3a3rjungCONFIGURE_OPTIONS += --disable-getifaddrs
2b1f314755d8bf35d3e734339c8363c1cb57b3a3rjungCONFIGURE_OPTIONS += --with-pkcs11
2b1f314755d8bf35d3e734339c8363c1cb57b3a3rjung
2b1f314755d8bf35d3e734339c8363c1cb57b3a3rjungCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
2b1f314755d8bf35d3e734339c8363c1cb57b3a3rjung# Configure will add "-mt" to CC which is already set in CFLAGS, so override.
2b1f314755d8bf35d3e734339c8363c1cb57b3a3rjungCONFIGURE_OPTIONS += CC="$(CC)"
2b1f314755d8bf35d3e734339c8363c1cb57b3a3rjung
2b1f314755d8bf35d3e734339c8363c1cb57b3a3rjung.PHONY: build
2b1f314755d8bf35d3e734339c8363c1cb57b3a3rjungbuild: $(BUILD_32)
2b1f314755d8bf35d3e734339c8363c1cb57b3a3rjung
92c4ce31c526bc9e6272bc1157b496132c13d848rbbinclude ../../make-rules/shared-targets.mk
92c4ce31c526bc9e6272bc1157b496132c13d848rbb
dc12feb05fcd9f7afbe6c5d830898f028370cafbsf# Install.
fb333f30ae01a1f14b2afaa8a92c99192abf883erjung#
0a2212da6843659e65c378c5201e6612be625731sf# Currently manual pages are distributed from pkg:/system/manual@.
fb333f30ae01a1f14b2afaa8a92c99192abf883erjung# While there are some changes in our manuals, for example section
0a2212da6843659e65c378c5201e6612be625731sf# numbering and additions to named(1M) for SMF - that could be fixed
fb333f30ae01a1f14b2afaa8a92c99192abf883erjung# by patch.
fb333f30ae01a1f14b2afaa8a92c99192abf883erjung#
fb333f30ae01a1f14b2afaa8a92c99192abf883erjung# In addition to BIND deliverables we also deliver SMF files and
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung# migration notes. There is no need to install these extras into the
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung# prototype directory, they are simply referenced in relevant manifest
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung# (p5m) file.
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung.PHONY: install
c9e0a2dddde6e561c529fa5ac3c384c136781570rjunginstall: $(INSTALL_32)
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung# Testing.
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung#
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung# sumarize nawk script; reads ISC output which is of the form:
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung# /^T:/ = Start of a test.
c9e0a2dddde6e561c529fa5ac3c384c136781570rjung# /^I:/ = Info from a test; colleced for possible use later.
92c4ce31c526bc9e6272bc1157b496132c13d848rbb# /^A:/ = About: summary of the test - not used here.
92c4ce31c526bc9e6272bc1157b496132c13d848rbb# /^R:/ = Result: If 'PASS' then continue, else print line and collected info.
92c4ce31c526bc9e6272bc1157b496132c13d848rbb# Known issues may then be accounted for.
92c4ce31c526bc9e6272bc1157b496132c13d848rbb# @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150
92c4ce31c526bc9e6272bc1157b496132c13d848rbb# if not 100% pass rate and issue is not known the word 'issues!' is appended
9ed3fee22fa1888a70ac42b7b6b8ea475fad0a6dfuankg# to resulting string.
92c4ce31c526bc9e6272bc1157b496132c13d848rbbsummarize= '\
92c4ce31c526bc9e6272bc1157b496132c13d848rbb /^T:/ {name=$$0;info="";}\
945a9b081610f2b57759231e4cfad7aed62c9326slive /^I:/ {info=sprintf("%s%s\n", info, $$0);}\
945a9b081610f2b57759231e4cfad7aed62c9326slive /^R:/ {test++; result[$$1]++;}\
8e5d996e323397bbcc56710e856475911930a93bjerenkrantz /^R:PASS/ {next;}\
945a9b081610f2b57759231e4cfad7aed62c9326slive /^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\
945a9b081610f2b57759231e4cfad7aed62c9326slive /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
92c4ce31c526bc9e6272bc1157b496132c13d848rbb /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
d15c3a0e8c77973008a6357eef9e87eae3c0137aslive END{for (item in result)\
945a9b081610f2b57759231e4cfad7aed62c9326slive printf("%s=%d ", item, result[item]);\
92c4ce31c526bc9e6272bc1157b496132c13d848rbb printf("(known=%d) Total=%d%s\n", known, test, \
8e5d996e323397bbcc56710e856475911930a93bjerenkrantz ((result["R:PASS"] + known) < test)? \
92c4ce31c526bc9e6272bc1157b496132c13d848rbb " issues!" : "");\
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregames }'
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregames
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregamesisc_ifconfig= ./bin/tests/system/ifconfig.sh
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregames
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregames.PHONY: test
49f79e02c1ca9aaf51f0c1fb06eeb1aa72cb1843gregamestest: build $(TEST_32)
d472f67198d6b15dd1270136f180cca9c9263243trawick
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# fulltest requires sufficient privileges to configures IP addresses
51b88347f3bdf1a6b561aa7bbf18148459976e8ejorton# 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface.
51b88347f3bdf1a6b561aa7bbf18148459976e8ejortonFULL_TEST_32= $(TEST_32:%=%_FULL)
51b88347f3bdf1a6b561aa7bbf18148459976e8ejorton
51b88347f3bdf1a6b561aa7bbf18148459976e8ejorton.PHONY: fulltest
51b88347f3bdf1a6b561aa7bbf18148459976e8ejortonfulltest: build $(FULL_TEST_32)
1acdb106aad7f32757afa07281b80e292229c3a8sf
1acdb106aad7f32757afa07281b80e292229c3a8sf$(FULL_TEST_32):
1acdb106aad7f32757afa07281b80e292229c3a8sf cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) up
1acdb106aad7f32757afa07281b80e292229c3a8sf -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
1acdb106aad7f32757afa07281b80e292229c3a8sf cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) down
1acdb106aad7f32757afa07281b80e292229c3a8sf $(NAWK) $(summarize) $@
1acdb106aad7f32757afa07281b80e292229c3a8sf
1acdb106aad7f32757afa07281b80e292229c3a8sf$(TEST_32):
51b88347f3bdf1a6b561aa7bbf18148459976e8ejorton -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
51b88347f3bdf1a6b561aa7bbf18148459976e8ejorton $(NAWK) $(summarize) $@
4cbb3bcf66a6788196bcc7244e4e36705acfbb57rbb
ef0665105781ee79245fd5014fbc8569730c47a9rbb# test-summary shows summary for targets test and fulltest. Use target
de2aecd8da21eeae4394088cca196dfcb491de84rbb# test-clean to remove previous tests.
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquerna.PHONY: test-summary
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquernatest-summary:
294204c69c5ad7a76406907d780b01d80ea00d8cpquerna @for file in $(TEST_32)*; do \
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquerna if [ -f $$file ]; then \
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquerna echo 'Summary for' $$file;\
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquerna $(NAWK) $(summarize) $$file;\
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquerna fi;\
26d4668b602c703d63655271b1caaa420bf7a572rbb done
bd7ee7eef7ad1988ff4d11aca3b0f9fc7beb4d97sf
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquerna.PHONY: test-version
bd7ee7eef7ad1988ff4d11aca3b0f9fc7beb4d97sftest-version:
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquerna @echo;echo 32 bit version
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquerna -LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.32) \
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquerna $(PROTO_DIR)$(CONFIGURE_BINDIR.32)/named -V
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquerna
26d4668b602c703d63655271b1caaa420bf7a572rbb.PHONY: test-clean
f03dbdf787054ac7bb3ba5aa78c654e4c1b113d2pquernatest-clean:
ef0665105781ee79245fd5014fbc8569730c47a9rbb $(RM) $(TEST_32) $(FULL_TEST_32)
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
92c4ce31c526bc9e6272bc1157b496132c13d848rbb
92c4ce31c526bc9e6272bc1157b496132c13d848rbbinclude ../../make-rules/depend.mk
92c4ce31c526bc9e6272bc1157b496132c13d848rbb