usr/src/cmd/bind/Makefile.sfw
author Cyril Plisko <cyril.plisko@grigale.com>
Sun, 09 May 2010 20:32:17 -0700
changeset 13 971008b98b79
parent 5 d07534556b03
child 42 b6f829cb6d9e
permissions -rw-r--r--
Import sfw build 139 Bugs Fixed ---------- 6839908 dlopen(pkcs11_kernel) and calling C_Initialize makes pkcs11 engine enter infinite loop 6937593 Upgrade LCMS to 1.19 6944247 getifaddrs in 137 breaks sfw build
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     1
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     2
# CDDL HEADER START
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     3
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     7
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    11
# and limitations under the License.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    12
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    18
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    19
# CDDL HEADER END
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    20
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    21
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    22
#
13
971008b98b79 Import sfw build 139
Cyril Plisko <cyril.plisko@grigale.com>
parents: 5
diff changeset
    23
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    24
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    25
13
971008b98b79 Import sfw build 139
Cyril Plisko <cyril.plisko@grigale.com>
parents: 5
diff changeset
    26
#pragma ident	"@(#)Makefile.sfw	1.23	10/04/15 SMI"
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    27
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    28
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    29
VER =		$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    30
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    31
TARBALL =	$(VER).tar.gz
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    32
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    33
#
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    34
# Environment settings.
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    35
#
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    36
TARGET_ENV =	CC="$(CC)" CXX="$(CCC)"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    37
TARGET_ENV +=	PATH="$(SFW_PATH)"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    38
TARGET_ENV +=	LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    39
TARGET_ENV +=	LDFLAGS="-L$(ROOTLIB)/dns"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    40
TARGET_ENV +=   MAKE="$(CCSMAKE)"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    41
$(VER)/config.status:= \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    42
	TARGET_ENV += LD_LIBRARY_PATH="$(CFGLIB)/dns"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    43
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    44
# Ideally no patches should be required, where they are needed for a
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    45
# release they should be incorporated or obsoleted in the next ISC
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    46
# release.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    47
#
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    48
PATCHES:sh=	test -f Patches/*.patch && echo Patches/*.patch || echo ${VER}
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    49
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    50
include ../Makefile.cmd
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    51
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    52
# the ISC tarball is not /usr/bin/tar-friendly
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    53
$(VER)/.patched:= UNPACKARCHIVE=$(GTAR) xfz
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    54
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    55
# CONFIGARGS is printed by 'named -V' and logged at startup too.
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    56
all: $(VER)/config.status
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    57
	(cd $(VER); pwd;\
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    58
	    env - $(TARGET_ENV) $(CCSMAKE) -e \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    59
	    CONFIGARGS='$(CONFIGURE_OPTIONS)')
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    60
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    61
#
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    62
# test & fulltest.  The latter configures IP addresses.
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    63
#
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    64
config_ip=$(POUND_SIGN)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    65
fulltest := config_ip = cd $(VER); $(SHELL) ./bin/tests/system/ifconfig.sh
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    66
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    67
test fulltest: all
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    68
	-$(config_ip) up
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    69
	-(cd $(VER); pwd; env \
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    70
	    PATH=$(SFW_PATH) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    71
	    MAKE=$(CCSMAKE) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    72
	    $(CCSMAKE) -e test)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    73
	-$(config_ip) down
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    74
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    75
#
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    76
# Install binaries included in package into ROOT
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    77
#
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    78
install: all
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    79
	$(SH) ./install-bind $(VER)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    80
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    81
CONFIGURE_OPTIONS +=	--with-libtool
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    82
CONFIGURE_OPTIONS +=	--bindir=$(CFGBIN)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    83
CONFIGURE_OPTIONS +=	--sbindir=$(CFGUSRSBIN)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    84
CONFIGURE_OPTIONS +=	--libdir="$(CFGLIB)/dns"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    85
CONFIGURE_OPTIONS +=	--sysconfdir="/etc"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    86
CONFIGURE_OPTIONS +=	--localstatedir="/var"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    87
CONFIGURE_OPTIONS +=	--with-openssl
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    88
CONFIGURE_OPTIONS +=	--enable-threads=yes
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    89
CONFIGURE_OPTIONS +=	--enable-devpoll=yes
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    90
CONFIGURE_OPTIONS +=	--disable-openssl-version-check
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    91
CONFIGURE_OPTIONS +=	--enable-fixed-rrset
13
971008b98b79 Import sfw build 139
Cyril Plisko <cyril.plisko@grigale.com>
parents: 5
diff changeset
    92
CONFIGURE_OPTIONS +=	--disable-getifaddrs
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    93
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    94
# Configure BIND ready for compilation.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    95
# The openssl version check is disabled as we rely on dynamic SSL library
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    96
# which is independent of BIND.
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    97
$(VER)/config.status: $(VER)/$(SFW_STAMP_PATCHED)
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    98
	(cd $(VER); pwd; env - $(TARGET_ENV) \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    99
		$(SHELL) ./configure $(CONFIGURE_OPTIONS) )
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   100
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   101
clean:
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   102
	-$(RM) -r ${VER}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   103
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   104
prog=	dig dnssec-dsfromkey dnssec-keyfromlabel dnssec-keygen dnssec-signzone \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   105
	host in.named named named-checkconf named-checkzone ndc nslookup \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   106
	nsupdate rndc rndc-confgen
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   107
lib=	libisc libisccc libdns libisccfg liblwres libbind9
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   108
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   109
CLOBBERFILES=$(prog:%=$(ROOT)/usr/sbin/%) $(lib:%=$(ROOT)/usr/lib/dns/%.*)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   110
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   111
include ../Makefile.targ
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   112
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   113
FRC: