Makefile revision 5666
a8133e4ee2e0976f58843de1ceb1cf5307d7b39dJazzyNico#
a8133e4ee2e0976f58843de1ceb1cf5307d7b39dJazzyNico# CDDL HEADER START
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico#
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# The contents of this file are subject to the terms of the
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Common Development and Distribution License (the "License").
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# You may not use this file except in compliance with the License.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico#
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# or http://www.opensolaris.org/os/licensing.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# See the License for the specific language governing permissions
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# and limitations under the License.
74fc0c3d8dc530b9b2a482291a8eea09bbfeb89bJazzyNico#
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# When distributing Covered Code, include this CDDL HEADER in each
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# If applicable, add the following below this CDDL HEADER, with the
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# fields enclosed by brackets "[]" replaced with your own identifying
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# information: Portions Copyright [yyyy] [name of copyright owner]
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico#
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# CDDL HEADER END
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico#
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico#
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoinclude ../../make-rules/shared-macros.mk
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCOMPONENT_NAME= bind
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCOMPONENT_VERSION= 9.6-ESV-R11
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoHUMAN_VERSION= $(COMPONENT_VERSION)-P6
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoIPS_COMPONENT_VERSION= 9.6.3.11.6
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCOMPONENT_PROJECT_URL= http://www.isc.org/software/bind/
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# hash from: sha256sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha256:\1/'
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCOMPONENT_ARCHIVE_HASH= \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico sha256:4f052195a62218c05a05033774452e6a9e329b865c01e594cc20a6adf11e0d0f
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCOMPONENT_ARCHIVE_URL= \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
74fc0c3d8dc530b9b2a482291a8eea09bbfeb89bJazzyNicoCOMPONENT_BUGDB= service/dns-server
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoTPNO= 25905
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoinclude $(WS_MAKE_RULES)/prep.mk
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoinclude $(WS_MAKE_RULES)/configure.mk
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoinclude $(WS_MAKE_RULES)/ips.mk
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Specify "configure" options and features.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# FYI, The configure options are displayed by 'named -V'.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --enable-full-report
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# - Build dynamic libraries, static libraries are not shipped.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --with-libtool
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# - Use openssl, but don't check version as that is also delivered dynamically.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --with-openssl
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --disable-openssl-version-check
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --with-pkcs11
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# - Use xml2-config found uder /usr without checking its version.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --with-libxml2=/usr
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --enable-threads=yes
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --enable-devpoll=yes
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# - Enabled fixed [order] resource-record sets for backward compatibility.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# - Requires more memory to store the sets so is not the default.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --enable-fixed-rrset
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Override / set specific pathnames:
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# - DNS libraries are in usr/lib/dns - Override settings from configure.mk
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib/dns
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib/dns/$(MACH64)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# - Traditionally all BIND executables are installed in sbin not bin.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_BINDIR.32 = $(CONFIGURE_SBINDIR.32)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_BINDIR.64 = $(CONFIGURE_SBINDIR.32)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_SBINDIR.64 = $(CONFIGURE_SBINDIR.32)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --sysconfdir=/etc
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --localstatedir=/var
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += --with-randomdev=/dev/random
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Compiler and compiler options:
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# - configure will add "-mt" to CC which is already set in CFLAGS, so override.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += CC="$(CC)"
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
77a152f8912230071e8b059ca52531ba68f1df4fJazzyNico# Enable ASLR for this component
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoASLR_MODE = $(ASLR_ENABLE)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Test configuration / helper targets:
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCOMPONENT_TEST_MASTER = \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
74fc0c3d8dc530b9b2a482291a8eea09bbfeb89bJazzyNico
948abf72ab16236877921920a32b6b7f77ed8b48JazzyNico# Run BIND testing without test interfaces configured (limited testing).
05599a3f1fae49d54a2102c41c31271a158410deJazzyNicoCOMPONENT_TEST_TARGETS = force-test
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# Normalise results for comparison:
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# Remove Date and time from Start and End lines.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCOMPONENT_TEST_TRANSFORMS += '-e "s|\(^[SE]:[^:]*:\).*|\1|"'
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Remove task Information lines as order of that output has been seen to change.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoCOMPONENT_TEST_TRANSFORMS += '-e "/^I:/d"'
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Uncomment to display summary of tests at completion.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# COMPONENT_POST_TEST_ACTION = $(NAWK) $(summarize) $(COMPONENT_TEST_OUTPUT)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico.PHONY: test-named-version test-summary test-clean
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# summarize is a nawk script:
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# consumes the output generated by ISC's make target and provides an
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# abridged summary. It works by looking for key elements:
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# /^T:/ = Start of a test.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# /^I:/ = Info from a test; collected for possible use later.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# /^A:/ = About: summary of the test - not used here.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# /^S:/ = Start: pathname and date time - not used here.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# /^E:/ = End: pathname and date time - not used here.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# /^R:/ = Result:
948abf72ab16236877921920a32b6b7f77ed8b48JazzyNico# When 'PASS' and report=1 (from command line) the result and
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# test name are displayed.
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# For all other results (failures) the result, test name and
948abf72ab16236877921920a32b6b7f77ed8b48JazzyNico# other collected info is displayed.
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# Known issues may be accounted for by adding tests, for example:
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
948abf72ab16236877921920a32b6b7f77ed8b48JazzyNico# Though with USERLAND automated test comparison the known
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# case is kind of obsolete now.
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# @ EOF = Display count of RESULTS:
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# i.e. R:PASS=124 R:UNTESTED=26 Total=150 if not 100% pass rate and
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# issue is not accounted for (known) the test 'issues!' is appended to
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico# resulting output.
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico#
05599a3f1fae49d54a2102c41c31271a158410deJazzyNicosummarize= '\
05599a3f1fae49d54a2102c41c31271a158410deJazzyNico /^T:/ {name=$$0;info="";}\
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico /^I:/ {info=sprintf("%s%s\n", info, $$0);}\
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico /^R:/ {test++; result[$$1]++;}\
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico /^R:PASS/ { if (report) printf("%s: %s\n", $$1, name); next}\
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico /^R:UNRESOLVED/ && name ~ /^T:dst:2:A/ {known++;}\
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico /^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico END{for (item in result)\
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico printf("%s=%d ", item, result[item]);\
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico printf("(known=%d) Total=%d%s\n", known, test, \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico ((result["R:PASS"] + known) < test)? \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico " issues!" : "");\
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico }'
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico#
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# COMPONENT_TEST_OUTPUT is dependent on BITS which is set depending on
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# the active build target and PYTHON_VERS!, so it's overridden here too for test-summary:
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicotest-summary: BITS=64
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicotest-summary:
77a152f8912230071e8b059ca52531ba68f1df4fJazzyNico @echo Summary of $(COMPONENT_TEST_OUTPUT)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico @$(NAWK) $(summarize) $(COMPONENT_TEST_OUTPUT)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicotest-named-version: install
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico @if [ -e $(PROTO_DIR)$(CONFIGURE_SBINDIR.64)/named ]; then \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico echo '64bit version:'; \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico file $(PROTO_DIR)$(CONFIGURE_SBINDIR.64)/named; \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.64) \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico $(PROTO_DIR)$(CONFIGURE_SBINDIR.64)/named -V; \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico else \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico echo '64bit version not found.'; \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico fi;
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico @if [ -e $(PROTO_DIR)$(CONFIGURE_SBINDIR.32)/named ]; then \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico echo '32bit version:'; \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico file $(PROTO_DIR)$(CONFIGURE_SBINDIR.32)/named; \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.32) \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico $(PROTO_DIR)$(CONFIGURE_SBINDIR.32)/named -V; \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico else \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico echo '32bit version not found.'; \
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico fi;
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicotest-clean:
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico $(RM) $(TEST_32_and_64)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Common Command line targets
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico.PHONY: configure build install test system-test
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoconfigure: $(CONFIGURE_64)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicobuild: $(BUILD_64)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoinstall: $(INSTALL_64)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicotest: $(TEST_64)
f242e851e24646e42997bbe75f51a1071c400c0fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicosystem-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Package dependencies
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico# Created by 'gmake REQUIRED_PACKAGES', manually verified.
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoREQUIRED_PACKAGES += library/libxml2
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoREQUIRED_PACKAGES += library/security/openssl
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoREQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoREQUIRED_PACKAGES += network/dns/bind
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoREQUIRED_PACKAGES += shell/ksh93
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoREQUIRED_PACKAGES += system/core-os
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNicoREQUIRED_PACKAGES += system/library
9e3b6792b460462df5459a2a26e5df2d81918c2fJazzyNico