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