forked from SkypLabs/bsfl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (36 loc) · 1.09 KB
/
Makefile
File metadata and controls
41 lines (36 loc) · 1.09 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
SHELL := /bin/bash
SRC_DIR := $(CURDIR)/lib
TEST_DIR := $(CURDIR)/test
DOC_DIR := $(CURDIR)/doc
GH_PAGES_BRANG := "gh-pages"
.PHONY: doc
doc:
@cd $(DOC_DIR); \
doxygen Doxyfile && echo -e "\n => Doc generated in directory $(DOC_DIR){html/latex}\n"
.PHONY: test
test:
@cd $(TEST_DIR); \
bats .
.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 checkout gh-pages && git add . && git commit -am 'Generate Doc' && \
git push --force origin gh-pages && git checkout master