forked from rcarbone/kudb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (31 loc) · 837 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
# The list of directories to compile
SUBDIRS = src
# The main target is responsible to compile all
all:
@for dir in ${SUBDIRS} ; do \
if [ -d $$dir ] ; then \
echo "Making sub-directory $$dir ..." ; \
(cd $$dir && make -s) ; \
fi \
done
# Cleanup rules
clean distclean:
@rm -f *~
@for dir in ${SUBDIRS} ; do \
if [ -d $$dir ] ; then \
(cd $$dir && make -s clean) ; \
fi \
done
# Run tests
DRIVER = src/runit/runit
PROGRAMS = $(shell ls -1 src/*/test)
TYPES = i s
run:
@for t in ${TYPES}; do \
for p in ${PROGRAMS} ; do \
if [ -x $$p ] ; then \
echo "Running test $$p (-$$t). Please wait ..." ; \
${DRIVER} $$p -$$t ; \
fi \
done \
done