forked from system-storage-manager/ssm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (48 loc) · 2.02 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
PYTHONPATH := $(shell pwd)
export PYTHONPATH
all: help
help:
@echo "Usage: make <target>"
@echo
@echo "Available targets are:"
@echo " help show this text"
@echo " clean remove python bytecode and temp files"
@echo " install install program on current system"
@echo " spec prepare changelog for spec file"
@echo " log prepare changelog"
@echo " authors prepare list of authors"
@echo " docs generate up-to-date documentation"
@echo " source create source tarball"
@echo " test run tests/run_tests.py"
check_vars:
ifndef VERSION
@echo "VERSION variable not defined"
@exit 1
endif
ifndef PREVIOUS
@echo "PREVIOUS variable not defined"
@exit 1
endif
clean:
@python setup.py clean
rm -f MANIFEST
find . -\( -name "*.pyc" -o -name '*.pyo' -o -name "*~" -\) -delete
git-clean:
git clean -f
install:
@python setup.py install
spec: check_vars
@(LC_ALL=C date +"* %a %b %e %Y `git config --get user.name` <`git config --get user.email`> - $(VERSION)"; git log --pretty="format:- %s (%an)" $(PREVIOUS)..HEAD| cat; echo -e "\n\n"; cat CHANGES) > CHANGES.bck; mv CHANGES.bck CHANGES
log: check_vars
@(LC_ALL=C date +"[%a %b %e %Y] `git config --get user.name` <`git config --get user.email`> - $(VERSION)"; echo; git shortlog -e $(PREVIOUS)..HEAD | cat; git diff --stat $(PREVIOUS)..HEAD | cat) | sed -e 's/@/_O_/g' | less
authors:
@(echo -e "System Storage Manager was written by:\n\tLukáš Czerner <[email protected]>"; echo -e "\nContributions (commits):"; git log --no-merges | grep '^Author:' | sort | uniq -c | sort -rn | sed -e 's/^\s*\([0-9]*\) Author: /\t(\1) /') | sed -e 's/@/_O_/g' > AUTHORS
docs:
@make dist -C doc
source: test clean
@python setup.py sdist
test:
@python test.py
push_html:
scp -r doc/_build/singlehtml/* [email protected]:/home/project-web/storagemanager/htdocs/
release: git-clean clean check_vars authors spec log docs source