-
Notifications
You must be signed in to change notification settings - Fork 42
/
makefile
33 lines (27 loc) · 912 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
TEST_SCRIPTS := $(shell find . -type f -name test.sh)
TEST_DIRS := $(foreach f, $(TEST_SCRIPTS), $(dir $(f)))
PKG ?= .
BUILD_DIR := $(PKG)/.bigmler_build
VERBOSITY ?= 0
help:
@echo "make compile - compile all packages"
@echo "make clean - delete resources created by compile"
@echo "make compile PKG=dirname - compile package in pkgname"
@echo "make clean PKG=dirname - delete resources created in dirname"
@echo "make tests - run all tests:"
@for d in $(TEST_SCRIPTS); do echo " $$d"; done
clean:
bigmler delete --from-dir $(BUILD_DIR) --output-dir $(BUILD_DIR)
rm -rf $(BUILD_DIR)
rm -rf $(PKG)/.bigmler_*
compile: clean
bigmler whizzml --package-dir $(PKG) --output-dir $(BUILD_DIR)
tests:
@for t in $(TEST_DIRS); \
do (cd $$t && VERBOSITY=$VERBOSITY ./test.sh); \
done
distcheck:
$(MAKE) compile
$(MAKE) test
$(MAKE) clean
.PHONY: clean compile test help distcheck