-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (40 loc) · 1.1 KB
/
Makefile
File metadata and controls
47 lines (40 loc) · 1.1 KB
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
SHELL := /bin/bash
DOC_DIR := $(CURDIR)/doc
TEST_DIR := $(CURDIR)/test
GH_PAGES_BRANG := "gh-pages"
.PHONY: install
install:
@./bin/install.sh $(CURDIR)
.PHONY: uninstall
uninstall:
@./bin/uninstall.sh $(CURDIR)
.PHONY: doc
doc:
@cd $(DOC_DIR); \
doxygen Doxyfile && echo -e "\n => Doc can be acceded at $(DOC_DIR)/html/index.html\n" \
.PHONY: gh-pages-git-branch-init
gh-pages-git-branch-init: doc
@git ls-remote --heads origin | grep -q gh-pages || { \
git checkout --orphan gh-pages && \
git reset . && \
git clean --force -d --exclude doc && \
mv doc/html/* . && \
git clean --force -d doc && \
git add . && \
git commit -m "Generate Doc" && \
git push -u origin gh-pages; \
}
.PHONY: gh-pages-git-branch-create
gh-pages-git-branch-create: gh-pages-git-branch-init
@git rev-parse --quiet --verify gh-pages > /dev/null || { \
git checkout -b gh-pages origin/gh-pages && \
git fetch && \
git merge origin/gh-pages; \
}
.PHONY: gh-pages-git-branch-create
gh-pages: gh-pages-git-branch-create
git subtree push --prefix doc/html origin gh-pages
.PHONY: test
test:
@cd $(TEST_DIR); \
bats .