decode: implements setObjectKey for LPeg < 0.9
[luajson.git] / Makefile
blobb21d5f66dd57e42cff22bdd9bd9be87aefa31858
2 # Makefile to prepare releases and run tests
5 .PHONY: all clean check dist dist-all dist-bzip2 dist-gzip dist-zip distcheck
7 DIST_DIR=dist
8 LUA_BIN=lua
11 all:
12 @echo Building nothing - no binaries
14 clean:
15 @echo Cleaning nothing - no binaries
18 dist dist-all: distdir dist-bzip2 dist-gzip dist-zip
20 distdir:
21 mkdir -p dist
23 VERSION=luajson-$(shell git describe --abbrev=4 HEAD 2>/dev/null)
24 dist-bzip2: distdir
25 git archive --format=tar --prefix=$(VERSION)/ HEAD | bzip2 -9v > $(DIST_DIR)/$(VERSION).tar.bz2
26 dist-gzip: distdir
27 git archive --format=tar --prefix=$(VERSION)/ HEAD | gzip -9v > $(DIST_DIR)/$(VERSION).tar.gz
28 dist-zip: distdir
29 git archive --format=zip --prefix=$(VERSION)/ HEAD > $(DIST_DIR)/$(VERSION).zip
31 # Config to make sure that Lua uses the contained Lua code
32 LUA_PATH_SETUP=LUA_PATH="?/init.lua;../lua/?.lua;../lua/?/init.lua;$(LUA_PATH);"
33 LUA_SETUP=LUA_OLD_INIT="$(LUA_INIT)" LUA_INIT="@hook_require.lua" $(LUA_PATH_SETUP)
34 check-regression:
35 cd tests && $(LUA_SETUP) lua regressionTest.lua
36 check-unit:
37 cd tests && $(LUA_SETUP) lunit lunit-*.lua
38 check: check-regression check-unit
41 distcheck: dist-bzip2
42 mkdir -p tmp
43 tar -C tmp -xf $(DIST_DIR)/$(VERSION).tar.bz2
44 cd tmp/$(VERSION) && make check
45 rm -rf tmp