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