# Build a release of tconfpy using 'make' # $Id: makefile,v 1.115 2012/06/09 19:22:59 tundra Exp $ # Requires a modern 'make' like GNU. # Uncomment One Of The Following For Early Releases #EARLY = Alpha #EARLY = Beta #EARLY = RC1 ##### # Definitions Relevant To This Program ##### PROGNAME=tconfpy TESTPROG=test-tc PORTNAME = py-${PROGNAME} 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 ##### # Nothing Should Need To Change Below This Line ##### DIR = ${PORTNAME}-${VERSION} HEADER1 = "WHATSNEW For '${PROGNAME}' ${VERSION} (`date`)" HEADER2 = "----------------------------------------------------------------------" TARBALL = ${DIR}.tar.gz TMPFILE = tmpfile VERSION = $(shell cvs log ${PROGNAME}.py | grep ^head\: | cut -f2 -d " ")${EARLY} ##### # 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 ##### FORCE: CHANGELOG.txt: FORCE @cvs log ${PROGNAME}.py >CHANGELOG.txt WHATSNEW.txt: FORCE @printf "%s\n%s\n\n" ${HEADER1} ${HEADER2} | cat - $@ >${TMPFILE} @mv ${TMPFILE} $@ @emacs -nw $@ @cvs commit -m${HEADER1} $@ 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 ${TARBALL} ${DIR} @rm -rf ${DIR} @mkdir Releases @mv ${DIR}.tar.gz Releases ##### # Housekeeping ##### clean: @rm -rf *~ *.1 *.1.gz *.aux *.core *.dvi *.latex *.log *.out tmpfile *.toc version: @echo ${VERSION} scrub: clean @rm -rf ${DIR} ${PROGFILES} ${DOCS} ${PROGDOCS} ${TARBALL} ${TMPFILE} init: scrub cvs update