-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (46 loc) · 1.22 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
## 12/14/2017
TARGET = gencodata
VERSION = 0.2
DISTRO = -py2.py3-none-any
WHEELDIR= dist
WHEELFILE= $(WHEELDIR)/$(TARGET)-$(VERSION)$(DISTRO).whl
PIP = pip2
none:
@echo "Make targets are list, dist, build, install, uninstall, clean, html, mdfiles."
@echo ""
#
# DOCUMENTS
#
# pythonic restructured Text files
rst: $(TARGET)/doc/HARTREE.rst $(TARGET)/doc/INSTALL.rst $(TARGET)/doc/MANUAL.rst README.rst
# html files for everything else
html: $(TARGET)/doc/HARTREE.html $(TARGET)/doc/INSTALL.html $(TARGET)/doc/MANUAL.html README.html
# markdown files for github, included for completeness but not implicitly built
mdfiles: $(TARGET)/doc/HARTREE.md $(TARGET)/doc/INSTALL.md $(TARGET)/doc/MANUAL.md README.md
%.html: %.rst
rst2html.py $< $@
%.md: %.rst
pandoc --from=rst --to=markdown_github $< -o $@
list:
$(PIP) list --user
#
# Install package locally in $USER/.local
#
install:
$(PIP) install --user $(WHEELFILE)
uninstall:
$(PIP) uninstall -y $(TARGET)
clean:
rm -rf ./dist/ ./build/
rm -f *.html $(TARGET)/*.html $(TARGET)/doc/*.html
rm -f *.md $(TARGET)/*.md
#
# build distribution archive and wheel files
#
build:
$(MAKE) html
cp *.html $(TARGET)
python setup.py sdist bdist_wheel
dist:
$(MAKE) build
##