home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / groff / devices / devlatin1 / Makefile.gnu < prev    next >
Encoding:
Makefile  |  1991-04-30  |  1.9 KB  |  70 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)/devlatin1
  22. # resolution in units per inch
  23. RES=240
  24. # characters per inch
  25. CPI=10
  26. # lines per inch
  27. LPI=6
  28. FONTS=R I B BI
  29.  
  30. all: $(FONTS) DESC
  31.  
  32. $(FONTS): R.proto
  33.     @echo Making $@
  34.     @(charwidth=`expr $(RES) / $(CPI)` ; \
  35.       sed -e "s/^name [A-Z]*$$/name $@/" \
  36.          -e "s/^\\([^    ]*\\)    [0-9]+    /\\1    $$charwidth    /" \
  37.          -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
  38.          -e "s/^internalname .*$$/internalname $@/" \
  39.          -e "/^internalname/s/BI/3/" \
  40.          -e "/^internalname/s/B/2/" \
  41.          -e "/^internalname/s/I/1/" \
  42.          -e "/^internalname .*[^ 0-9]/d" \
  43.          R.proto >$@)
  44.  
  45. DESC: DESC.proto
  46.     @echo Making $@
  47.     @sed -e "s/^res .*$$/res $(RES)/" \
  48.         -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
  49.         -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
  50.         -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
  51.         DESC.proto >$@
  52.  
  53. install.nobin: all
  54.     -[ -d $(FONTDIR) ] || mkdir $(FONTDIR)
  55.     -[ -d $(DEVICEDIR) ] || mkdir $(DEVICEDIR)
  56.     cp $(FONTS) DESC $(DEVICEDIR)
  57.  
  58. install.bin:
  59.  
  60. install: install.bin install.nobin
  61.  
  62. clean:
  63.     -rm -f $(FONTS) DESC
  64.  
  65. distclean: clean
  66.  
  67. realclean: distclean
  68.  
  69. TAGS:
  70.