diff --git a/makefile b/makefile index 4d5da93..db34e67 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,6 @@ # Build a release of tconfpy using 'make' -# $Id: makefile,v 1.100 2005/01/14 11:08:21 tundra Exp $ +# $Id: makefile,v 1.101 2005/01/15 08:57:55 tundra Exp $ +# Requires a modern 'make' like GNU. # Syntax is: make target VER=version-number @@ -7,100 +8,82 @@ TESTPROG=test-tc -COLOR= -#COLOR=--color +DIR = py-${PROGNAME}-${VER} -DIR=py-${PROGNAME}-${VER} -PROGFILES=${PROGNAME}.py -BASEFILES=${PROGNAME}.3 ${TESTPROG}.1 -SUPPFILES=${TESTPROG}.py Makefile ${PROGNAME}-license.txt READ-1ST.txt WHATSNEW.txt setup.py example.cfg -DOCFILES=CHANGELOG.txt ${PROGNAME}.html \ - ${PROGNAME}.pdf ${PROGNAME}.ps ${PROGNAME}.py.ps ${PROGNAME}.txt \ - ${TESTPROG}.pdf ${TESTPROG}.ps ${TESTPROG}.py.ps ${TESTPROG}.txt \ - ${TESTPROG}.1.gz ${PROGNAME}.3.gz +PROGFILES = ${PROGNAME}.py ${TESTPROG}.py +MANFILES = ${PROGNAME}.3 ${TESTPROG}.1 -# Clean Up +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$<.ps $@ + +%.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 -f ${PROGFILES} ${BASEFILES} ${SUPPFILES} ${DOCFILES} + @rm -f ${PROGFILES} ${MANFILES} ${SUPPFILES} ${DOCFILES} -# Checkout The Required Files - -${PROGFILES}: - @co -r${VER} $* - -${BASEFILES} ${SUPPFILES}: - @co $* - -# Pretty Print The Source Code - -${PROGNAME}.py.ps: ${PROGNAME}.py - @enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow ${COLOR} -p${PROGNAME}.py.ps ${PROGNAME}.py - -${TESTPROG}.py.ps: ${TESTPROG}.py - @enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow ${COLOR} -p${TESTPROG}.py.ps ${TESTPROG}.py - - -# Build Documentation CHANGELOG.txt: @rlog ${PROGNAME}.py >CHANGELOG.txt -${PROGNAME}.html: ${PROGNAME}.3 - @manserver ${PROGNAME}.3 >${PROGNAME}.html -${PROGNAME}.ps: ${PROGNAME}.3 - @groff -man -Tps ${PROGNAME}.3 >${PROGNAME}.ps - -${PROGNAME}.txt: ${PROGNAME}.3 - @groff -man -Tascii ${PROGNAME}.3 | col -xb >${PROGNAME}.txt - -${PROGNAME}.3.gz: ${PROGNAME}.3 - @gzip ${PROGNAME}.3 - -${PROGNAME}.pdf: ${PROGNAME}.ps - @gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=${PROGNAME}.pdf ${PROGNAME}.ps - -${TESTPROG}.html: ${TESTPROG}.1 - @manserver ${TESTPROG}.1 >${TESTPROG}.html - -${TESTPROG}.ps: ${TESTPROG}.1 - @groff -man -Tps ${TESTPROG}.1 >${TESTPROG}.ps - -${TESTPROG}.txt: ${TESTPROG}.1 - @groff -man -Tascii ${TESTPROG}.1 | col -xb >${TESTPROG}.txt - -${TESTPROG}.1.gz: ${TESTPROG}.1 - @gzip ${TESTPROG}.1 - -${TESTPROG}.pdf: ${TESTPROG}.ps - @gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=${TESTPROG}.pdf ${TESTPROG}.ps - -docs: ${SUPPFILES} ${DOCFILES} +docs: ${DOCFILES} ${SUPPFILES} @chmod 644 ${DOCFILES} ${SUPPFILES} @chmod 644 *.gz *.txt @flip -u *txt -# Package A Release - -release: docs - @co -l WHATSNEW.txt - @echo "WHATSNEW For 'tconfpy' ${VER} (`date`)" > wntmp1 - @echo "----------------------------------------------------------------------" >> wntmp1 - @echo "" >> wntmp1 - @cat wntmp1 WHATSNEW.txt >wntmp2 - @mv wntmp2 WHATSNEW.txt - @emacs -nw WHATSNEW.txt - @ci WHATSNEW.txt - @rm wntmp1 - @co WHATSNEW.txt - @chmod 644 WHATSNEW.txt - @mkdir ${DIR} - @chmod 755 ${PROGFILES} ${TESTPROG}.py - @mv ${PROGFILES} ${SUPPFILES} ${DOCFILES} ${DIR} - @tar -czvf ${DIR}.tar.gz ${DIR} +#release: docs +# @co -l WHATSNEW.txt +# @echo "WHATSNEW For 'tconfpy' ${VER} (`date`)" > wntmp1 +# @echo "----------------------------------------------------------------------" >> wntmp1 +# @echo "" >> wntmp1 +# @cat wntmp1 WHATSNEW.txt >wntmp2 +# @mv wntmp2 WHATSNEW.txt +# @emacs -nw WHATSNEW.txt +# @ci WHATSNEW.txt +# @rm wntmp1 +# @co WHATSNEW.txt +# @chmod 644 WHATSNEW.txt +# @mkdir ${DIR} +# @chmod 755 ${PROGFILES} ${TESTPROG}.py +# @mv ${PROGFILES} ${SUPPFILES} ${DOCFILES} ${DIR} +# @tar -czvf ${DIR}.tar.gz ${DIR} # @rm -rf ${DIR} # @mv ${DIR}.tar.gz Releases