summaryrefslogtreecommitdiff
path: root/systems/knuth/local/mf/Makefile
blob: 445d028a47500793a8ed7ab89d667e6095730638 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Make executable files for this workstation, using the master TeX sources

PFLAGS= -I..
CFLAGS= -g -I.. -I/usr/openwin/include
#CFLAGS= -O -I.. -I/usr/openwin/include
#LIBS= -lsuntool -lsunwindow -lpixrect
LIBS= -L/usr/openwin/lib -lxview -lolgx -lX11

PC= time pc

all: inimf

traptest: trapmf
	-trapmf < trap1.in
	mv trap.log trapin.log
	-trapmf < trap2.in | tee trap.fot
	gftype trap.72270gf trap.typ < gftype.in
	tftopl trap.tfm trap.pl
	rm -f *.dif
	-diff trapin.log ../../dist/mf/trapin.log > trapin.log.dif
	-diff trap.log ../../dist/mf/trap.log > trap.log.dif
	-diff trap.fot ../../dist/mf/trap.fot > trap.fot.dif
	-diff trap.typ ../../dist/mf/trap.typ > trap.typ.dif
	-diff trap.pl ../../dist/mf/trap.pl > trap.pl.dif
	more trapin.log.dif trap.log.dif trap.typ.dif trap.fot.dif trap.pl.dif

%.p: %.ch
	tangle ../../dist/mf/mf.web  $*.ch
	mv ../../dist/mf/mf.pool .
	mv ../../dist/mf/mf.p $*.p

inimf.ch: ../../dist/mf/mf.web

trapmf.ch: inimf.ch ini_to_trap
	ini_to_trap inimf.ch trapmf.ch

%.o: %.p
	${PC} ${PFLAGS} -c $*.p

trapmf.o: trapmf.p
	${PC} -g ${PFLAGS} -c trapmf.p

inimf: inimf.o ext.o mf_arith.o mf_sunwin.o
	pc ${PFLAGS} -o inimf inimf.o ext.o mf_arith.o mf_sunwin.o ${LIBS}

trapmf: trapmf.o ext.o mf_arith.o
	pc -g ${PFLAGS} -o trapmf trapmf.o ext.o mf_arith.o
	cp ../../dist/mf/trap.mf .

ext.o: ext.c ext.h ../h00vars.h ../mfpaths.h
	cc ${CFLAGS} -c ext.c

mf_arith.o: mf_arith.c
mf_sunwin.o: mf_sunwin.c

plain.base: ../../dist/lib/plain.mf ../lib/local.mf
	-inimf plain \\input local \\dump

install:        # doit make install
	mv inimf /usr/local/bin
	rm /usr/local/bin/mf
	ln /usr/local/bin/inimf /usr/local/bin/mf
	make plain.base

installtrap:	# when the trap test is satisfactory
	mv trap.mf trapin.log trap.log trap.fot trap.typ trap.pl
	   trap.72270gf trap.tfm ../../dist/mf

clean:
	rm -f *.p *.o *~ *.mf trapmf* trap.* trapin*
	@echo "Remaining files should be:"
	@echo "Makefile      gftype.in     mf.pool       mf_window.h   trap1.in"
	@echo "ext.c         ini_to_trap*  mf_arith.c    plain.base    trap2.in"
	@echo "ext.h         inimf.ch      mf_sunwin.c   plain.log"