Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Makefile with base targets to make release zipball
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |