1 | # $Header: /afs/dev.mit.edu/source/repository/third/transcript/ditroff.font/Makefile.in,v 1.1 1996-10-14 04:30:17 ghudson Exp $ |
---|
2 | # |
---|
3 | # This is the global Makefile template for TranScript on Athena. |
---|
4 | # It does, roughly, the same things as the original build scripts, but |
---|
5 | # in a slightly more structured fashion. |
---|
6 | # |
---|
7 | # PostScript is a registered trademark of Adobe Systems Incorporated |
---|
8 | # TranScript is a registered trademark of Adobe Systems Incorporated |
---|
9 | |
---|
10 | |
---|
11 | # SYSV make is a censored piece of censored... |
---|
12 | SHELL = /bin/sh |
---|
13 | |
---|
14 | prefix=@prefix@ |
---|
15 | exec_prefix=@exec_prefix@ |
---|
16 | mandir=@mandir@ |
---|
17 | datadir=@datadir@ |
---|
18 | PSLIBDIR=${datadir}/ps |
---|
19 | TROFFDIR=${PSLIBDIR}/troff.font |
---|
20 | DITDIR=${PSLIBDIR}/ditroff.font |
---|
21 | PSTEMPDIR=/var/tmp |
---|
22 | |
---|
23 | MAKEDEV=@MAKEDEV@ |
---|
24 | |
---|
25 | # programs |
---|
26 | SED=sed |
---|
27 | AWK=awk |
---|
28 | RM=rm -f |
---|
29 | LN=ln -s |
---|
30 | MKDIR=mkdir |
---|
31 | TAR=tar |
---|
32 | |
---|
33 | # available fonts |
---|
34 | FONTS_A=Times Helvetica Courier |
---|
35 | FONTS_B=AvantGarde Bookman HelvNarrow NewCentury Palatino Zapf |
---|
36 | FONTS_X=Garamond Optima Souvenir Lubalin |
---|
37 | ALL_FONTS=$(FONTS_A) $(FONTS_B) $(FONTS_X) |
---|
38 | # fonts we're actually building. should start with Times. |
---|
39 | FONTS=${ALL_FONTS} |
---|
40 | |
---|
41 | # fonts that will be listed in the DESC file |
---|
42 | DESCFONTS=R I B BI H HB C CB S SS |
---|
43 | |
---|
44 | # two-letter font names for each of the font families |
---|
45 | Times=TR TI TB TD |
---|
46 | Helvetica=H HO HB HD |
---|
47 | Courier=C CO CB CD |
---|
48 | HelvNarrow=hn hN Hn HN |
---|
49 | AvantGarde=ag aG Ag AG |
---|
50 | Bookman=bo bO Bo BO |
---|
51 | Garamond=ga gA Ga GA |
---|
52 | Lubalin=lu lU Lu LU |
---|
53 | NewCentury=nc nC Nc NC |
---|
54 | Optima=op oP Op OP |
---|
55 | Palatino=PA PI PB PX |
---|
56 | Souvenir=sv sV Sv SV |
---|
57 | Zapf=ZC |
---|
58 | # "extra" font names which aren't in any of the families. |
---|
59 | EXTRA_DIGRAPHS=CW S SS |
---|
60 | |
---|
61 | # a list of fonts with and without ligatures, respectively |
---|
62 | NORMAL_DIGRAPHS=${Times} ${Helvetica} ${HelvNarrow} ${AvantGarde} ${Bookman} \ |
---|
63 | ${Garamond} ${Lubalin} ${NewCentury} ${Optima} ${Palatino} \ |
---|
64 | ${Souvenir} ${Zapf} S SS |
---|
65 | NO_LIG_DIGRAPHS=${Courier} |
---|
66 | |
---|
67 | .PHONY: all builddit clean install times-dir family directory |
---|
68 | |
---|
69 | all: builddit |
---|
70 | |
---|
71 | builddit: times-dir |
---|
72 | for i in ${FONTS}; do \ |
---|
73 | $(MAKE) ${MFLAGS} FAM=$$i FAMILY="\$${$$i}" directory; \ |
---|
74 | done |
---|
75 | |
---|
76 | clean: |
---|
77 | $(RM) -r ${ALL_FONTS} |
---|
78 | |
---|
79 | install: |
---|
80 | $(RM) -r ${DESTDIR}${DITDIR} |
---|
81 | $(MKDIR) ${DESTDIR}${DITDIR} |
---|
82 | ( $(TAR) cf - ${FONTS} ) | ( cd ${DESTDIR}${DITDIR}; $(TAR) xf - ) |
---|
83 | |
---|
84 | ## building Times/devpsc |
---|
85 | |
---|
86 | times-dir: Times/devpsc/DESC |
---|
87 | for i in ${FONTS}; do \ |
---|
88 | $(MAKE) ${MFLAGS} FAMILY="\$${$$i}" family; \ |
---|
89 | done |
---|
90 | cd Times/devpsc; \ |
---|
91 | ${MAKE} -f ../../Makefile ${MFLAGS} ${EXTRA_DIGRAPHS} |
---|
92 | |
---|
93 | family: |
---|
94 | cd Times/devpsc; \ |
---|
95 | ${MAKE} -f ../../Makefile ${MFLAGS} ${FAMILY} |
---|
96 | |
---|
97 | Times/devpsc/DESC: |
---|
98 | -$(MKDIR) Times |
---|
99 | -$(MKDIR) Times/devpsc |
---|
100 | echo "# ditroff device description for PostScript" >> $@ |
---|
101 | echo "# PostScript is a registered trademark of Adobe Systems Incorporated" >> $@ |
---|
102 | echo ${DESCFONTS} | awk '{print "fonts", NF, $$0}' >> $@ |
---|
103 | cat ../lib/ditroff.font/devspecs >> $@ |
---|
104 | echo "charset" >> $@ |
---|
105 | cat ../lib/ditroff.font/charset >> $@ |
---|
106 | |
---|
107 | ## building */devpsc |
---|
108 | |
---|
109 | directory: |
---|
110 | if [ "${FAM}" != "Times" ]; then \ |
---|
111 | $(RM) -r ${FAM}; $(MKDIR) ${FAM}; $(MKDIR) ${FAM}/devpsc; \ |
---|
112 | cd ${FAM}/devpsc; $(LN) ../../Times/devpsc/* .; \ |
---|
113 | $(RM) DESC.out R R.* I I.* I.* B B.* BI BI.*; \ |
---|
114 | else : Ultrix sucks; fi |
---|
115 | cd ${FAM}/devpsc; \ |
---|
116 | set ${FAMILY}; \ |
---|
117 | $(RM) R.map R.aux I.map I.aux B.map B.aux BI.map BI.aux; \ |
---|
118 | $(SED) -e "s/^name.*/name R/" ../../Times/devpsc/$$1 > R; \ |
---|
119 | $(LN) $$1.map R.map; $(LN) $$1.aux R.aux; \ |
---|
120 | $(SED) -e "s/^name.*/name I/" ../../Times/devpsc/$${2-TR} > I; \ |
---|
121 | $(LN) $${2-TR}.map I.map; $(LN) $${2-TR}.aux I.aux; \ |
---|
122 | $(SED) -e "s/^name.*/name B/" ../../Times/devpsc/$${3-TB} > B; \ |
---|
123 | $(LN) $${3-TB}.map B.map; $(LN) $${3-TB}.aux B.aux; \ |
---|
124 | $(SED) -e "s/^name.*/name BI/" ../../Times/devpsc/$${4-TD} > BI;\ |
---|
125 | $(LN) $${4-TD}.map BI.map; $(LN) $${4-TD}.aux BI.aux; \ |
---|
126 | $(MAKEDEV) DESC |
---|
127 | |
---|
128 | ##### The following dependencies get executed from Times/devpsc sub-directory. |
---|
129 | |
---|
130 | ${ALL_FONTS}: |
---|
131 | ${MAKE} ${MFLAGS} |
---|
132 | |
---|
133 | ${NORMAL_DIGRAPHS}: DESC |
---|
134 | $(RM) $@ $@.map $@.aux |
---|
135 | cp ../../../lib/ditroff.font/$@.map . |
---|
136 | realname=`head -1 $@.map`; \ |
---|
137 | PSRESOURCEPATH="../../../lib::"; export PSRESOURCEPATH; \ |
---|
138 | ../../../src/afmdit -a `../../../src/map $$realname` \ |
---|
139 | -o $@ -m $@.map -x $@.aux |
---|
140 | ${MAKEDEV} $@ |
---|
141 | ${NO_LIG_DIGRAPHS}: DESC |
---|
142 | $(RM) $@ $@.map $@.aux |
---|
143 | cp ../../../lib/ditroff.font/$@.map . |
---|
144 | realname=`head -1 $@.map`; \ |
---|
145 | PSRESOURCEPATH="../../../lib::"; export PSRESOURCEPATH; \ |
---|
146 | ../../../src/afmdit -a `../../../src/map $$realname` \ |
---|
147 | -o $@ -m $@.map -x $@.aux -n |
---|
148 | ${MAKEDEV} $@ |
---|
149 | # no ligatures are generated if the "-n" flag is passed to afmdit. |
---|
150 | |
---|
151 | CW: C |
---|
152 | $(LN) C CW |
---|
153 | $(LN) C.aux CW.aux |
---|
154 | $(LN) C.map CW.map |
---|
155 | $(LN) C.out CW.out |
---|
156 | |
---|
157 | desc: DESC ${DESCFONTS} |
---|
158 | ${MAKEDEV} DESC |
---|