Skip to content

Commit

Permalink
Add Makefile with base targets to make release zipball
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalk committed Apr 8, 2014
1 parent 1fbad9a commit a240bd4
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Makefile
@@ -0,0 +1,39 @@
VERSION := $(shell git tag | tail -n1)
PACKAGE := vim-onoff
RELEASE_DIR := build
RELEASE_FILE := $(PACKAGE)-$(VERSION).zip
RELEASE := $(RELEASE_DIR)/$(RELEASE_FILE)

define HELP
Use make <target> where target one of
clean to cleanup latest build
zip to create a zipball from package
endef


all: help

export HELP
help:
@echo "$$HELP"


zip: clean
@mkdir -p $(RELEASE_DIR)
@echo "creating zipball..."
@cd ..; \
zip -r $(PACKAGE)/$(RELEASE) $(PACKAGE) \
-x "$(PACKAGE)/.*" \
-x "$(PACKAGE)/*~" \
-x "$(PACKAGE)/$(RELEASE_DIR)/*" \
-x "$(PACKAGE)/[Mm]akefile" \
-x "$(PACKAGE)/doc/tags"
@chmod 755 $(RELEASE)
@echo "well done."
@ls -l $(RELEASE)


clean:
@if test -f $(RELEASE); then \
rm $(RELEASE); \
fi

0 comments on commit a240bd4

Please sign in to comment.