home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / intercal.zip / doc / Makefile < prev    next >
Makefile  |  1996-06-12  |  1KB  |  44 lines

  1. #
  2. # Makefile for the Intercal documentation
  3. #
  4.  
  5. # To see the Revised Manual, generate intercal.txt or intercal.ps
  6. # To see the original INTERCAL-72 manual, generate original.txt or original.ps.
  7.  
  8. # We make two passes in order to resolve SETR/GETNH references.
  9. # The sed hackery strips the trailing dots from level 1 section references.
  10.  
  11. all: intercal.ps intercal.txt original.ps original.txt
  12.  
  13. intercal.ps: intercal.mm
  14.     groff -dc=y -Tps    -p -t -mgm intercal.mm >/dev/null
  15.     sed <intercal.refs.tmp -e '/hn \([0-9]*\)\.$$/s//hn \1/' >tmp.refs;
  16.     mv tmp.refs intercal.refs.tmp
  17.     groff -dc=y -Tps    -p -t -mgm intercal.mm >intercal.ps
  18.     rm intercal.refs.qrf
  19.  
  20. original.ps: intercal.mm
  21.     groff -dc=n -Tps    -p -t -mgm intercal.mm >/dev/null
  22.     sed <intercal.refs.tmp -e '/hn \([0-9]*\)\.$$/s//hn \1/' >tmp.refs;
  23.     mv tmp.refs intercal.refs.tmp
  24.     groff -dc=n -Tps    -p -t -mgm intercal.mm >original.ps
  25.     rm intercal.refs.qrf
  26.  
  27. intercal.txt: intercal.mm
  28.     groff -dc=y -Tascii -p -t -mgm intercal.mm >/dev/null
  29.     sed <intercal.refs.tmp -e '/hn \([0-9]*\)\.$$/s//hn \1/' >tmp.refs;
  30.     mv tmp.refs intercal.refs.tmp
  31.     groff -dc=y -Tascii -p -t -mgm intercal.mm >intercal.txt
  32.     rm intercal.refs.qrf
  33.  
  34. original.txt: intercal.mm
  35.     groff -dc=n -Tascii -p -t -mgm intercal.mm >/dev/null
  36.     sed <intercal.refs.tmp -e '/hn \([0-9]*\)\.$$/s//hn \1/' >tmp.refs;
  37.     mv tmp.refs intercal.refs.tmp
  38.     groff -dc=n -Tascii -p -t -mgm intercal.mm >original.txt
  39.     rm intercal.refs.qrf
  40.  
  41. clean:
  42.     rm -f *.ps *.txt *.refs*
  43.  
  44.