-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
75 lines (62 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
74
75
VERSION = 2.0.1
XSLTPROC = xsltproc
XMLLINT = xmllint
PYTHON2 = python2.6
PYTHON3 = python3
test:
cd src-python2/chardet; \
${PYTHON2} test.py "../../tests/*/*.xml"; \
cd ..
cd src-python3/chardet; \
${PYTHON3} test.py "../../tests/*/*.xml"; \
cd ..
validate:
${XMLLINT} --noout --valid docs/xml/chardet.xml
.PHONY: docs
docs: validate
cd docs; \
${XSLTPROC} xsl/html.xsl xml/chardet.xml; \
${PYTHON2} ../util/colorize.py . 0; \
cd ..
clean:
rm -f src-python2/chardet/*.pyc
rm -f src-python3/chardet/*.pyc
rm -f util/*.pyc
rm -rf build
rm -rf dist
rm -rf docs/dist
maintainer-clean: clean
rm -f docs/*.html
release-check:
${PYTHON2} util/releasecheck.py
dist: validate
cd docs; \
mkdir -p dist/docs/; \
rsync -az ../css dist/docs/; \
rsync -az images dist/docs/; \
${XSLTPROC} xsl/htmldist.xsl xml/chardet.xml; \
${PYTHON2} ../util/colorize.py dist/docs/ 0; \
cd ..
mkdir -p dist/python2-chardet-${VERSION}
cp COPYING dist/python2-chardet-${VERSION}
cp src-python2/setup.py dist/python2-chardet-${VERSION}
rsync -az src-python2/chardet dist/python2-chardet-${VERSION}
rsync -az docs/dist/docs dist/python2-chardet-${VERSION}
cd dist; \
tar cfz python2-chardet-${VERSION}.tgz python2-chardet-${VERSION}; \
cd ..
mkdir -p dist/python3-chardet-${VERSION}
cp COPYING dist/python3-chardet-${VERSION}
cp src-python3/setup.py dist/python3-chardet-${VERSION}
rsync -az src-python3/chardet dist/python3-chardet-${VERSION}
rsync -az docs/dist/docs dist/python3-chardet-${VERSION}
cd dist; \
tar cfz python3-chardet-${VERSION}.tgz python3-chardet-${VERSION}; \
cd ..
mkdir -p dist/chardet-tests-${VERSION}
rsync -az tests dist/chardet-tests-${VERSION}
cd dist; \
tar cfz chardet-tests-${VERSION}.tgz chardet-tests-${VERSION}; \
cd ..
ls -l dist
all: validate release-check maintainer-clean docs dist