summaryrefslogtreecommitdiffstats
path: root/contrib/bind/Makefile
blob: 3596dd4f9b28c7d4745486b323b6b422de245290 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
## Copyright (c) 1996,1999 by Internet Software Consortium.
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.

# $Id: Makefile,v 8.52 2000/11/21 12:54:37 marka Exp $

TOP=
SUBDIRS= include port lib bin

SH=sh

default: all

all clean depend install distclean:: FRC
	@set -e; \
	version=`cat ${TOP}Version`; \
	systype=`${SH} ${TOP}port/systype ${TOP}.systype`; \
	if [ $$systype = "unknown" ]; then \
		echo "There is no BIND port for this system in this kit."; \
	else \
		settings=`${SH} ${TOP}port/settings ${TOP}.settings \
			< ${TOP}port/$$systype/Makefile.set`; \
		PATH=`pwd`/port/$$systype/bin:$$PATH; export PATH; \
		for x in ${SUBDIRS}; do \
			( cd $$x; pwd; \
			  eval "${MAKE} $$settings ${MARGS} SYSTYPE=$$systype \
				VER=$$version \
				$@"; \
			) || exit 1; \
		done \
	fi

clean distclean::
	rm -f .systype .settings

links: FRC
	@set -e; mkdir ${DST}; cd ${DST}; pwd; ln -s ${SRC} SRC; \
	ln -s SRC/Version .; cp SRC/Makefile .; chmod +w Makefile; \
	systype=`${SH} SRC/port/systype`; \
	for x in ${SUBDIRS} ; do \
		( mkdir $$x; cd $$x; pwd; ln -s ../SRC/$$x SRC; \
		  cp SRC/Makefile Makefile; chmod +w Makefile; \
		  ${MAKE} ${MARGS} SYSTYPE=$$systype links; \
		) || exit 1; \
	done

stdlinks: FRC
	if [ ! -d /var/obj ]; then \
		mkdir /var/obj; \
	fi
	${MAKE} ${MARGS} SRC=`pwd` DST=/var/obj/bind links

uplinks: FRC
	@set -e; systype=`${SH} ${TOP}port/systype`; pwd=`pwd`; \
	${MAKE} ${MARGS} SRC=../`basename $$pwd` "DST=../$$systype" links

FRC:
OpenPOWER on IntegriCloud