Newer
Older
mkapachepw / makefile
@root root on 7 Apr 2005 2 KB Removed setup.py.
  1. # Build a release of tconfpy using 'make'
  2. # $Id: makefile,v 1.102 2005/04/07 18:16:37 root Exp $
  3. # Requires a modern 'make' like GNU.
  4.  
  5.  
  6. # Uncomment One Of The Following For Early Releases
  7.  
  8. #EARLY = Alpha
  9. #EARLY = Beta
  10. #EARLY = RC1
  11.  
  12. #####
  13. # Definitions Relevant To This Program
  14. #####
  15.  
  16. PROGNAME = mkapachepw
  17.  
  18. PORTNAME = ${PROGNAME}
  19.  
  20. PROGFILES = ${PROGNAME}.py
  21.  
  22. SUPPFILES = ${PROGNAME}-license.txt CHANGELOG.txt Makefile WHATSNEW.txt
  23.  
  24. DOCFILES = ${PROGNAME}.html ${PROGNAME}.pdf ${PROGNAME}.ps ${PROGNAME}.py.ps ${PROGNAME}.txt \
  25. ${PROGNAME}.1.gz
  26.  
  27.  
  28. #####
  29. # Nothing Should Need To Change Below This Line
  30. #####
  31.  
  32.  
  33. DIR = ${PORTNAME}-${VERSION}
  34. HEADER1 = "WHATSNEW For '${PROGNAME}' ${VERSION} (`date`)"
  35. HEADER2 = "----------------------------------------------------------------------"
  36. TARBALL = ${DIR}.tar.gz
  37. TMPFILE = tmpfile
  38. VERSION = $(shell rlog -v ${PROGNAME}.py | cut -f 2 -d " ")${EARLY}
  39.  
  40.  
  41. #####
  42. # Pattern Rules
  43. #####
  44.  
  45. %.html: %.1
  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} *.core *~
  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 -m${HEADER1} $@
  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.  
  109.