forked from BrightcoveOS/Diamond
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
83 lines (63 loc) · 2.09 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
74
75
76
77
78
79
80
81
82
83
DESTDIR=/
PROJECT=diamond
VERSION :=$(shell bash version.sh )
RELEASE :=$(shell ls -1 dist/*.noarch.rpm 2>/dev/null | wc -l )
all:
@echo "make run - Run Diamond from this directory"
@echo "make config - Run a simple configuration CLI program"
@echo "make watch - Watch and continuously run tests"
@echo "make test - Run tests"
@echo "make docs - Build docs"
@echo "make sdist - Create source package"
@echo "make bdist - Create binary package"
@echo "make install - Install on local system"
@echo "make rpm - Generate a rpm package"
@echo "make deb - Generate a deb package"
@echo "make tar - Generate a tar ball"
@echo "make clean - Get rid of scratch and byte files"
@echo "make cleanws - Strip trailing whitespaces from files"
run:
./bin/diamond --configfile=conf/diamond.conf --foreground
config:
./bin/diamond-setup --configfile=conf/diamond.conf
watch:
watchr test.watchr
test:
./test.py
docs: version
./build_doc.py --configfile=conf/diamond.conf
sdist: version
./setup.py sdist --prune
bdist: version
./setup.py bdist --prune
install: version
./setup.py install --root $(DESTDIR)
rpm: buildrpm
buildrpm: sdist
./setup.py bdist_rpm \
--post-install=rpm/postinstall \
--pre-uninstall=rpm/preuninstall \
--install-script=rpm/install \
--release=`ls dist/*.noarch.rpm | wc -l`
deb: builddeb
builddeb: version
dch --newversion $(VERSION) --distribution unstable --force-distribution -b "Last Commit: $(shell git log -1 --pretty=format:'(%ai) %H %cn <%ce>')"
dch --release "new upstream"
./setup.py sdist --prune
mkdir -p build
tar -C build -zxf dist/$(PROJECT)-$(VERSION).tar.gz
(cd build/$(PROJECT)-$(VERSION) && debuild -us -uc -v$(VERSION))
tar: sdist
clean:
./setup.py clean
rm -rf dist build MANIFEST
find . -name '*.pyc' -delete
cleanws:
find . -name '*.py' -exec sed -i'' -e 's/[ \t]*$$//' {} \;
version:
./version.sh > version.txt
vertest: version
echo "${VERSION}"
reltest:
echo "$(RELEASE)"
.PHONY: run watch config test docs sdist bdist install rpm buildrpm deb builddeb tar clean cleanws version reltest vertest