- # Build a release of tconfpy using 'make'
- # $Id: makefile,v 1.106 2005/01/16 10:32:52 tundra Exp $
- # Requires a modern 'make' like GNU.
-
-
- PROGNAME=tconfpy
- TESTPROG=test-tc
-
- VERSION = $(shell rlog -v ${PROGNAME}.py | cut -f 2 -d " ")
-
- HEADER1 = "WHATSNEW For '${PROGNAME}' ${VERSION} (`date`)"
- HEADER2 = "----------------------------------------------------------------------"
-
- TMPFILE = tmpfile
-
- PREFIX = py-${PROGNAME}
- DIR = ${PREFIX}-${VERSION}
- TARBALL = ${DIR}.tar.gz
-
- PROGFILES = ${PROGNAME}.py ${TESTPROG}.py
-
- SUPPFILES = ${PROGNAME}-license.txt CHANGELOG.txt Makefile READ-1ST.txt WHATSNEW.txt setup.py example.cfg
-
- DOCFILES = ${PROGNAME}.html ${PROGNAME}.pdf ${PROGNAME}.ps ${PROGNAME}.py.ps ${PROGNAME}.txt \
- ${TESTPROG}.html ${TESTPROG}.pdf ${TESTPROG}.ps ${TESTPROG}.py.ps ${TESTPROG}.txt \
- ${TESTPROG}.1.gz ${PROGNAME}.3.gz
-
-
- #####
- # Pattern Rules
- #####
-
- %.html: %.1
- @manserver $< >$@
-
- %.html: %.3
- @manserver $< >$@
-
- %.pdf: %.ps
- @gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$@ $<
-
- %.ps: %.1
- @groff -man -Tps $< >$@
-
- %.ps: %.3
- @groff -man -Tps $< >$@
-
- %.py.ps: %.py
- @enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow -p$@ $<
-
- %.txt: %.1
- @groff -man -Tascii $< | col -xb >$@
-
- %.txt: %.3
- @groff -man -Tascii $< | col -xb >$@
-
- %.1.gz: %.1
- @gzip $<
-
- %.3.gz: %.3
- @gzip $<
-
- #####
- # Actual Build Rules
- #####
-
- clean:
- @rm -rf ${DOCFILES} ${PROGFILES} ${SUPPFILES} ${DIR} ${PREFIX}* ${TMPFILE}
-
- version:
- @echo ${VERSION}
-
- CHANGELOG.txt:
- @rlog ${PROGNAME}.py >CHANGELOG.txt
-
- WHATSNEW.txt:
- @co -l $@
- @printf "%s\n%s\n\n\n" ${HEADER1} ${HEADER2} | cat - $@ >${TMPFILE}
- @mv ${TMPFILE} $@
- @emacs $@
- @ci $@
- @co $@
-
- docs: ${DOCFILES} ${SUPPFILES}
- @chmod 644 ${DOCFILES} ${SUPPFILES}
- @chmod 644 *.gz *.txt
- @flip -u *txt
-
- progs: ${PROGFILES}
- chmod 755 ${PROGFILES}
-
- release: docs progs
- @mkdir ${DIR}
- @mv ${DOCFILES} ${PROGFILES} ${SUPPFILES} ${DIR}
- @tar -czvf ${DIR}.tar.gz ${DIR}
- @rm -rf ${DIR}
- # @mv ${DIR}.tar.gz Releases
-
-