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