root/Makefile
| Revision 344:016713cb2807, 1.9 kB (checked in by Stefan Schwarzer <sschwarzer@sschwarzer.net>, 5 months ago) |
|---|
| Line | |
|---|---|
| 1 | # Copyright (C) 2007, Stefan Schwarzer |
| 2 | # |
| 3 | # Permission is hereby granted, free of charge, to any person |
| 4 | # obtaining a copy of this software and associated documentation files |
| 5 | # (the "Software"), to deal in the Software without restriction, |
| 6 | # including without limitation the rights to use, copy, modify, merge, |
| 7 | # publish, distribute, sublicense, and/or sell copies of the Software, |
| 8 | # and to permit persons to whom the Software is furnished to do so, |
| 9 | # subject to the following conditions: |
| 10 | # |
| 11 | # The above copyright notice and this permission notice shall be |
| 12 | # included in all copies or substantial portions of the Software. |
| 13 | # |
| 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 17 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
| 18 | # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
| 19 | # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 20 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 21 | # SOFTWARE. |
| 22 | |
| 23 | SHELL = /bin/sh |
| 24 | # assume that the current directory is the project directory; |
| 25 | # don't hard-wire the directory |
| 26 | PROJECT_DIR := $(shell pwd) |
| 27 | DOC_FILES = README.html |
| 28 | STYLESHEET_PATH = doc.css |
| 29 | SED = sed -i'' -r -e |
| 30 | |
| 31 | .PHONY: dist extdist test docs clean register |
| 32 | .SUFFIXES: .txt .html |
| 33 | |
| 34 | test: |
| 35 | (cd ${PROJECT_DIR} && python test.py) |
| 36 | |
| 37 | .txt.html: |
| 38 | rst2html --stylesheet-path=${STYLESHEET_PATH} --embed-stylesheet $< $@ |
| 39 | |
| 40 | docs: ${DOC_FILES} README.txt |
| 41 | |
| 42 | dist: clean test docs |
| 43 | # wsbrowser is a startscript for Unix, wsbrowser.py for Windows |
| 44 | cp scripts/wsbrowser scripts/wsbrowser.py |
| 45 | python setup.py sdist --formats=gztar,zip |
| 46 | # python setup.py bdist --formats=wininst |
| 47 | |
| 48 | register: |
| 49 | @echo "Registering new version with PyPI" |
| 50 | python setup.py register |
| 51 | |
| 52 | extdist: dist register |
| 53 | |
| 54 | clean: |
| 55 | rm -f ${DOC_FILES} |
| 56 | # use absolute path to ensure we delete the right directory |
| 57 | rm -rf ${PROJECT_DIR}/build |
| 58 |
Note: See TracBrowser for help on using the browser.