home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / GROFFSRC / SRC / DEVCP850 / MAKEFILE < prev    next >
Encoding:
Text File  |  1992-07-20  |  1.1 KB  |  48 lines

  1. FONTDIR=/groff/font
  2. DEVICEDIR=$(FONTDIR)/devlatin1
  3.  
  4. RES=240
  5. CPI=10
  6. LPI=6
  7. FONTS=R I B BI
  8.  
  9. all: $(FONTS) DESC
  10.  
  11. $(FONTS): R.proto
  12.     @echo Making $@
  13.     @-rm -f $@
  14.     @(charwidth=`expr $(RES) / $(CPI)` ; \
  15.       sed -e "s/^name [A-Z]*$$/name $@/" \
  16.          -e "s/^\\([^    ]*\\)    [0-9]+    /\\1    $$charwidth    /" \
  17.          -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
  18.          -e "s/^internalname .*$$/internalname $@/" \
  19.          -e "/^internalname/s/BI/3/" \
  20.          -e "/^internalname/s/B/2/" \
  21.          -e "/^internalname/s/I/1/" \
  22.          -e "/^internalname .*[^ 0-9]/d" \
  23.          R.proto >$@)
  24.  
  25. DESC: DESC.proto
  26.     @echo Making $@
  27.     @-rm -f $@
  28.     @sed -e "s/^res .*$$/res $(RES)/" \
  29.         -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
  30.         -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
  31.         -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
  32.         DESC.proto >$@
  33.  
  34. install.nobin: all
  35.     -mkdir $(FONTDIR)
  36.     -mkdir $(DEVICEDIR)
  37.     -cd $(DEVICEDIR); rm -f $(FONTS) DESC
  38.     cp $(FONTS) DESC $(DEVICEDIR)
  39.  
  40. install.bin:
  41.  
  42. install: install.bin install.nobin
  43.  
  44. clean:
  45.     -rm -f $(FONTS) DESC
  46.  
  47. distclean: clean
  48.