forked from fatiando/fatiando
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (65 loc) · 1.7 KB
/
Makefile
File metadata and controls
77 lines (65 loc) · 1.7 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
73
74
75
76
77
# Build, package and clean Fatiando
PY=python
PIP=pip
NOSE=nosetests
# To upload to PyPI run:
# python setup.py sdist --formats=zip,gztar upload
.PHONY: help
help:
@echo "Commands:"
@echo ""
@echo " build build the extension modules inplace"
@echo " docs build the html documentation"
@echo " docs-pdf build the pdf documentation"
@echo " view-docs show the html docs on firefox"
@echo " test run the test suite (including doctests)"
@echo " deps installs development requirements"
@echo " package create source distributions"
@echo " clean clean up"
@echo ""
# BUILD EXTENSION MODULES
.PHONY: build
build:
$(PY) setup.py build_ext --inplace
# BUILD THE DOCS
.PHONY: docs
docs: clean
cd doc; make html
.PHONY: docs-pdf
docs-pdf: clean
cd doc; make latexpdf
.PHONY: view-docs
view-docs:
firefox doc/_build/html/index.html &
# RUN ALL TESTS
.PHONY: test
test:
$(NOSE) fatiando
$(NOSE) test
# INSTALL THE DEPENDENCIES
.PHONY: deps
deps: requires.txt
$(PIP) install -r $<
# MAKE A SOURCE DISTRIBUTION
.PHONY: package
package: docs-pdf
$(PY) setup.py sdist --formats=zip,gztar
# UPLOAD TO PYPI
.PHONY: upload
python setup.py register sdist --formats=zip,gztar upload
# CLEAN THINGS UP
.PHONY: clean
clean:
find . -name "*.so" -exec rm -v {} \;
find "fatiando" -name "*.c" -exec rm -v {} \;
find . -name "*.pyc" -exec rm -v {} \;
rm -rvf build dist MANIFEST
# Trash generated by the doctests
rm -rvf mydata.txt mylogfile.log
# The stuff fetched by the cookbook recipes
rm -rvf logo.png cookbook/logo.png
rm -rvf crust2.tar.gz cookbook/crust2.tar.gz
.PHONY: clean-docs
clean-docs:
# Clean the docs as well
cd doc; make clean