# Build a release of tperimeter using 'make' # $Id: makefile,v 1.116 2010/11/18 16:12:05 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 = tperimeter PORTNAME = ${PROGNAME} PROGFILES = ${PROGNAME}.py ${PROGNAME}-ui.html rebuild-hosts.allow.sh SUPPFILES = ${PROGNAME}-license.txt CHANGELOG.txt WHATSNEW.txt DOCFILES = ${PROGNAME}.latex ${PROGNAME}.dvi ${PROGNAME}.html ${PROGNAME}.pdf ${PROGNAME}.ps ${PROGNAME}.py.ps ${PROGNAME}.1.gz \ ${PROGNAME}-ui.html.ps rebuild-hosts.allow.sh.ps SAMPLE = ${PROGNAME}-sample.tar.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 rlog -v ${PROGNAME}.py | cut -f 2 -d " ")${EARLY} ##### # Pattern Rules ##### %.dvi: %.latex latex $< %.html: %.1 @manserver $< >$@ %.html: %.txt rst2html $< >$@ %.latex: %.txt rst2latex $< >$@ %.pdf: %.dvi @dvipdf $< $@ %.pdf: %.ps @gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$@ $< %.ps: %.1 @groff -man -Tps $< >$@ %.ps: %.dvi dvips $< >$@ %.html.ps: %.html @enscript -Ehtml -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow -p$@ $< %.py.ps: %.py @enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow -p$@ $< %.sh.ps: %.sh @enscript -Esh -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 $< %.1: %.txt cat $< >$@ %.3.gz: %.3 @gzip $< ##### # Actual Build Rules ##### clean: @rm -rf ${DIR} ${DOCFILES} ${PORTNAME} ${PROGFILES} ${SUPPFILES} ${TMPFILE} *.aux *.dvi *.log *.out *.core *.tar.gz *.txt *~ version: @echo ${VERSION} CHANGELOG.txt: @rlog ${PROGNAME}.py >CHANGELOG.txt @rlog ${PROGNAME}-ui.html >>CHANGELOG.txt @rlog rebuild-hosts.allow.sh >>CHANGELOG.txt WHATSNEW.txt: @co -l $@ @printf "%s\n%s\n\n" ${HEADER1} ${HEADER2} | cat - $@ >${TMPFILE} @mv ${TMPFILE} $@ @emacs $@ @ci -m${HEADER1} $@ @co $@ docs: ${DOCFILES} ${SUPPFILES} @chmod 644 ${DOCFILES} ${SUPPFILES} @chmod 644 *.gz *.txt @flip -u *txt progs: ${PROGFILES} chmod 740 ${PROGFILES} release: docs progs @mkdir -p ${DIR}/docs ${DIR}/progs @mv ${DOCFILES} ${DIR}/docs @mv ${PROGFILES} ${DIR}/progs @mv ${SUPPFILES} ${DIR} co ${SAMPLE} && cd ${DIR} && tar -xzvf ../${SAMPLE} @tar -czvf ${TARBALL} ${DIR} @rm -rf ${DIR} @mv ${DIR}.tar.gz Releases @gmake clean