Merge branch '1.1.x' into 1.2.x
[luajson.git] / dist / Makefile
blob49728d92ac2207f99dbef90802a8c7d8ddc7ed37
1 VERSION= luajson-$(shell git describe --abbrev=4 HEAD 2>/dev/null)
3 DIST_TAR= $(VERSION).tar
4 DIST_BZ2= $(DIST_TAR).bz2
5 DIST_GZ= $(DIST_TAR).gz
6 DIST_ZIP= $(VERSION).zip
8 .PHONY: all clean dist distclean dist-bzip2 dist-gzip dist-tar dist-zip
9 .DELETE_ON_ERROR:
11 all: dist-all
13 clean: dist-clean
14 @echo Cleaning nothing - no binaries
16 all dist dist-all: dist-tar dist-bzip2 dist-gzip dist-zip
18 distclean:
19 rm -f luajson-*.bz2
20 rm -f luajson-*.gz
21 rm -f luajson-*.tar
22 rm -f luajson-*.zip
24 dist-tar: $(DIST_TAR)
26 dist-bzip2: $(DIST_BZ2)
28 dist-gzip: $(DIST_GZ)
30 dist-zip: $(DIST_ZIP)
32 $(DIST_TAR):
33 cd .. && git archive --format=tar --prefix=$(VERSION)/ HEAD . -o $(CURDIR)/$@
35 $(DIST_BZ2): $(DIST_TAR)
36 bzip2 -9 -c -f $(DIST_TAR) > $@
38 $(DIST_GZ): $(DIST_TAR)
39 gzip -9 -c -f $(DIST_TAR) > $@
41 $(DIST_ZIP):
42 cd .. && git archive --format=zip --prefix=$(VERSION)/ HEAD: -o $(CURDIR)/$@