summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2012-10-18 13:57:25 +0100
committerReuben Thomas <rrt@sc3d.org>2012-10-18 13:57:25 +0100
commit5af421a5c03960d5ca7554a4fd3e1a2bc8e531b9 (patch)
tree2528273521b92585c9a8088e510468cc124acc85
parentf106462d51ef930dd382901cf08f5fe933393277 (diff)
downloadlrexlib-5af421a5c03960d5ca7554a4fd3e1a2bc8e531b9.tar.gz
Makefile: make it harder to make mistakes
Have install depend on dist, and dist depend on rockspecs, and make rockspecs remove any old rockspec files, so it is much less likely that the wrong rockspec is used, or out-of-date rockspecs distributed.
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 63141b8..93b2690 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ VERSION = 2.7.1
PROJECT_VERSIONED = $(PROJECT)-$(VERSION)
DISTFILE = $(PROJECT_VERSIONED).zip
-install:
+install: dist
@for i in *.rockspec; do \
luarocks make $$i; \
done
@@ -23,9 +23,10 @@ docs:
@make -C doc
rockspecs:
+ rm -f *.rockspec
lua mkrockspecs.lua $(VERSION) `md5sum $(DISTFILE)`
-dist: docs
+dist: docs rockspecs
git2cl > ChangeLog
cd .. && rm -f $(DISTFILE) && zip $(DISTFILE) -r $(PROJECT) -x "lrexlib/.git/*" "*.gitignore" "*.o" "*.a" "*.so" "*.so.*" "*.zip" "*SciTE.properties" "*scite.properties" "lrexlib/luarocks/*" && mv $(DISTFILE) $(PROJECT) && cd $(PROJECT) && unzip $(DISTFILE) && mv $(PROJECT) $(PROJECT_VERSIONED) && rm -f $(DISTFILE) && zip $(DISTFILE) -r $(PROJECT_VERSIONED) && rm -rf $(PROJECT_VERSIONED)