-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
78 lines (61 loc) · 2.06 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
70
71
72
73
74
75
76
77
# -*- coding: utf-8; mode: makefile-gmake -*-
include utils/makefile.include
include utils/makefile.python
include utils/makefile.sphinx
include utils/makefile.0
GIT_URL = [email protected]:return42/boilerplate.git
PYOBJECTS = xxxx
DOC = docs
SLIDES = $(DOC)/slides
API_DOC = $(DOC)/$(PYOBJECTS)-api
all: clean docs
PHONY += help help-min help-all
help: help-min
@echo ''
@echo 'to get more help: make help-all'
help-min:
@echo ' docs - build documentation'
@echo ' docs-live - autobuild HTML documentation while editing'
@echo ' clean - remove most generated files'
@echo ' install - developer install (./local)'
@echo ' uninstall - uninstall (./local)'
@echo ''
$(Q)$(MAKE) -e -s make-help
help-all: help-min
@echo ''
$(Q)$(MAKE) -e -s docs-help
@echo ''
$(Q)$(MAKE) -e -s python-help
PHONY += install
install: pyenvinstall
PHONY += uninstall
uninstall: pyenvuninstall
PHONY += docs
docs: pyenvinstall slides books/kernel-doc-tests.pdf books/xxxx-api.pdf
$(call cmd,sphinx,html,$(DOCS_FOLDER),$(DOCS_FOLDER))
PHONY += slides
slides: pyenvinstall
$(call cmd,sphinx,html,$(SLIDES),$(SLIDES),slides)
PHONY += docs-live
docs-live: pyenvinstall
$(call cmd,sphinx_autobuild,html,$(DOCS_FOLDER),$(DOCS_FOLDER))
PHONY += clean
clean: pyclean docs-clean
$(call cmd,common_clean)
PHONY += project
project: pyenvinstall $(API_DOC)
@echo ' PROJECT requirements.txt'
$(Q)- rm -f requirements.txt
$(Q)$(PY_ENV_BIN)/python -c "from xxxx.__pkginfo__ import *; print(requirements_txt)" > ./requirements.txt
@echo ' PROJECT requirements_dev.txt'
$(Q)- rm -f requirements_dev.txt
$(Q)$(PY_ENV_BIN)/python -c "from xxxx.__pkginfo__ import *; print(requirements_dev_txt)" > ./requirements_dev.txt
@echo ' PROJECT README.rst'
$(Q)- rm -f README.rst
$(Q)$(PY_ENV_BIN)/python -c "from xxxx.__pkginfo__ import *; print(README)" > README.rst
PHONY += $(API_DOC)
$(API_DOC): $(PY_ENV)
$(Q)rm -rf ./$(API_DOC)
$(Q)$(PY_ENV_BIN)/sphinx-apidoc --separate --maxdepth=0 --private -o $(API_DOC) xxxx
$(Q)rm -f $(API_DOC)/modules.rst
.PHONY: $(PHONY)