-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
69 lines (51 loc) · 1.69 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# NOTE: This Makefile is not required to build the program, for which maven
# is used. Instead, it invokes the program for tests and for transforming the
# output, for example to the lirc.xml file.
MYDIR := $(dir $(firstword $(MAKEFILE_LIST)))
TOP := $(realpath $(MYDIR))
include $(MYDIR)/common/makefiles/paths.mk
PROJECT_NAME := HarcHardware
PROJECT_NAME_LOWERCASE := $(shell echo $(PROJECT_NAME) | tr A-Z a-z)
EXTRACT_VERSION := $(TOP)/common/xslt/extract_project_version.xsl
VERSION := $(shell $(XSLTPROC) $(EXTRACT_VERSION) pom.xml)
PROJECT_JAR := target/$(PROJECT_NAME)-$(VERSION).jar
PROJECT_BIN := target/$(PROJECT_NAME)-$(VERSION)-bin.zip
GH_PAGES := $(TOP)/gh-pages
ORIGINURL := $(shell git remote get-url origin)
default: $(PROJECT_JAR)
$(PROJECT_JAR) $(PROJECT_BIN):
mvn install -Dmaven.test.skip=true
$(PROJECT_JAR)-test:
mvn install -Dmaven.test.skip=false
release: push gh-pages tag deploy
version:
@echo $(VERSION)
setversion:
mvn versions:set -DnewVersion=$(NEWVERSION)
git commit -S -m "Set version to $(NEWVERSION)" pom.xml
deploy:
mvn deploy -P release
apidoc: target/site/apidocs
$(BROWSE) $</index.html
javadoc: target/site/apidocs
target/site/apidocs:
mvn javadoc:javadoc
push:
git push
gh-pages: target/site/apidocs
rm -rf $(GH_PAGES)
git clone --depth 1 -b gh-pages ${ORIGINURL} ${GH_PAGES}
( cd ${GH_PAGES} ; \
cp -r ../target/site/apidocs/* . ; \
git add * ; \
git commit -a -m "Update of API documentation" ; \
git push )
tag:
git checkout master
git status
git tag -s -a Version-$(VERSION) -m "Tagging Version-$(VERSION)"
git push origin Version-$(VERSION)
clean:
mvn clean
rm -rf $(GH_PAGES) pom.xml.versionsBackup
.PHONY: clean $(PROJECT_JAR)-test release