diff options
author | Thomas Harning Jr <harningt@gmail.com> | 2011-07-05 22:23:15 -0400 |
---|---|---|
committer | Thomas Harning Jr <harningt@gmail.com> | 2011-07-05 22:23:15 -0400 |
commit | d813466fadaced2c4c75e8d8a57bc9dc60b0a8f4 (patch) | |
tree | 273e3216f2132e1cecedcedf9d3e8b115ccb4a2e /Makefile | |
parent | a9060c1c633cec8e4e6124b718bbe064726a2b7e (diff) | |
download | luaevent-prosody-d813466fadaced2c4c75e8d8a57bc9dc60b0a8f4.tar.gz luaevent-prosody-d813466fadaced2c4c75e8d8a57bc9dc60b0a8f4.zip |
base: adds distribution archive generation functionality to Makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -1,3 +1,7 @@ +.PHONY: all install clean dist dist-all dist-bzip2 dist-gzip dist-zip + +DIST_DIR=dist + # Utilities INSTALL = install INSTALL_PROGRAM = $(INSTALL) @@ -20,6 +24,19 @@ all: $(CC) $(CFLAGS) -c -Iinclude -I$(LUA_INC_DIR) src/*.c $(CC) $(LDFLAGS) -o $(LIB) *.o -levent +dist dist-all: distdir dist-bzip2 dist-gzip dist-zip + +distdir: + mkdir -p $(DIST_DIR) + +VERSION=luaevent-$(shell git describe --abbrev=4 HEAD 2>/dev/null) +dist-bzip2: distdir + git archive --format=tar --prefix=$(VERSION)/ HEAD | bzip2 -9v > $(DIST_DIR)/$(VERSION).tar.bz2 +dist-gzip: distdir + git archive --format=tar --prefix=$(VERSION)/ HEAD | gzip -9v > $(DIST_DIR)/$(VERSION).tar.gz +dist-zip: distdir + git archive --format=zip --prefix=$(VERSION)/ HEAD > $(DIST_DIR)/$(VERSION).zip + install: all mkdir -p $(DESTDIR)$(INSTALL_DIR_LUA) $(INSTALL_DATA) lua/luaevent.lua $(DESTDIR)$(INSTALL_DIR_LUA)/luaevent.lua |