# Copyright 16:49:40 Chris Lewis SCRIPTS = psdtwd showfont mkenctab calcfonts PROGRAMS = hpinterp psxlate pk2sfp pk2ditwid pktype dumpft pk2ps lj2ps MAPS = maps/S.cmtrf \ maps/alnum.ROMAN8 \ maps/cmmi.MATH8 \ maps/cmr.MATH8 \ maps/cmr.ROMAN8 \ maps/cmss.ROMAN8 \ maps/cmsy.MATH8 \ maps/cmsy.ROMAN8 \ maps/cmti.MATH8 \ maps/cmti.ROMAN8 \ maps/cmtrf.MATH8 \ maps/cmtrf.ROMAN8 \ maps/cmtt.ROMAN8 include ../makeincl all: subst.done $(SCRIPTS) $(PROGRAMS) subst.done: ../makeincl ../sedscript rm -f $(SCRIPTS) touch subst.done ljtab.c: ../troff2ps mkenctab ../lib/lj.fonts cd ../ ; ./troff2ps -Tlj -z > utils/T ./mkenctab T ljtab.c rm -f T # This isn't perfect, but close ../debug.o ../pk.o ../cattab.o: ../defs.h ../pk.h @echo "Some troff2ps objects are out of date" @echo "Make troff2ps at the top level first" exit tmaps: $(MAPS) $(MAPS): cd maps ; get s.$(@F) ljtab.o pk2sfp.o pk2ditwid.o pktype.o dumpft.o: ../defs.h ../pk.h pktype: ../pk.o ../debug.o pktype.o $(CC) $(CFLAGS) -o pktype pktype.o ../debug.o ../pk.o $(LIBFLAGS) pk2ps: ../pk.o ../debug.o pk2ps.o $(CC) $(CFLAGS) -o pk2ps pk2ps.o ../debug.o ../pk.o $(LIBFLAGS) hpinterp: hpinterp.o $(CC) $(CFLAGS) -o hpinterp hpinterp.o $(LIBFLAGS) psxlate: psxlate.o $(CC) $(CFLAGS) -o psxlate psxlate.o $(LIBFLAGS) pk2ditwid: ../pk.o ../debug.o pk2ditwid.o ljtab.o $(CC) $(CFLAGS) -o pk2ditwid pk2ditwid.o ../debug.o ../pk.o ljtab.o \ $(LIBFLAGS) pk2sfp: ../pk.o ../debug.o pk2sfp.o ljtab.o $(CC) $(CFLAGS) -o pk2sfp pk2sfp.o ../debug.o ../pk.o ljtab.o \ $(LIBFLAGS) dumpft: dumpft.o ../cattab.o $(CC) -o dumpft dumpft.o ../cattab.o $(LIBFLAGS) clean: rm -f *.o $(SCRIPTS) $(PROGRAMS) ljtab.c *.D *.sfp diagnostics rm -f fonts/*.LOG fonts/[A-Z].* fonts/[A-Z][A-Z].* fonts/*.D rm -f fonts/cmtrf*.sfp buildcmtrf rm -fr testdir install: cd $(LIBDIR)/lib ; rm -f $(SCRIPTS) $(IGNORESH) cp $(SCRIPTS) $(LIBDIR)/lib for i in $(PROGRAMS) ; \ do \ if [ -f $(LIBDIR)/$$i ] ; \ then \ rm -f $(LIBDIR)/$$i.old ; \ cp $(LIBDIR)/$$i $(LIBDIR)/$$i.old 2> /dev/null ; \ fi ; \ cp $$i $(LIBDIR)/$$i ; \ done # Try to convert a vendor supplied ft into dit2catwid input # and back again. If the number of differences is 0 or 1, # everything's working (we permit one difference due to space # handling) testdumpft: dumpft ./dumpft -d < $(FONTDIR)/ftR > fonts/R.ftout 2> fonts/R.dfterr ../widths/dit2catwid fonts/R.ftout fonts/R.ftout fonts/R.d2out -cmp -l /usr/lib/font/ftR fonts/R.d2out > fonts/R.errors $(IGNORESH) test `wc -l fonts/R.errors | \ sed -e 's/^[ ]*\([0-9][0-9]*\).*/\1/'` -lt 2 buildcmtrf: pk2sfp $(MAPS) for i in ../fonts.lj/S.*.pk ; \ do \ ps=`echo $$i | sed -e 's/^.*S.\([0-9]*\).pk/\1/'` ; \ echo "Building cmtrf$$ps.sfp" ; \ ./pk2sfp -m maps/S.cmtrf $$i > fonts/cmtrf$$ps.sfp ; \ done touch buildcmtrf fonts/cmtrf10.sfp: buildcmtrf buildfonts: $(NEWFONTS) calcfonts buildcmtrf pk2sfp $(IGNORESH) test -z "$(PKFONTS)" || \ perl ./calcfonts -f$(NEWFONTS) -s$(SFP2PK) $(PKFONTS) # Use real cmtrf from $(PKFONTS) rather than fonts/cmtrf*.sfp buildSfonts: calcfonts pk2sfp rm -f buildcmtrf fonts/cmtrf*.sfp $(IGNORESH) test -z "$(PKFONTS)" || \ perl ./calcfonts -S -f../fonts.lj -s$(SFP2PK) $(PKFONTS) # This code is for demonstration purposes w.r.t. PK/SFP merging. # sfp2pk comes from Rick Richardson's jetroff, and the hyphens # allow this makefile to continue if you don't have sfp2pk. testmerge: pk2sfp fonts/cmtrf10.sfp $(MAPS) ./pk2sfp -m -v \ maps/cmtrf.MATH8 \ fonts/cmtrf10.sfp \ maps/cmr.MATH8 \ fonts/cmr10.pk \ maps/cmsy.MATH8 \ fonts/cmsy10.pk \ maps/cmmi.MATH8 \ fonts/cmmi10.pk \ > fonts/S.10.sfp 2> fonts/S.10.LOG -$(SFP2PK) < fonts/S.10.sfp > fonts/S.10.pk ./pk2sfp -m -v \ maps/cmr.ROMAN8 \ fonts/cmr10.pk \ maps/cmsy.ROMAN8 \ fonts/cmsy10.pk \ maps/cmtrf.ROMAN8 \ fonts/cmtrf10.sfp \ maps/cmti.ROMAN8 \ fonts/cmti10.pk \ maps/cmss.ROMAN8 \ fonts/cmss10.pk \ > fonts/R.10.sfp 2> fonts/R.10.LOG -$(SFP2PK) < fonts/R.10.sfp > fonts/R.10.pk ./pk2sfp -m -v \ maps/cmr.ROMAN8 \ fonts/cmsl10.pk \ maps/cmsy.ROMAN8 \ fonts/cmsy10.pk \ maps/cmtrf.ROMAN8 \ fonts/cmtrf10.sfp \ maps/cmti.ROMAN8 \ fonts/cmti10.pk \ maps/cmss.ROMAN8 \ fonts/cmss10.pk \ > fonts/I.10.sfp 2> fonts/I.10.LOG -$(SFP2PK) < fonts/I.10.sfp > fonts/I.10.pk ./pk2sfp -m -v \ maps/cmr.ROMAN8 \ fonts/cmbx10.pk \ maps/cmsy.ROMAN8 \ fonts/cmsy10.pk \ maps/cmtrf.ROMAN8 \ fonts/cmtrf10.sfp \ maps/cmti.ROMAN8 \ fonts/cmti10.pk \ maps/cmss.ROMAN8 \ fonts/cmss10.pk \ > fonts/B.10.sfp 2> fonts/B.10.LOG -$(SFP2PK) < fonts/B.10.sfp > fonts/B.10.pk ./pk2sfp -m -v \ maps/cmr.ROMAN8 \ fonts/cmssi10.pk \ maps/cmsy.ROMAN8 \ fonts/cmsy10.pk \ maps/cmtrf.ROMAN8 \ fonts/cmtrf10.sfp \ maps/cmti.ROMAN8 \ fonts/cmti10.pk \ maps/cmss.ROMAN8 \ fonts/cmss10.pk \ > fonts/HI.10.sfp 2> fonts/HI.10.LOG -$(SFP2PK) < fonts/HI.10.sfp > fonts/HI.10.pk ./pk2sfp -m -v \ maps/cmtt.ROMAN8 \ fonts/cmtt10.pk \ maps/cmsy.ROMAN8 \ fonts/cmsy10.pk \ maps/cmtrf.ROMAN8 \ fonts/cmtrf10.sfp \ maps/cmti.ROMAN8 \ fonts/cmti10.pk \ maps/cmss.ROMAN8 \ fonts/cmss10.pk \ > fonts/C.10.sfp 2> fonts/C.10.LOG -$(SFP2PK) < fonts/C.10.sfp > fonts/C.10.pk ./pk2sfp -m -v \ maps/cmr.ROMAN8 \ fonts/cmss10.pk \ maps/cmsy.ROMAN8 \ fonts/cmsy10.pk \ maps/cmtrf.ROMAN8 \ fonts/cmtrf10.sfp \ maps/cmti.ROMAN8 \ fonts/cmti10.pk \ maps/cmss.ROMAN8 \ fonts/cmss10.pk \ > fonts/H.10.sfp 2> fonts/H.10.LOG -$(SFP2PK) < fonts/H.10.sfp > fonts/H.10.pk keepbuiltfonts: testmerge cp fonts/[RIBHC]*.pk ../fonts.lj testpk2ditwid: pk2ditwid testdir ./pk2ditwid -Ss $(LJF)/S.10.pk mv S testdir/S.10 ./pk2ditwid -Ss $(LJF)/S.12.pk mv S testdir/S.12 diff testdir/S.10 testdir/S.12 > testdir/S.diff $(NEWFONTS): mkdir $(NEWFONTS) testdir: mkdir testdir testpart: pk2sfp testdir ./pk2sfp $(LJF)/R.10.pk > testdir/R.10.pk ./pk2sfp -p $(LJF)/R.10.pk > testdir/R.10.pkp ./pk2sfp $(LJF)/S.10.pk > testdir/S.10.pk ./pk2sfp -S $(LJF)/S.10.pk > testdir/S.10.pkS ./pk2sfp -p $(LJF)/S.10.pk > testdir/S.10.pkp ./pk2sfp -pS $(LJF)/S.10.pk > testdir/S.10.pkpS cmpfont: pk2sfp testdir @for i in fonts/[A-Z]*.10.pk ; \ do \ f=`basename $$i .10.pk` ; \ ./pk2sfp $(LJF)/$$f.10.pk > testdir/$$f.10.old ; \ ./pktype -v testdir/$$f.10.old ; \ mv $$f.10.old.D testdir/$$f.10.old.D ; \ ./pk2sfp fonts/$$f.10.pk > testdir/$$f.10.new ; \ ./pktype -v testdir/$$f.10.new ; \ mv $$f.10.new.D testdir/$$f.10.new.D ; \ set +e ; \ cmp -l testdir/$$f.10.new testdir/$$f.10.old > testdir/$$f.fDIF; \ diff testdir/$$f.10.new.D testdir/$$f.10.old.D > testdir/$$f.dDIF; \ set -e ; \ done