Parcourir la source

modified to generate dispatch tables automatically

ceriel il y a 37 ans
Parent
commit
adba3d4ddf
1 fichiers modifiés avec 17 ajouts et 17 suppressions
  1. 17 17
      doc/em/Makefile

+ 17 - 17
doc/em/Makefile

@@ -1,9 +1,10 @@
 HOME=../..
 
-head:   doc.pr
-
-NROFF=nroff
 TBL=tbl
+NROFF=nroff
+SUF=pr
+
+head:   ../em.$(SUF)
 
 FILES = macr.nr title.nr intro.nr mem.nr ispace.nr dspace.nr mapping.nr \
 	types.nr descr.nr env.nr traps.nr mach.nr assem.nr \
@@ -11,26 +12,25 @@ FILES = macr.nr title.nr intro.nr mem.nr ispace.nr dspace.nr mapping.nr \
 
 IOP=$(HOME)/util/ass/ip_spec.t#			# to construct itables from
 
-doc.pr: $(FILES) itables em.i Makefile
-	$(TBL) $(FILES) | $(NROFF) >doc.pr
-
-distr:	$(FILES) itables em.i
-	tbl $(FILES) | nroff -Tlp >doc.pr
+../em.$(SUF):	$(FILES) itables dispatdummy em.i Makefile
+		$(TBL) $(FILES) | $(NROFF) > ../em.$(SUF)
 
-opr:	doc.pr
-	make pr | opr
-
-pr:
-	@make "NROFF="$(NROFF) TBL=$(TBL) doc.pr >makepr.out 2>&1
-	@cat doc.pr
-
-app.codes.pr: app.codes.nr itables
+app.codes.pr: app.codes.nr itables dispatdummy
 
 itables: $(IOP) ip.awk
 	awk -f ip.awk $(IOP) | sed 's/-/\\-/g' | $(TBL) >itables
 
+dispatdummy:	$(IOP) mkdispatch
+	mkdispatch < $(IOP) > dispatdummy
+	sed -f dispat1.sed < dispatdummy | $(TBL) > dispat1
+	sed -f dispat2.sed < dispatdummy | $(TBL) > dispat2
+	sed -f dispat3.sed < dispatdummy | $(TBL) > dispat3
+
+mkdispatch:	mkdispatch.c
+	cc -I$(HOME)/util/ass -I$(HOME)/h -o mkdispatch mkdispatch.c $(HOME)/lib/em_data.a
+
 .SUFFIXES : .pr .nr
 .nr.pr: ; $(TBL) macr.nr $*.nr | $(NROFF) >$@
 
 clean:
-	rm -f *.pr itables *.out
+	rm -f *.pr itables *.out dispatdummy dispat? *.o mkdispatch