-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (38 loc) · 972 Bytes
/
Makefile
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
# BSDmakefile
TAPES += Elliott-Algol60-A104
TAPES += Elliott-Programs
TAPES += Elliott-Programs/X5
TAPES += H-Code-Compilers
TAPES += hello
TAPES += Algol60-Samples
VERSION ?= zero
PREFIX ?= /usr/local
DATADIR ?= ${PREFIX}/share/Elliott-803
SHARE_DIR = ${DESTDIR}${DATADIR}
.for TD in ${TAPES}
TP += ${DATADIR}/${TD}
.endfor
DEFAULT_TAPE_DIR ?= ${TP:S/ /:/gW}
.PHONY: all
all:
${MAKE} -C emulator DEFAULT_TAPE_DIR="${DEFAULT_TAPE_DIR}" VERSION="${VERSION}" all
.PHONY: test
test: all
${MAKE} -C emulator test
.PHONY: install
install: all
${MAKE} -C emulator DESTDIR="${DESTDIR:tA}" PREFIX="${PREFIX}" DEFAULT_TAPE_DIR="${DEFAULT_TAPE_DIR}" install
.for TD in ${TAPES}
install -p -d -m 755 '${SHARE_DIR}/${TD}'
for f in '${TD}'/* ; \
do \
printf 'f: %s d: %s\n' "$${f}" '${SHARE_DIR}/${TD}' ; \
if [ ! -d "$${f}" ] ; \
then \
install -m 644 "$${f}" '${SHARE_DIR}/${TD}' ; \
fi ; \
done
.endfor
.PHONY: clean
clean:
make -C emulator clean