Newer
Older
twander / makefile
@tundra tundra on 2 Feb 2005 2 KB Minor cosmetic cleanup.
  1. # Build a release of twander using 'make'
  2. # $Id: makefile,v 1.108 2005/02/02 23:54:05 tundra Exp $
  3.  
  4. # Uncomment One Of The Following For Early Releases
  5.  
  6. #EARLY = Alpha
  7. #EARLY = Beta
  8. #EARLY = RC1
  9.  
  10. #####
  11. # Definitions Relevant To This Program
  12. #####
  13.  
  14. PROGNAME = twander
  15.  
  16. PORTNAME = ${PROGNAME}
  17.  
  18. PROGFILES = ${PROGNAME}.py
  19.  
  20. SUPPFILES = .${PROGNAME} ${PROGNAME}-license.txt CHANGELOG.txt Makefile READ-1ST.txt WHATSNEW.txt
  21.  
  22. DOCFILES = ${PROGNAME}.html ${PROGNAME}.pdf ${PROGNAME}.ps ${PROGNAME}.py.ps ${PROGNAME}.txt ${PROGNAME}.1.gz
  23.  
  24.  
  25. #####
  26. # Nothing Should Need To Change Below This Line
  27. #####
  28.  
  29.  
  30. DIR = ${PORTNAME}-${VERSION}
  31. HEADER1 = "WHATSNEW For '${PROGNAME}' ${VERSION} (`date`)"
  32. HEADER2 = "----------------------------------------------------------------------"
  33. TARBALL = ${DIR}.tar.gz
  34. TMPFILE = tmpfile
  35. VERSION = $(shell rlog -v ${PROGNAME}.py | cut -f 2 -d " ")${EARLY}
  36.  
  37.  
  38. #####
  39. # Pattern Rules
  40. #####
  41.  
  42. %.html: %.1
  43. @manserver $< >$@
  44.  
  45. %.html: %.3
  46. @manserver $< >$@
  47.  
  48. %.pdf: %.ps
  49. @gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$@ $<
  50.  
  51. %.ps: %.1
  52. @groff -man -Tps $< >$@
  53.  
  54. %.ps: %.3
  55. @groff -man -Tps $< >$@
  56.  
  57. %.py.ps: %.py
  58. @enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow -p$@ $<
  59.  
  60. %.txt: %.1
  61. @groff -man -Tascii $< | col -xb >$@
  62.  
  63. %.txt: %.3
  64. @groff -man -Tascii $< | col -xb >$@
  65.  
  66. %.1.gz: %.1
  67. @gzip $<
  68.  
  69. %.3.gz: %.3
  70. @gzip $<
  71.  
  72.  
  73. #####
  74. # Actual Build Rules
  75. #####
  76.  
  77. clean:
  78. @rm -rf ${DIR} ${DOCFILES} ${PORTNAME} ${PROGFILES} ${SUPPFILES} ${TARBALL} ${TMPFILE} ${PROGNAME}.3 *.pyc *.pyo *~
  79.  
  80. version:
  81. @echo ${VERSION}
  82.  
  83. CHANGELOG.txt:
  84. @rlog ${PROGNAME}.py >CHANGELOG.txt
  85.  
  86. WHATSNEW.txt:
  87. @co -l $@
  88. @printf "%s\n%s\n\n" ${HEADER1} ${HEADER2} | cat - $@ >${TMPFILE}
  89. @mv ${TMPFILE} $@
  90. @emacs $@
  91. @ci $@
  92. @co $@
  93.  
  94. docs: ${DOCFILES} ${SUPPFILES}
  95. @chmod 644 ${DOCFILES} ${SUPPFILES}
  96. @chmod 644 *.gz *.txt
  97. @flip -u *txt
  98.  
  99. progs: ${PROGFILES}
  100. chmod 755 ${PROGFILES}
  101.  
  102. release: docs progs
  103. @mkdir ${DIR}
  104. @mv ${DOCFILES} ${PROGFILES} ${SUPPFILES} ${DIR}
  105. @tar -czvf ${TARBALL} ${DIR}
  106. @rm -rf ${DIR}
  107. # @mv ${DIR}.tar.gz Releases
  108.