]> git.lizzy.rs Git - luairc.git/commitdiff
add a dist target to the makefile - this depends on _VERSION being defined in the...
authorjluehrs2 <jluehrs2@uiuc.edu>
Tue, 4 Sep 2007 19:12:51 +0000 (14:12 -0500)
committerjluehrs2 <jluehrs2@uiuc.edu>
Tue, 4 Sep 2007 19:12:51 +0000 (14:12 -0500)
Makefile

index 2610271601365625f7280af8a450fccc5bda658e..8e3047d2186d4ee5d314dbcdc4724ed7b0a59fa4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,8 @@ MOD_LUAS = src/irc/channel.lua \
            src/irc/debug.lua \
            src/irc/message.lua \
            src/irc/misc.lua
+TEST_LUAS = test/test.lua
+VERSION = $(shell grep '^_VERSION =' $(MAIN_LUA) | sed "s/_VERSION = '\(.*\)'/\1/" | tr ' ' '-')
 
 build :
 
@@ -26,3 +28,12 @@ doc : $(MAIN_LUA) $(MOD_LUAS)
 
 clean :
        rm -rf $(DOC_DIR)
+
+dist : $(VERSION).tar.gz
+
+$(VERSION).tar.gz : $(MAIN_LUA) $(MOD_LUAS) $(TEST_LUAS) doc Makefile README TODO
+       @echo "Creating $(VERSION).tar.gz"
+       @mkdir $(VERSION)
+       @cp -r src test doc Makefile README TODO $(VERSION)
+       @tar czf $(VERSION).tar.gz $(VERSION)
+       @rm -rf $(VERSION)