| 1 |
# dogtail *development* Makefile |
| 2 |
|
| 3 |
all: install3 install2 |
| 4 |
|
| 5 |
install: clean |
| 6 |
python setup.py build |
| 7 |
python setup.py install --root=$(DESTDIR) |
| 8 |
|
| 9 |
|
| 10 |
install3: clean3 |
| 11 |
python3 setup.py build |
| 12 |
python3 setup.py install --root=$(DESTDIR) |
| 13 |
|
| 14 |
install2: clean2 |
| 15 |
python2 setup.py build |
| 16 |
python2 setup.py install --root=$(DESTDIR) |
| 17 |
|
| 18 |
clean: |
| 19 |
rm -rf api_docs/ |
| 20 |
rm -f MANIFEST |
| 21 |
rm -rf build dist |
| 22 |
find . -name '*.pyc' -exec rm {} \; |
| 23 |
|
| 24 |
clean2: clean |
| 25 |
python2 setup.py clean |
| 26 |
|
| 27 |
clean3: clean |
| 28 |
python3 setup.py clean |
| 29 |
|
| 30 |
check: |
| 31 |
pep8 --max-line-length=120 dogtail/*.py tests/*.py scripts/* sniff/sniff |
| 32 |
|
| 33 |
test: |
| 34 |
LC_ALL=C nose2 tests |
| 35 |
|
| 36 |
tarball: |
| 37 |
python3 setup.py sdist |
| 38 |
|
| 39 |
rpm: tarball |
| 40 |
# Build using the custom rpmrc in the rpms/ sub-dir |
| 41 |
rpmbuild -tb dist/dogtail-*.tar.gz |
| 42 |
# Move the source and binary RPMs to dist/ |
| 43 |
mv ~/rpmbuild/RPMS/noarch/* dist/ |
| 44 |
|
| 45 |
srpm: rpm_prep |
| 46 |
# Build using the custom rpmrc in the rpms/ sub-dir |
| 47 |
rpmbuild --rcfile /usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc:`pwd`/rpms/tmp.rpmrc -ts dist/dogtail-*.tar.gz |
| 48 |
# Move the source and binary RPMs to dist/ |
| 49 |
mv rpms/SRPMS/* dist/ |
| 50 |
rm -rf rpms/ |
| 51 |
|
| 52 |
apidocs: apidocs_html apidocs_pdf |
| 53 |
|
| 54 |
apidocs_html: |
| 55 |
epydoc --html --config epydoc.conf |
| 56 |
|
| 57 |
apidocs_pdf: |
| 58 |
epydoc --pdf --config epydoc.conf |
| 59 |
mv api_docs/api.pdf api_docs/dogtail.pdf |
| 60 |
|
| 61 |
update_apidocs: apidocs |
| 62 |
# Sadly, I'm still the only one who can update the API docs. |
| 63 |
ssh [email protected] rm -rf \~/public_html/dogtail/epydoc/* |
| 64 |
scp api_docs/*.{html,css,png,pdf} [email protected]:~/public_html/dogtail/epydoc/ |