forked from certnanny/KeyNanny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
25 lines (20 loc) · 799 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
# KeyNanny Makefile
#
.PHONY: doc package version
all:
@echo "Targets:"
@echo "make package - create package"
@echo "make doc - recreate README.md from included documentation"
@echo "make version - create VERSION file from git tag information"
doc:
@echo '[//]: # "Autogenerated documentation. Do not edit manually! (hint: make doc)"' >README.md
@echo '[//]: # "==================================================================="' >>README.md
pod2markdown bin/keynannyd | grep -A9999 DESCRIPTION >> README.md
version:
@GIT_DESCRIPTION=`git describe --tags | perl -p -e 's/.*(\\d+\\.\\d+)-?(\\d*).*/\\1 \\2/'` ;\
VERSION="$${GIT_DESCRIPTION%% *}" ;\
TAG_DISTANCE="$${GIT_DESCRIPTION##* }" ;\
echo "$$VERSION.$${TAG_DISTANCE:-0}" >VERSION
package: version
./make_package.sh