Makefile revision 618
163N/A#
163N/A# CDDL HEADER START
163N/A#
163N/A# The contents of this file are subject to the terms of the
163N/A# Common Development and Distribution License (the "License").
163N/A# You may not use this file except in compliance with the License.
163N/A#
163N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
163N/A# or http://www.opensolaris.org/os/licensing.
163N/A# See the License for the specific language governing permissions
163N/A# and limitations under the License.
163N/A#
163N/A# When distributing Covered Code, include this CDDL HEADER in each
163N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
163N/A# If applicable, add the following below this CDDL HEADER, with the
163N/A# fields enclosed by brackets "[]" replaced with your own identifying
163N/A# information: Portions Copyright [yyyy] [name of copyright owner]
163N/A#
163N/A# CDDL HEADER END
163N/A#
163N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
163N/A#
3996N/Ainclude ../../make-rules/shared-macros.mk
163N/A
163N/ACOMPONENT_NAME= bind
3996N/ACOMPONENT_VERSION= 9.6-ESV-R5-P1
3996N/AIPS_COMPONENT_VERSION= 9.6.3.5.1
163N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
163N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
163N/ACOMPONENT_PROJECT_URL= http://www.isc.org/software/bind/
163N/A
211N/A# hash from: sha1sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha1:\1/'
1703N/ACOMPONENT_ARCHIVE_HASH= sha1:6d9873a66dda3ef43c1db9a1082ad428722f7d69
636N/ACOMPONENT_ARCHIVE_URL= \
211N/A http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
1703N/A
844N/Ainclude ../../make-rules/prep.mk
1703N/Ainclude ../../make-rules/configure.mk
618N/Ainclude ../../make-rules/ips.mk
1273N/A
163N/A# Build.
3661N/A#
3661N/A# FYI, The configure options are displayed by 'named -V'. Previously
3996N/A# that was overriden by setting CONFIGARGS to hide build server
3996N/A# pathnames.
3996N/A
163N/A# Traditionally all BIND executables are installed in sbin not bin.
163N/A# DNS libraries are in usr/lib/dns - Override settings from configure.mk
163N/ACONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/sbin
163N/ACONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib/dns
163N/A
163N/ACONFIGURE_OPTIONS += --with-libtool
163N/ACONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_BINDIR.$(BITS))
163N/ACONFIGURE_OPTIONS += --sysconfdir=/etc
163N/ACONFIGURE_OPTIONS += --localstatedir=/var
163N/ACONFIGURE_OPTIONS += --with-openssl
163N/ACONFIGURE_OPTIONS += --enable-threads=yes
163N/ACONFIGURE_OPTIONS += --enable-devpoll=yes
163N/ACONFIGURE_OPTIONS += --disable-openssl-version-check
163N/ACONFIGURE_OPTIONS += --enable-fixed-rrset
163N/ACONFIGURE_OPTIONS += --disable-getifaddrs
163N/ACONFIGURE_OPTIONS += --with-pkcs11
163N/A
163N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
163N/A# Configure will add "-mt" to CC which is already set in CFLAGS, so override.
163N/ACONFIGURE_OPTIONS += CC="$(CC)"
163N/A
163N/A.PHONY: build
163N/Abuild: $(BUILD_32)
163N/A
163N/Ainclude ../../make-rules/shared-targets.mk
163N/A
163N/A# Install.
163N/A#
163N/A# Currently manual pages are distributed from pkg:/system/manual@.
163N/A# While there are some changes in our manuals, for example section
211N/A# numbering and additions to named(1M) for SMF - that could be fixed
163N/A# by patch.
163N/A#
163N/A# In addition to BIND deliverables we also deliver SMF files and
163N/A# migration notes. There is no need to install these extras into the
163N/A# prototype directory, they are simply referenced in relevant manifest
211N/A# (p5m) file.
163N/A
163N/A.PHONY: install
163N/Ainstall: $(INSTALL_32)
163N/A
163N/A# Testing.
163N/A#
163N/A# sumarize nawk script; reads ISC output which is of the form:
163N/A# /^T:/ = Start of a test.
163N/A# /^I:/ = Info from a test; colleced for possible use later.
211N/A# /^A:/ = About: summary of the test - not used here.
1703N/A# /^R:/ = Result: If 'PASS' then continue, else print line and collected info.
163N/A# Known issues may then be accounted for.
163N/A# @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150
163N/A# if not 100% pass rate and issue is not known the word 'issues!' is appended
163N/A# to resulting string.
163N/Asummarize= '\
1703N/A /^T:/ {name=$$0;info="";}\
1703N/A /^I:/ {info=sprintf("%s%s\n", info, $$0);}\
1703N/A /^R:/ {test++; result[$$1]++;}\
1703N/A /^R:PASS/ {next;}\
1703N/A /^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\
1703N/A /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
1703N/A /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
1703N/A END{for (item in result)\
1703N/A printf("%s=%d ", item, result[item]);\
1703N/A printf("(known=%d) Total=%d%s\n", known, test, \
1703N/A ((result["R:PASS"] + known) < test)? \
1703N/A " issues!" : "");\
1703N/A }'
1703N/A
1703N/Aisc_ifconfig= ./bin/tests/system/ifconfig.sh
1703N/A
1703N/A.PHONY: test
1703N/Atest: build $(TEST_32)
1703N/A
1703N/A# fulltest requires sufficient privileges to configures IP addresses
1703N/A# 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface.
1703N/AFULL_TEST_32= $(TEST_32:%=%_FULL)
1703N/A
1703N/A.PHONY: fulltest
1703N/Afulltest: build $(FULL_TEST_32)
1703N/A
1703N/A$(FULL_TEST_32):
1703N/A cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) up
181N/A -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
163N/A cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) down
163N/A $(NAWK) $(summarize) $@
3996N/A
3996N/A$(TEST_32):
3996N/A -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
3996N/A $(NAWK) $(summarize) $@
3996N/A
3996N/A# test-summary shows summary for targets test and fulltest. Use target
3996N/A# test-clean to remove previous tests.
3996N/A.PHONY: test-summary
3996N/Atest-summary:
3996N/A @for file in $(TEST_32)*; do \
3996N/A if [ -f $$file ]; then \
echo 'Summary for' $$file;\
$(NAWK) $(summarize) $$file;\
fi;\
done
.PHONY: test-version
test-version:
@echo;echo 32 bit version
-LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.32) \
$(PROTO_DIR)$(CONFIGURE_BINDIR.32)/named -V
.PHONY: test-clean
test-clean:
$(RM) $(TEST_32) $(FULL_TEST_32)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk