Newer
Older
twander / makefile
@tundra tundra on 11 Jan 2005 1 KB First full working version
  1. # Build a release of twander using 'make'
  2. # $Id: makefile,v 1.101 2005/01/11 10:24:36 tundra Exp $
  3.  
  4. # Syntax is: make target VER=version-number
  5.  
  6. PROGNAME=twander
  7.  
  8.  
  9. COLOR=
  10. #COLOR=--color
  11.  
  12. DIR=twander-${VER}
  13. PROGFILES=${PROGNAME}.py
  14. BASEFILES=${PROGNAME}.1
  15. SUPPFILES=Makefile ${PROGNAME}-license.txt .${PROGNAME} READ-1ST.txt WHATSNEW.txt
  16. DOCFILES=CHANGELOG.txt ${PROGNAME}.html ${PROGNAME}.pdf ${PROGNAME}.ps ${PROGNAME}.py.ps ${PROGNAME}.txt ${PROGNAME}.1.gz
  17.  
  18.  
  19. # Clean Up
  20.  
  21. clean:
  22. @rm -f ${PROGFILES} ${BASEFILES} ${SUPPFILES} ${DOCFILES}
  23.  
  24. # Checkout The Required Files
  25.  
  26. ${PROGFILES}:
  27. @co -r${VER} $*
  28.  
  29. ${BASEFILES} ${SUPPFILES}:
  30. @co $*
  31.  
  32. # Pretty Print The Source Code
  33.  
  34. ${PROGNAME}.py.ps: ${PROGNAME}.py
  35. @enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow ${COLOR} -p${PROGNAME}.py.ps ${PROGNAME}.py
  36.  
  37.  
  38. # Build Documentation
  39.  
  40. CHANGELOG.txt:
  41. @rlog ${PROGNAME}.py >CHANGELOG.txt
  42.  
  43. ${PROGNAME}.html: ${PROGNAME}.1
  44. @manserver ${PROGNAME}.1 >${PROGNAME}.html
  45.  
  46. ${PROGNAME}.ps: ${PROGNAME}.1
  47. @groff -man -Tps ${PROGNAME}.1 >${PROGNAME}.ps
  48.  
  49. ${PROGNAME}.txt: ${PROGNAME}.1
  50. @groff -man -Tascii ${PROGNAME}.1 | col -xb >${PROGNAME}.txt
  51.  
  52. ${PROGNAME}.1.gz: ${PROGNAME}.1
  53. @gzip ${PROGNAME}.1
  54.  
  55. ${PROGNAME}.pdf: ${PROGNAME}.ps
  56. @gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=${PROGNAME}.pdf ${PROGNAME}.ps
  57.  
  58. docs: ${SUPPFILES} ${DOCFILES}
  59. @chmod 644 ${DOCFILES} ${SUPPFILES}
  60. @chmod 644 *.gz *.txt
  61. @flip -u *txt
  62.  
  63.  
  64.  
  65. # Package A Release
  66.  
  67. release: docs
  68. @mkdir ${DIR}
  69. @chmod 755 ${PROGFILES}
  70. @mv ${PROGFILES} ${SUPPFILES} ${DOCFILES} ${DIR}
  71. @tar -czvf ${DIR}.tar.gz ${DIR}
  72. @rm -rf ${DIR}
  73. @mv ${DIR}.tar.gz Releases
  74.  
  75.