home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / groff / devices / devascii / Makefile.gnu < prev    next >
Encoding:
Makefile  |  1991-04-30  |  1.8 KB  |  61 lines

  1. #Copyright (C) 1989, 1990 Free Software Foundation, Inc.
  2. #     Written by James Clark (jjc@jclark.uucp)
  3. #
  4. #This file is part of groff.
  5. #
  6. #groff is free software; you can redistribute it and/or modify it under
  7. #the terms of the GNU General Public License as published by the Free
  8. #Software Foundation; either version 1, or (at your option) any later
  9. #version.
  10. #
  11. #groff is distributed in the hope that it will be useful, but WITHOUT ANY
  12. #WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. #FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14. #for more details.
  15. #
  16. #You should have received a copy of the GNU General Public License along
  17. #with groff; see the file LICENSE.  If not, write to the Free Software
  18. #Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. FONTDIR=/usr/local/lib/groff/font
  21. DEVICEDIR=$(FONTDIR)/devascii
  22. RES=240
  23. CPI=10
  24. LPI=6
  25. FONTS=R I B BI
  26.  
  27. all: $(FONTS) DESC
  28.  
  29. $(FONTS): R.proto
  30.     @echo Making $@
  31.     @(charwidth=`expr $(RES) / $(CPI)` ; \
  32.       sed -e "s/^name [A-Z]*$$/name $@/" \
  33.          -e "s/^\\([^    ]*\\)    [0-9]+    /\\1    $$charwidth    /" \
  34.          -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
  35.          -e "s/^internalname .*$$/internalname $@/" \
  36.          -e "/^internalname/s/BI/3/" \
  37.          -e "/^internalname/s/B/2/" \
  38.          -e "/^internalname/s/I/1/" \
  39.          -e "/^internalname .*[^ 0-9]/d" \
  40.          R.proto >$@)
  41.  
  42. DESC: DESC.proto
  43.     @echo Making $@
  44.     @sed -e "s/^res .*$$/res $(RES)/" \
  45.         -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
  46.         -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
  47.         -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
  48.         DESC.proto >$@
  49.  
  50. install.nobin: all
  51.     -[ -d $(FONTDIR) ] || mkdir $(FONTDIR)
  52.     -[ -d $(DEVICEDIR) ] || mkdir $(DEVICEDIR)
  53.     cp $(FONTS) DESC $(DEVICEDIR)
  54.  
  55. install.bin:
  56.  
  57. install: install.bin install.nobin
  58.  
  59. clean:
  60.     -rm -f $(FONTS) DESC
  61.