author | Jon Tibble <meths@btinternet.com> |
Mon, 04 May 2015 14:04:39 +0100 | |
branch | oi_151a |
changeset 254 | 9c2a4ac793f0 |
parent 42 | b6f829cb6d9e |
child 54 | c8df60226931 |
permissions | -rw-r--r-- |
0 | 1 |
# |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
5 |
# Common Development and Distribution License (the "License"). |
|
6 |
# You may not use this file except in compliance with the License. |
|
7 |
# |
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 |
# or http://www.opensolaris.org/os/licensing. |
|
10 |
# See the License for the specific language governing permissions |
|
11 |
# and limitations under the License. |
|
12 |
# |
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
|
21 |
||
22 |
# |
|
13 | 23 |
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 24 |
# |
25 |
||
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
26 |
#pragma ident "@(#)Makefile.sfw 1.24 10/08/04 SMI" |
0 | 27 |
# |
28 |
||
29 |
VER = $(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh) |
|
30 |
||
31 |
TARBALL = $(VER).tar.gz |
|
32 |
||
5 | 33 |
# Environment settings. |
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
34 |
CONFIGURE_ENV = CC='$(CC)' CXX='$(CCC)' |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
35 |
CONFIGURE_ENV += PATH='$(SFW_PATH)' |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
36 |
CONFIGURE_ENV += LD_OPTIONS='-M $(SRC)/cmd/mapfile_noexstk' |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
37 |
CONFIGURE_ENV += LDFLAGS='-L$(ROOTLIB)/dns' |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
38 |
CONFIGURE_ENV += MAKE='$(CCSMAKE)' |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
39 |
CONFIGURE_ENV += LD_LIBRARY_PATH='$(CFGLIB)/dns' |
5 | 40 |
|
0 | 41 |
# Ideally no patches should be required, where they are needed for a |
42 |
# release they should be incorporated or obsoleted in the next ISC |
|
43 |
# release. |
|
44 |
# |
|
5 | 45 |
PATCHES:sh= test -f Patches/*.patch && echo Patches/*.patch || echo ${VER} |
0 | 46 |
|
47 |
include ../Makefile.cmd |
|
48 |
||
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
49 |
# The ISC tarball is not /usr/bin/tar friendly. |
0 | 50 |
$(VER)/.patched:= UNPACKARCHIVE=$(GTAR) xfz |
51 |
||
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
52 |
# CONFIGARGS is printed by 'named -V' and logged at start-up. It is |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
53 |
# overridden here to prevent the long path names appearing from CC, |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
54 |
# LDFLAGS and CXX. |
0 | 55 |
all: $(VER)/config.status |
5 | 56 |
(cd $(VER); pwd;\ |
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
57 |
$(env) - PATH='$(SFW_PATH)' EXT_CFLAGS='$(CFLAGS)' $(CCSMAKE) -e \ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
58 |
CONFIGARGS="$(CONFIGURE_OPTIONS)") |
0 | 59 |
|
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
60 |
# The openssl version check is disabled as we rely on dynamic SSL library |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
61 |
# which is independent of BIND. |
0 | 62 |
CONFIGURE_OPTIONS += --with-libtool |
63 |
CONFIGURE_OPTIONS += --bindir=$(CFGBIN) |
|
64 |
CONFIGURE_OPTIONS += --sbindir=$(CFGUSRSBIN) |
|
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
65 |
CONFIGURE_OPTIONS += --libdir=$(CFGLIB)/dns |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
66 |
CONFIGURE_OPTIONS += --sysconfdir=/etc |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
67 |
CONFIGURE_OPTIONS += --localstatedir=/var |
0 | 68 |
CONFIGURE_OPTIONS += --with-openssl |
69 |
CONFIGURE_OPTIONS += --enable-threads=yes |
|
70 |
CONFIGURE_OPTIONS += --enable-devpoll=yes |
|
71 |
CONFIGURE_OPTIONS += --disable-openssl-version-check |
|
5 | 72 |
CONFIGURE_OPTIONS += --enable-fixed-rrset |
13 | 73 |
CONFIGURE_OPTIONS += --disable-getifaddrs |
0 | 74 |
|
75 |
# Configure BIND ready for compilation. |
|
5 | 76 |
$(VER)/config.status: $(VER)/$(SFW_STAMP_PATCHED) |
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
77 |
(cd $(VER); pwd; $(env) - $(CONFIGURE_ENV) \ |
5 | 78 |
$(SHELL) ./configure $(CONFIGURE_OPTIONS) ) |
0 | 79 |
|
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
80 |
# Install deliverables into ROOT. |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
81 |
install: all |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
82 |
$(SH) ./install-bind $(VER) |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
83 |
|
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
84 |
# test & fulltest. The latter configures IP addresses 10.53.0.1 |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
85 |
# through 10.53.0.5 as aliases on the loopback interface. |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
86 |
# The default task is to display summary from cache file if it exists. |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
87 |
# To force a new test either use clean target first or specify FRC=FRC. |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
88 |
# |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
89 |
# Nawk script reads ISC output which is of the form: |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
90 |
# /^T:/ = Start of a test, |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
91 |
# /^I:/ = info from a test; collect in case test did not PASS... |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
92 |
# /^R:/ = Result. If 'PASS' then continue, else print line and collected info. |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
93 |
# @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150 |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
94 |
config_ip=$(POUND_SIGN) |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
95 |
fulltest := config_ip = cd $(VER); $(SHELL) ./bin/tests/system/ifconfig.sh |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
96 |
cache_str=I: $(VER) CACHED RESULTS from |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
97 |
|
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
98 |
test fulltest: all $$@.$(MACH).results |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
99 |
@$(ECHO) 'Sumary of results from $@.$(MACH).results' |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
100 |
@$(nawk) '\ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
101 |
/^T:/{name=$$0;info="";}\ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
102 |
/^I:/ {info=sprintf("%s%s\n", info, $$0);}\ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
103 |
/^R:/ {test++; result[$$1]++;}\ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
104 |
/^R:PASS/{next;}\ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
105 |
/^R:/{printf("%s: %s\n%s\n", $$1, name, info);}\ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
106 |
END{for (item in result) printf("%s=%d ", item, result[item]);\ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
107 |
printf("Total=%d\n",test);\ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
108 |
}' $@.$(MACH).results |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
109 |
@$(tail) -1 $@.$(MACH).results | $(GREP) '^$(cache_str)' || \ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
110 |
$(ECHO) '$(cache_str)' `$(date)` >> $@.$(MACH).results |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
111 |
|
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
112 |
test.$(MACH).results fulltest.$(MACH).results: $(FRC) |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
113 |
-$(config_ip) up |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
114 |
-(cd $(VER); pwd; $(env) \ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
115 |
PATH=$(SFW_PATH) \ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
116 |
MAKE=$(CCSMAKE) \ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
117 |
$(CCSMAKE) -e test) 2>&1 | $(tee) $@ |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
118 |
-$(config_ip) down |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
119 |
|
0 | 120 |
clean: |
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
121 |
$(RM) -r ./$(VER) |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
122 |
$(RM) test.$(MACH).results fulltest.$(MACH).results |
0 | 123 |
|
124 |
prog= dig dnssec-dsfromkey dnssec-keyfromlabel dnssec-keygen dnssec-signzone \ |
|
125 |
host in.named named named-checkconf named-checkzone ndc nslookup \ |
|
126 |
nsupdate rndc rndc-confgen |
|
127 |
lib= libisc libisccc libdns libisccfg liblwres libbind9 |
|
128 |
||
129 |
CLOBBERFILES=$(prog:%=$(ROOT)/usr/sbin/%) $(lib:%=$(ROOT)/usr/lib/dns/%.*) |
|
130 |
||
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
131 |
date=/usr/bin/date |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
132 |
env=/usr/bin/env |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
133 |
nawk=/usr/bin/nawk |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
134 |
tail=/usr/bin/tail |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
135 |
tee=/usr/bin/tee |
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
136 |
|
0 | 137 |
include ../Makefile.targ |
138 |
||
139 |
FRC: |
|
42
b6f829cb6d9e
Import sfw build 147
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
140 |