-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
46 lines (39 loc) · 1.24 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
.POSIX:
CFLAGS =
DEPS = norayr/lists \
norayr/Internet \
norayr/time \
norayr/irc \
norayr/opts
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 ${ROOTDIR}/../src/vocbot.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