diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-09-08 13:56:13 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-09-08 13:56:13 +0100 |
commit | 2678f0d052da02483e828da9db43f9a2d6734de6 (patch) | |
tree | 2806674cad3483be46d7728a5031f0a19798ad4c /Makefile | |
download | gall-2678f0d052da02483e828da9db43f9a2d6734de6.tar.gz |
Gall: Initial version, before submoduling
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1ac9023 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +all: test + +MODULES := gall +LUA_VER := 5.1 + +INST_BASE := /usr/local +INST_ROOT := $(DESTDIR)$(INST_BASE)/share/lua/$(LUA_VER) + +MOD_FILES := $(patsubst %,%.lua,$(subst .,/,$(MODULES))) + +install: + mkdir -p $(INST_ROOT)/gall + for MOD in $(sort $(MOD_FILES)); do \ + cp lib/$${MOD} $(INST_ROOT)/$${MOD}; \ + done + +LUA := LUA_PATH="$(shell pwd)/lib/?.lua;$(shell pwd)/extras/luacov/src/?.lua;;" lua$(LUA_VER) + +clean: + $(RM) luacov.report.out luacov.stats.out + +distclean: clean + find . -name "*~" -delete + +.PHONY: example +example: + $(LUA) example/gall-example.lua + +.PHONY: test +test: + @$(RM) luacov.stats.out + @ERR=0; \ + for MOD in $(sort $(MODULES)); do \ + echo -n "$${MOD}: "; \ + $(LUA) test/test-$${MOD}.lua; \ + test "x$$?" = "x0" || ERR=1; \ + done; \ + $(LUA) extras/luacov/src/bin/luacov -X luacov. -X test. $(MODULES); \ + exit $$ERR + +.PHONY: interactive +interactive: + $(LUA) -e'gall=require"gall"' -i |