-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (53 loc) · 2.04 KB
/
Makefile
File metadata and controls
73 lines (53 loc) · 2.04 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
include ./util/include.mk
# The command line arguments of pandoc were renamed between version 1.x and 2.x,
# so find out which pandoc version we are using and set options accordingly.
PANDOC_EXISTS := $(shell pandoc -v 2>/dev/null)
ifdef PANDOC_EXISTS
PANDOC_VERSION_MAJOR = $(shell pandoc -v | grep "^pandoc" | cut -d" " -f 2 | cut -d"." -f 1)
PANDOC_VERSION_GE_2 = $(shell [ $(PANDOC_VERSION_MAJOR) -ge 2 ] && echo true)
ifeq ($(PANDOC_VERSION_GE_2),true)
PANDOC_OPTS = --pdf-engine=xelatex
else
PANDOC_OPTS = -R --latex-engine=xelatex
endif
endif
all: build doc
# Stubs for default targets
.PHONY:deps install clean dist egg wheel distclean test doc
deps install test:
#uge/__init__.py : ./util/params.mk
# echo "__version__ = '$(VERSION)'" > $@
distclean: tidy
build: uge/__init__.py
python setup.py build
doc:
PYTHONPATH=$(PWD) make -C doc html
pdf:
(cd doc/UserDocumentation; pandoc $(PANDOC_OPTS) --template=template.tex \
--listings -H listings.tex \
--variable fontsize=10pt --variable version="$(VERSION)" \
--variable title="Grid Engine Configuration API User Guide" \
--variable author="Altair Engineering" --variable company="Altair Engineering Inc." \
--variable GELongVersion="$(VERSION)" --variable GEShortVersion="$(VERSION)" \
--variable GEFullName="Altair Grid Engine" --variable GEShortName="Grid Engine" \
--variable doc-family="Altair Grid Engine Documentation" \
--toc -s UGEConfigLibraryDoc.md -o UGEConfigLibraryDoc.pdf)
dist: sdist wheel doc
cp doc/UserDocumentation/UGEConfigLibraryDoc.pdf doc/build
rsync -arvlP doc/build/* dist/doc/
(cd dist; zip -r config-api.zip `ls -d *`)
egg: uge/__init__.py
python setup.py bdist_egg
sdist: uge/__init__.py
python setup.py sdist
wheel: uge/__init__.py
python setup.py bdist_wheel
test: uge/__init__.py
mkdir -p build
python setup.py nosetests
clean:
make -C doc clean
rm -f doc/UserDocumentation/UGEConfigLibraryDoc.pdf
rm -rf test/.coverage *.egg-info `find . -name '*.pyc' -o -name '__pycache__' -o -name 'build' -o -name '.coverage' `
tidy: clean
rm -rf dist