aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2007-09-04 14:12:51 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2007-09-04 14:12:51 -0500
commitb1ad48eb6ae9bf3aa9d03968ad54da6dffdc5fef (patch)
treeeeda18e812906db4b229c956b77c8ef1b2982f6b
parent6a7a4be008ccb1d93a9e4a9c9ff73faa9c46ca76 (diff)
downloadluairc-b1ad48eb6ae9bf3aa9d03968ad54da6dffdc5fef.tar.gz
luairc-b1ad48eb6ae9bf3aa9d03968ad54da6dffdc5fef.zip
add a dist target to the makefile - this depends on _VERSION being defined in the main lua file
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2610271..8e3047d 100644
--- 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)