This repository has been archived by the owner on Nov 3, 2018. It is now read-only.
forked from knipknap/exscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (61 loc) · 1.81 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
NAME=exscript
VERSION=`python setup.py --version | sed s/^v//`
PREFIX=/usr/local/
BIN_DIR=$(PREFIX)/bin
SITE_DIR=$(PREFIX)`python -c "import sys; from distutils.sysconfig import get_python_lib; print get_python_lib()[len(sys.prefix):]"`
DISTDIR=/pub/code/releases/$(NAME)
###################################################################
# Standard targets.
###################################################################
.PHONY : clean
clean:
find . -name "*.pyc" -o -name "*.pyo" | xargs -n1 rm -f
rm -Rf build src/*.egg-info
cd doc; make clean
.PHONY : dist-clean
dist-clean: clean
rm -Rf dist
.PHONY : doc
doc:
cd doc; make
install:
mkdir -p $(SITE_DIR)
./version.sh
export PYTHONPATH=$(SITE_DIR):$(PYTHONPATH); \
python setup.py install --prefix $(PREFIX) \
--install-scripts $(BIN_DIR) \
--install-lib $(SITE_DIR)
./version.sh --reset
uninstall:
# Sorry, Python's distutils support no such action yet.
.PHONY : tests
tests:
cd tests/Exscript/; ./run_suite.py 1
###################################################################
# Package builders.
###################################################################
targz:
./version.sh
python setup.py sdist --formats gztar
./version.sh --reset
tarbz:
./version.sh
python setup.py sdist --formats bztar
./version.sh --reset
deb:
./version.sh
debuild -S -sa
cd ..; sudo pbuilder build $(NAME)_$(VERSION)-0ubuntu1.dsc; cd -
./version.sh --reset
dist: targz tarbz
###################################################################
# Publishers.
###################################################################
dist-publish: dist
mkdir -p $(DISTDIR)/
for i in dist/*; do \
mv $$i $(DISTDIR)/`basename $$i | tr '[:upper:]' '[:lower:]'`; \
done
.PHONY : doc-publish
doc-publish:
cd doc; make publish