-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
58 lines (50 loc) · 1.67 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
.POSIX:
CFLAGS =
# The following order is important, do not alphabetise
DEPS = norayr/lists \
norayr/opts \
norayr/time \
norayr/skprLogger \
norayr/skprJson \
norayr/pipes
GITHUB = https://github.com/
ROOTDIR = $$PWD
all: ${DEPS}
@if [ ! -d build ]; then \
mkdir build; \
fi
@for i in $?; do \
cp -r ${ROOTDIR}/build \
${ROOTDIR}/deps/$${i#*/}/build; \
make -C ${ROOTDIR}/deps/$${i#*/}; \
cp -r ${ROOTDIR}/deps/$${i#*/}/build/* \
${ROOTDIR}/build/; \
done
@cd build; voc -s ${ROOTDIR}/../src/mnshList.Mod \
${ROOTDIR}/../src/mnshCrt.Mod \
${ROOTDIR}/../src/mnshDefs.Mod \
${ROOTDIR}/../src/mnshStorage.Mod \
${ROOTDIR}/../src/mnshExtTools.Mod \
${ROOTDIR}/../src/mnshInput.Mod \
${ROOTDIR}/../src/mnshTerm.Mod \
${ROOTDIR}/../src/mnshUnix.Mod \
${ROOTDIR}/../src/manush.Mod -M
${DEPS}:
@for i in $@; do \
if [ -d deps/$${i#*/} ]; then \
printf "Updating %s: " $${i#*/}; \
git -C deps/$${i#*/} pull --ff-only \
${GITHUB}$$i > /dev/null 2>&1 \
&& echo done \
|| (echo failed && exit 1); \
else \
printf "Fetching %s: " $${i#*/}; \
git clone ${GITHUB}$$i deps/$${i#*/} \
> /dev/null 2>&1 \
&& echo done \
|| (echo failed && exit 1); \
fi \
done
clean:
rm -rf build deps
.PHONY: deps