diff --git a/makefile b/makefile index 51deb24..b738894 100644 --- a/makefile +++ b/makefile @@ -1,75 +1,75 @@ # Build a release of twander using 'make' -# $Id: makefile,v 1.100 2005/01/11 08:30:47 tundra Exp $ +# $Id: makefile,v 1.101 2005/01/11 10:24:36 tundra Exp $ + +# Syntax is: make target VER=version-number + +PROGNAME=twander + COLOR= #COLOR=--color -PROGFILE=twander.py -MANPAGE=twander.1 -SUPPFILES=Makefile twander-license.txt .twander READ-1ST.txt WHATSNEW.txt -DOCFILES=CHANGELOG.txt twander.html twander.pdf twander.ps twander.py.ps twander.txt +DIR=twander-${VER} +PROGFILES=${PROGNAME}.py +BASEFILES=${PROGNAME}.1 +SUPPFILES=Makefile ${PROGNAME}-license.txt .${PROGNAME} READ-1ST.txt WHATSNEW.txt +DOCFILES=CHANGELOG.txt ${PROGNAME}.html ${PROGNAME}.pdf ${PROGNAME}.ps ${PROGNAME}.py.ps ${PROGNAME}.txt ${PROGNAME}.1.gz -# Define the baseline files -${SUPPFILES}: - co $* +# Clean Up -twander.py: - co twander.py - chmod 755 twander.py +clean: + @rm -f ${PROGFILES} ${BASEFILES} ${SUPPFILES} ${DOCFILES} -twander.1: - co twander.1 +# Checkout The Required Files +${PROGFILES}: + @co -r${VER} $* + +${BASEFILES} ${SUPPFILES}: + @co $* # Pretty Print The Source Code -twander.py.ps: twander.py - enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow ${COLOR} -ptwander.py.ps twander.py +${PROGNAME}.py.ps: ${PROGNAME}.py + @enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow ${COLOR} -p${PROGNAME}.py.ps ${PROGNAME}.py # Build Documentation CHANGELOG.txt: - rlog twander.py >CHANGELOG.txt + @rlog ${PROGNAME}.py >CHANGELOG.txt -twander.html: twander.1 - manserver twander.1 >twander.html +${PROGNAME}.html: ${PROGNAME}.1 + @manserver ${PROGNAME}.1 >${PROGNAME}.html -twander.ps: twander.1 - groff -man -Tps twander.1 >twander.ps +${PROGNAME}.ps: ${PROGNAME}.1 + @groff -man -Tps ${PROGNAME}.1 >${PROGNAME}.ps -twander.pdf: twander.ps - gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=twander.pdf twander.ps +${PROGNAME}.txt: ${PROGNAME}.1 + @groff -man -Tascii ${PROGNAME}.1 | col -xb >${PROGNAME}.txt -twander.txt: twander.1 - groff -man -Tascii twander.1 | col -xb >twander.txt +${PROGNAME}.1.gz: ${PROGNAME}.1 + @gzip ${PROGNAME}.1 -docs: ${DOCFILES} ${SUPPFILES} - chmod 644 ${DOCFILES} ${SUPFILES} - gzip *.1 - chmod 644 *.gz *.txt +${PROGNAME}.pdf: ${PROGNAME}.ps + @gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=${PROGNAME}.pdf ${PROGNAME}.ps + +docs: ${SUPPFILES} ${DOCFILES} + @chmod 644 ${DOCFILES} ${SUPPFILES} + @chmod 644 *.gz *.txt + @flip -u *txt +# Package A Release +release: docs + @mkdir ${DIR} + @chmod 755 ${PROGFILES} + @mv ${PROGFILES} ${SUPPFILES} ${DOCFILES} ${DIR} + @tar -czvf ${DIR}.tar.gz ${DIR} + @rm -rf ${DIR} + @mv ${DIR}.tar.gz Releases - -# Extract Files From RCS - -#co -r$1 $PROGFILE - -# -## Build And Save The Release -# -#mv $PROGFILE $SUPPFILES $DOCFILES $DIR -#mv *.gz $DIR - -#flip -vm $DIR/*txt -#tar -czvf $DIR.tar.gz $DIR -#mv $DIR.tar.gz Releases -# -# Remove Working Directory -#rm -rf $DIR -