home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume8 / servercomm2 / Makefile < prev    next >
Encoding:
Makefile  |  1989-08-23  |  4.3 KB  |  130 lines

  1. #
  2. # Wright State University Remote LaserWriter Kit
  3. # John Sloan <jsloan%SPOTS.Wright.EDU@@Relay.CS.NET>
  4. # $Revision: 1.3 $
  5. # $Date: 89/08/06 02:27:15 $
  6. #
  7. # Modified by Dinah Anderson <dinah@bcm.tmc.edu>
  8. # Baylor College of Medicine
  9. # 89/8/23
  10. #
  11.  
  12. # C Compiler flags (if any)
  13. CFLAGS=-DBRIDGE
  14.  
  15. # Printcap name of remote LaserWriter
  16. PRINTER=motc
  17.  
  18. # Local LaserWriter spool directory (must differ from NEWSPOOLDIR)
  19. PSSPOOLDIR=/usr/spool/lpd/local
  20.  
  21. # New remote LaserWriter spool directory (must differ from PSSPOOLDIR)
  22. NEWSPOOLDIR=/usr/spool/lpd/motc
  23.  
  24. # Original Transcript software directory (must differ from NEWLIBDIR)
  25. PSLIBDIR=/usr/local/lib/ps
  26.  
  27. # New remote Transcript filters directory (must differ from PSLIBDIR)
  28. NEWLIBDIR=/usr/motc
  29.  
  30. # Network name of host computer handling spooling to communication server
  31. # This is the computer on which you are installing this software
  32. HOST="`hostname`"
  33.  
  34. # Network name of host communications server
  35. SERVER=128.249.4.40
  36.  
  37. # Port number for LaserWriter on host
  38. PORT=23
  39.  
  40. # Master pseudo-terminal (typically /dev/ptyXX, where XX=[pqrs][0-f])
  41. # You may roll your own (as we do) with /etc/mknod
  42. # Owner should be daemon and mode should be 666
  43. # Device should not appear in /etc/ttys as login enabled (with getty)
  44. PTY=/dev/ptyr4
  45.  
  46. # Slave pseudo-terminal (typically /dev/ttyXX)
  47. # You may roll your own (as we do) with /etc/mknod
  48. # Owner should be daemon and mode should be 666
  49. # Device should not appear in /etc/ttys as login enabled (with getty)
  50. TTY=/dev/ttyr4
  51.  
  52. # Location of servercomm(8l) man page
  53. MANDIR=/usr/man/manl
  54.  
  55. #########################################################################
  56.  
  57. all:    servercomm filters printcap printcap.remote 
  58.  
  59. install: all ${NEWLIBDIR}/servercomm ${MANDIR} servercomm.8l
  60.     cp /dev/null ${NEWLIBDIR}/${PRINTER}
  61.     cp servercomm.8l ${MANDIR}
  62.     chmod 644 ${MANDIR}/servercomm.8l
  63.  
  64. clean:
  65.     rm -if diffs printcap printcap.remote 
  66.  
  67. backout: clean
  68.     rm -rif ${NEWSPOOLDIR} ${NEWLIBDIR}
  69.  
  70. servercomm:    servercomm.c
  71.     cc ${CFLAGS} -O -o servercomm servercomm.c
  72.  
  73. ${NEWLIBDIR}/servercomm: servercomm
  74.     strip servercomm
  75.     mv servercomm ${NEWLIBDIR}
  76.     chmod 755 ${NEWLIBDIR}/servercomm
  77.  
  78. test:    debug hello.ps
  79.     debug -v -x -h ${SERVER} -p ${PORT} -t ${PTY} ${TTY} -f ${NEWLIBDIR}/pscomm -P ${PRINTER} -p psif /dev/tty < hello.ps
  80. #debug -v -x -h ${SERVER} -p ${PORT} -t ${PTY} ${TTY} -f ${PSLIBDIR}/pscomm -P ${PRINTER} -p psif /dev/tty < hello.ps
  81.     
  82. debug:    servercomm.c
  83.     cc ${CFLAGS} -g -DDEBUG -DDUMP -o debug servercomm.c
  84.  
  85. filters: ${NEWLIBDIR} ${NEWLIBDIR}/psint.sh
  86.     ln ${NEWLIBDIR}/psint.sh ${NEWLIBDIR}/psof
  87.     ln ${NEWLIBDIR}/psint.sh ${NEWLIBDIR}/psif
  88.     ln ${NEWLIBDIR}/psint.sh ${NEWLIBDIR}/psgf
  89.     ln ${NEWLIBDIR}/psint.sh ${NEWLIBDIR}/psnf
  90.     ln ${NEWLIBDIR}/psint.sh ${NEWLIBDIR}/pstf
  91.     ln ${NEWLIBDIR}/psint.sh ${NEWLIBDIR}/psrf
  92.     ln ${NEWLIBDIR}/psint.sh ${NEWLIBDIR}/psvf
  93.     ln ${NEWLIBDIR}/psint.sh ${NEWLIBDIR}/pscf
  94.     ln ${NEWLIBDIR}/psint.sh ${NEWLIBDIR}/psdf
  95.  
  96. ${NEWLIBDIR}/psint.sh: ${PSLIBDIR}/psint.sh ${NEWLIBDIR} diffs
  97.     cp ${PSLIBDIR}/psint.sh ${NEWLIBDIR}
  98.     chmod 755 ${NEWLIBDIR}/psint.sh
  99.     patch ${NEWLIBDIR}/psint.sh diffs
  100.  
  101. ${NEWLIBDIR}:
  102.     mkdir ${NEWLIBDIR}
  103.     chmod 755 ${NEWLIBDIR}
  104.  
  105. diffs:
  106.     echo "67c67,68" > diffs
  107.     echo "< comm=\"\$$PSCOMM -P \$$pname -p \$$prog -n \$$user -h \$$host \$$afile\"" >> diffs
  108.     echo "---" >> diffs
  109.     echo "> filter=\"\$$PSCOMM -P \$$pname -p \$$prog -n \$$user -h \$$host \$$afile\"" >> diffs
  110.     echo "> comm=\"servercomm -h ${SERVER} -p ${PORT} -t ${PTY} ${TTY} -f \$$filter\"" >> diffs
  111.  
  112. printcap:
  113.     echo "${PRINTER}|LaserWriter on communication server ${SERVER} Port ${PORT}:\\" > printcap
  114.     echo "    :lp=${NEWLIBDIR}/${PRINTER}:sd=${NEWSPOOLDIR}:\\" >> printcap
  115.     echo "    :lf=${NEWSPOOLDIR}/lw-log:af=/usr/adm/lw.acct:\\" >> printcap
  116.     echo "    :mx#0:sf:sb:\\" >> printcap
  117.     echo "    :if=${NEWLIBDIR}/psif:\\" >> printcap
  118.     echo "    :of=${NEWLIBDIR}/psof:gf=${NEWLIBDIR}/psgf:\\" >> printcap
  119.     echo "    :nf=${NEWLIBDIR}/psnf:tf=${NEWLIBDIR}/pstf:\\" >> printcap
  120.     echo "    :rf=${NEWLIBDIR}/psrf:vf=${NEWLIBDIR}/psvf:\\" >> printcap
  121.     echo "    :cf=${NEWLIBDIR}/pscf:df=${NEWLIBDIR}/psdf:" >> printcap
  122.  
  123.  
  124. printcap.remote:
  125.     echo "${PRINTER}|Remote LaserWriter on Host ${HOST} communication server ${SERVER} Port ${PORT}:\\" > printcap.remote
  126.     echo "    :lp=:rm=${HOST}:rp=${PRINTER}:sd=${NEWSPOOLDIR}:" >> printcap.remote
  127.  
  128. sharfile:    README Makefile servercomm.8l servercomm.c hello.ps example
  129.     shar README Makefile servercomm.8l servercomm.c hello.ps example > sharfile
  130.