Makefile revision 597
0N/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#
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#
873N/A# CDDL HEADER END
0N/A#
0N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
0N/A#
0N/Ainclude ../../make-rules/shared-macros.mk
0N/A
868N/ACOMPONENT_NAME= bind
0N/ACOMPONENT_VERSION= 9.6-ESV-R5-P1
0N/AIPS_COMPONENT_VERSION= 9.6.3.5.1
0N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
0N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
0N/ACOMPONENT_PROJECT_URL= "http://www.isc.org/software/bind"
604N/A
1787N/A# hash from: sha1sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha1:\1/'
604N/ACOMPONENT_ARCHIVE_HASH= sha1:6d9873a66dda3ef43c1db9a1082ad428722f7d69
604N/ACOMPONENT_ARCHIVE_URL= \
0N/A http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
0N/A
1089N/Ainclude ../../make-rules/prep.mk
338N/Ainclude ../../make-rules/configure.mk
1089N/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
1089N/A# Traditionally all BIND executables are installed in sbin not bin.
1089N/A# DNS libraries are in usr/lib/dns - Override settings from configure.mk
1089N/ACONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/sbin
0N/ACONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib/dns
1089N/A
1089N/ACONFIGURE_OPTIONS += --with-libtool
0N/ACONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_BINDIR.$(BITS))
1089N/ACONFIGURE_OPTIONS += --sysconfdir=/etc
1089N/ACONFIGURE_OPTIONS += --localstatedir=/var
1089N/ACONFIGURE_OPTIONS += --with-openssl
1089N/ACONFIGURE_OPTIONS += --enable-threads=yes
1089N/ACONFIGURE_OPTIONS += --enable-devpoll=yes
0N/ACONFIGURE_OPTIONS += --disable-openssl-version-check
1177N/ACONFIGURE_OPTIONS += --enable-fixed-rrset
1177N/ACONFIGURE_OPTIONS += --disable-getifaddrs
1089N/ACONFIGURE_OPTIONS += --with-pkcs11
1089N/A
1089N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
1089N/A# Configure will add "-mt" to CC which is already set in CFLAGS, so override.
1089N/ACONFIGURE_OPTIONS += CC="$(CC)"
604N/A
604N/A.PHONY: build
604N/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@.
1089N/A# While there are some changes in our manuals, for example section
1089N/A# numbering and additions to named(1M) for SMF - that could be fixed
1089N/A# by patch.
0N/A#
0N/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
0N/A# prototype directory, they are simply referenced in relevant manifest
0N/A# (p5m) file.
0N/A
0N/A.PHONY: install
0N/Ainstall: $(INSTALL_32)
0N/A
0N/A# Testing.
1177N/A#
0N/A# sumarize nawk script; reads ISC output which is of the form:
0N/A# /^T:/ = Start of a test.
0N/A# /^I:/ = Info from a test; colleced for possible use later.
0N/A# /^A:/ = About: summary of the test - not used here.
0N/A# /^R:/ = Result: If 'PASS' then continue, else print line and collected info.
1787N/A# Known issues may then be accounted for.
1787N/A# @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150
1787N/A# if not 100% pass rate and issue is not known the word 'issues!' is appended
1787N/A# to resulting string.
1787N/Asummarize= '\
1787N/A /^T:/ {name=$$0;info="";}\
1787N/A /^I:/ {info=sprintf("%s%s\n", info, $$0);}\
1787N/A /^R:/ {test++; result[$$1]++;}\
1787N/A /^R:PASS/ {next;}\
1787N/A /^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\
1787N/A /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
1787N/A /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
1787N/A END{for (item in result)\
1787N/A printf("%s=%d ", item, result[item]);\
1787N/A printf("(known=%d) Total=%d%s\n", known, test, \
1787N/A ((result["R:PASS"] + known) < test)? \
1787N/A " issues!" : "");\
1787N/A }'
1787N/A
1787N/Aisc_ifconfig= ./bin/tests/system/ifconfig.sh
1787N/A
1787N/A.PHONY: test
1787N/Atest: build $(TEST_32)
1787N/A
1787N/A# fulltest requires sufficient privileges to configures IP addresses
1787N/A# 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface.
1787N/AFULL_TEST_32= $(TEST_32:%=%_FULL)
1787N/A
1787N/A.PHONY: fulltest
1787N/Afulltest: build $(FULL_TEST_32)
1787N/A
1787N/A$(FULL_TEST_32):
1787N/A cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) up
1787N/A -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
1787N/A cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) down
0N/A $(NAWK) $(summarize) $@
0N/A
0N/A$(TEST_32):
0N/A -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
0N/A $(NAWK) $(summarize) $@
0N/A
0N/A# test-summary shows summary for targets test and fulltest. Use target
0N/A# test-clean to remove previous tests.
0N/A.PHONY: test-summary
0N/Atest-summary:
0N/A @for file in $(TEST_32)*; do \
0N/A if [ -f $$file ]; then \
0N/A echo 'Summary for' $$file;\
0N/A $(NAWK) $(summarize) $$file;\
0N/A fi;\
0N/A done
0N/A
604N/A.PHONY: test-version
604N/Atest-version:
604N/A @echo;echo 32 bit version
604N/A -LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.32) \
604N/A $(PROTO_DIR)$(CONFIGURE_BINDIR.32)/named -V
604N/A
604N/A.PHONY: test-clean
604N/Atest-clean:
604N/A $(RM) $(TEST_32) $(FULL_TEST_32)
604N/A
604N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
604N/A
604N/Ainclude ../../make-rules/depend.mk
604N/A