home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume20 / epf / part01 / Makefile < prev    next >
Makefile  |  1989-10-24  |  4KB  |  136 lines

  1. #TESTING:
  2. #
  3. #(1) Create two files in "/usr/lib/term" that you can write upon, that
  4. #can be recognized as tab files by nroff, and that do not conflict with
  5. #system file names (makefile defaults are tabepstst and tabepstst-12).
  6. #If the default names are not used, redefine T and T12.  Uncomment the
  7. #lines marked "careful" in the *.tab targets.
  8. #
  9. #(2) Identify a device in LP and LP12 that can pass a file through to an
  10. #LQ-type printer, without altering it.  The makefile default is
  11. #">/dev/epson".  If you use it, you probably will have to configure the
  12. #printer ports by hand, to put them into raw mode.  The drivers put the
  13. #printer into pica or elite mode, but do no other configuration.  The
  14. #file "epson" is a printer interface script that has options for printer
  15. #configuration and calls a routine to configure the printer ports.
  16. #
  17. #(3) run:     make test test12
  18.  
  19. #Table.c and table.h are required to compile the nroff driver.
  20. #They are from the Townsend package, in volume 13 of comp.sourcs.unix.
  21. #The full package is well worth extracting from a sources archive 
  22. #(elbat, to disassemble a driver; table.5, the man page; and more).
  23.  
  24. CFLAGS = -O
  25. #CFLAGS = -g
  26. #LDFLAGS
  27.  
  28. #need writable files in driver directory, with names that 
  29. #do not conflict with system files
  30. T =    epstst
  31. T12 =    epstst-12
  32. TERMFILE = /usr/lib/term/tab$(T)
  33. TERMFILE12 = /usr/lib/term/tab$(T12)
  34.  
  35. #Set up LP and LP12 to pass stream without processing.
  36. #May have to configure printer port and printer by hand.
  37. LP = >/dev/epson
  38. LP12 = >/dev/epson
  39. #if have installed install "epson" or equivalent in lp/interface
  40. #LP = | lp -depson -setlp -ounidiron -olq -onofilter
  41. #LP12 = | lp -depson -osetlp -ounidiron -olq -onofilter -oresetpica
  42.  
  43. #for installation only
  44. BINDIR = /usr/local/bin
  45. PUBDIR = /usr/pub
  46. MAN1DIR = /usr/man/new/man1
  47. MAN5DIR = /usr/man/new/man5
  48.  
  49. dummy:
  50.     @echo please give a target
  51.  
  52. all:    epf  nobs tabepson.tab tabepson12.tab
  53.  
  54. epf:    epf.c matrix.h
  55.     cc $(CFLAGS) $(LDFLAGS) epf.c -o epf
  56.  
  57. nobs:    nobs.c
  58.     cc $(CFLAGS) $(LDFLAGS) nobs.c -o nobs
  59.  
  60. tabepson.tab:    tabepson.o table.o
  61.     cc tabepson.o table.o
  62.     a.out tabepson.tab
  63.     cp tabepson.tab $(TERMFILE)        #careful!
  64.  
  65. tabepson12.tab:    tabepson12.o table.o
  66.     cc tabepson12.o table.o
  67.     a.out tabepson12.tab
  68.     cp tabepson12.tab $(TERMFILE12)        #careful!
  69.  
  70. table.o:    table.h
  71.  
  72. tabepson.o:    code.epson
  73.  
  74. tabepson12.o:    code.epson
  75.  
  76. special:
  77. #uncomment to run all tests - else copy test into "special"
  78.     cat specialgrk specialtbl specialeqn[12] >special
  79.  
  80. special.epf:    tabepson.tab epf nobs special
  81. #pipe through pic for including files in tbl and eqn
  82.     cat special|pic|tbl|neqn|nroff -T$(T) >special.raw
  83. #the sed filter fixes the SO-<bksp> / SI-<bksp> problem;
  84. #to use, substitute true control characters for the mnemonics, 
  85. #and appropriately alter commenting
  86. #    cat special.raw|\
  87. #        sed -e "s/\^N\^H[\^H\^N]*\^N/\^N/g" \
  88. #            -e "s/\^O\^H[\^H\^O]*\^O/\^O/g"|\
  89. #        col -fx >special.col
  90.     cat special.raw|\
  91.         sed -e "s/\\[\\]*\/\/g" \
  92.             -e "s/\\[\\]*\/\/g"|\
  93.         col -fx >special.col
  94. #    cat special.raw|col -fx >special.col
  95.     cat special.col|nobs >special.nobs
  96.     cat special.nobs|epf >special.epf
  97.  
  98. special12.epf:    tabepson12.tab epf nobs special
  99.     cat special|pic|tbl|neqn|nroff -T$(T12) >special12.raw
  100.     cat special12.raw|\
  101.         sed -e "s/\\[\\]*\/\/g" \
  102.             -e "s/\\[\\]*\/\/g"|\
  103.         col -fx >special12.col
  104.     cat special12.col|nobs >special12.nobs
  105.     cat special12.nobs|epf >special12.epf
  106.  
  107. test:    special.epf
  108.     cat special.epf $(LP)
  109.  
  110. test12:    special12.epf
  111.     cat special12.epf $(LP12)
  112.  
  113. install:    nobs epf tabepson.tab tabepson12.tab epseqnchar
  114.     strip nobs epf
  115.     mv nobs epf $(BINDIR)
  116.     cp epseqnchar $(PUBDIR)
  117. #    mv tabepson.tab $(TERMFILE)        #shouldn't be needed
  118. #    mv tabepson12.tab $(TERMFILE12)
  119.     cp epf.1 nobs.1 $(MAN1DIR)
  120.     cp table.5 $(MAN5DIR)
  121. #do the right thing by permissions-ownerships
  122. #lp interface?
  123.  
  124. clean:
  125.     -rm core *.o tabepson*.tab a.out special*.* special nobs epf
  126.  
  127. spotless:    clean
  128.     -rm $(BINDIR)/nobs $(BINDIR)/epf
  129.     -rm $(TERMFILE) $(TERMFILE12) $(PUBDIR)/epseqnchar
  130.     -rm $(MAN1DIR)/epf.1 $(MAN1DIR)/nobs.1 $(MAN5DIR)/table.5
  131.  
  132. shar:
  133.     cat MANIFEST | sed 1,2d | makekit -pX -s42k >scr
  134.     diff scr MANIFEST
  135.     rm scr
  136.