summaryrefslogtreecommitdiff
path: root/tools/makeconfig
blob: 85758513e5e65378e298588461d4bdaaba7e9e04 (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
# $Source$
# $Author$
# $Header$
#
# Makefile for creating a Zephyr configuration
#
# This Makefile creates the directories needed to hold Zephyr
# object files and executables.  It also installs the Imakefiles.
# This also copies in the Imake and make depend program and Imake macros.
# By default, the Imakefiles are copied into the configuration
# and made writeable.  If a link is preferred, change LN to "ln".
#
# The default distination for the configuration is the current
# directory; defaults for destination and source directories may be
# specified, e.g.:
#
# make -f makeconfig SRCDIR=/u2/lockers/zephyr DESTDIR=myconfig

DESTDIR	= .
SRCDIR 	= /afs/athena.mit.edu/astaff/project/zephyr/src

LN	= ln -s
CP	= cp
SUBDIR	= et et/lib et/compile_et ss ss/lib ss/make_commands clients \
	clients/syslogd clients/zaway \
	clients/zbitmap clients/zctl clients/zleave \
	clients/zlocate clients/zmailnotify clients/znol clients/zpopnotify \
	clients/zshutdown_notify clients/zstat clients/zwrite \
	include include/zephyr lib man man/man1 man/man8 server zhm zwgc \
	zwgc/String zwgc/Memory zwgc/Dictionary ozwgc ozwgc/zbrowser \
	libdyn clients/xzwrite


# Empty directories which also need to be built.

MTDIR	= et/lib/profiled ss/lib/profiled lib/profiled libdyn/profiled libs

# Directories which need only be linked into the sources

LINKDIR = server/acldir

all:
	rm -f ${DESTDIR}/Makefile ${DESTDIR}/Imakefile
	${CP} ${SRCDIR}/Makefile ${DESTDIR}
	${LN} ${SRCDIR}/Imakefile ${DESTDIR}
	chmod +w ${DESTDIR}/Makefile
	-for i in ${SUBDIR}; do \
		mkdir ${DESTDIR}/$$i; \
		rm -f ${DESTDIR}/$$i/Imakefile; \
		${LN} ${SRCDIR}/$$i/Imakefile ${DESTDIR}/$$i; \
	done
	-for i in ${MTDIR}; do mkdir ${DESTDIR}/$$i; done
	-for i in ${LINKDIR}; do ${LN} ${SRCDIR}/$$i ${DESTDIR}/$$i; done
	for i in imake makedepend config; do \
		rm -rf ${DESTDIR}/$$i; \
		cp -r ${SRCDIR}/$$i ${DESTDIR}; \
		rm -rf ${DESTDIR}/$$i/RCS; \
	done
#special hack for libss
	rm -f ${DESTDIR}/ss/ss
	ln -s lib ${DESTDIR}/ss/ss