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