-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
38 lines (28 loc) · 930 Bytes
/
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
# Makefile for packaging 'pmcyg'
# RW Penney, April 2009
PREFIX = /usr/local
PKGNAME = pmcyg
PYTHON = python3
VERSION = $(shell ${PYTHON} -c 'import pmcyg; print(pmcyg.PMCYG_VERSION)')
DISTFILES = pmcyg.py $(shell ls pmcyg/*.py) example.pkgs \
Authors.txt ChangeLog.txt LICENSE.txt \
Makefile README.md MANIFEST.in setup.py update \
test/testPMCyg.py test/setup-awkward.ini $(shell ls test/tree-*)
FQNAME = ${PKGNAME}-${VERSION}
.PHONY: default install dist-gzip dist-zip dist-dir test clean
default: test
install: pmcyg.py
install -m 755 pmcyg.py ${PREFIX}/bin/pmcyg
dist-gzip: dist-dir
tar -zcf ${FQNAME}.tgz ./${FQNAME}
rm -rf ${FQNAME}
dist-zip: dist-dir
zip -r ${FQNAME}.zip ./${FQNAME}
rm -rf ${FQNAME}
dist-dir:
test -d ${FQNAME} || mkdir ${FQNAME}
tar -cf - ${DISTFILES} | tar -C ${FQNAME}/ -xpf -
test:
test -d test && ( cd test; ${PYTHON} -t testPMCyg.py )
clean:
rm -f ${FQNAME}.tgz ${FQNAME}.zip