-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (47 loc) · 1.73 KB
/
Copy pathMakefile
File metadata and controls
55 lines (47 loc) · 1.73 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
48
49
50
51
52
53
54
55
# -------------------------------------------------------------
# This makefile defines the following targets
#
# - all (default) - builds all targets
# - docs - clean env and build docs file
# - htmldocs - build html docs
# - setvenv - setup python virtual env
OS := $(shell uname -s)
SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"):
FORMATTER=../bin/plugin_formatter.py
DUMPER=../bin/dump_keywords.py
ifeq ($(shell echo $(OS) | egrep -ic 'Darwin|FreeBSD|OpenBSD|DragonFly'),1)
CPUS ?= $(shell sysctl hw.ncpu|awk '{print $$2}')
else
CPUS ?= $(shell nproc)
endif
SPHINXBUILD = sphinx-build
SPHINXPROJ = csiabb
SOURCEDIR = source
BUILDDIR = build
all: docs
docs: clean htmldocs
.ONESHELL:
htmldocs: setvenv
# staticmin
#SPHINXBUILD=$(SPHINXBUILD) SPHINXPROJ=$(SPHINXPROJ) \
#SOURCEDIR=$(SOURCEDIR) BUILDDIR=$(BUILDDIR) sh ./setup-virtualenv.sh
CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx html
#TODO: leaving htmlout removal for those having older versions, should eventually be removed also
clean:
# -rm -rf htmlout
-rm -rf build
# -rm -f .buildinfo
# -rm -f *.inv
# -rm -rf *.doctrees
# @echo "Cleaning up minified css files"
# find . -type f -name "*.min.css" -delete
# @echo "Cleaning up byte compiled python stuff"
# find . -regex ".*\.py[co]$$" -delete
# @echo "Cleaning up editor backup files"
find . -type f \( -name "*~" -or -name "#*" \) -delete
find . -type f \( -name "*.swp" \) -delete
.PHONY: docs clean
# staticmin:
# cat _themes/srtd/static/css/theme.css | sed -e 's/^[ ]*//g; s/[ ]*$$//g; s/\([:{;,]\) /\1/g; s/ {/{/g; s/\/\*.*\*\///g; /^$$/d' | sed -e :a -e '$$!N; s/\n\(.\)/\1/; ta' > _themes/srtd/static/css/theme.min.css
setvenv:
sh ./setup-virtualenv.sh