#
# BWE documentation buildfile
#
# Copyright 1985 Steven P. Reiss, Brown University - All rights reserved.
#
# Last Edited by spr on Tue May 27 17:35:49 EDT 1986
#      May 27 86  jsb: cleaned up abit.  incorporated new include files.
#      Sep  2 85  spr: original
#

ALL=
SYSTEM= bwe
PACKAGE= doc


HOME = $(PRO)/$(SYSTEM)/$(PACKAGE)/src
DHOME = $(DISTRIB)/$(PACKAGE)/src

PFILES= Makefile bwemac.me bwechap.me descript.n
PSFILES= manual.ps index.ps
REFMANS=\
 ashdoc.me\
 auxddoc.me\
 biodoc.me\
 bwemacdoc.me\
 bweman.me\
 cmpxdoc.me\
 editordoc.me\
 edtdoc.me \
 intro.me\
 helpdoc.me\
 leafdoc.me\
 miscdoc.me\
 ripdoc.me\
 stemdoc.me\
 title.me\
 tulipdoc.me\
 winddoc.me\
 wormdoc.me\
 gelodoc.me\
 appledoc.me\
 peardoc.me

ACTIVE= $(PFILES) $(REFMANS) $(PSFILES)

TBL= tbl
#TROFF= iroff -Pim0
TROFF= prt -Pps3
INDEX= $(PRO)/bwe/cmd/$(ARCH)/index

all $(PACKAGE) lint.out opt newlib create:
	@echo Nothing to do

manual: body index

body:
	soelim bweman.me | $(TBL) | $(TROFF) -me 2> index.out

index_only:
	soelim bweman.me | $(TBL) | /usr/local/bin/ditroff -Tpsc -me -t 2> index.out > /dev/null
	$(INDEX) < index.out | $(TROFF) -me


index: index.out
	$(INDEX) < index.out | $(TROFF) -me

index.out: body

clean:
	rm -f index.out

print:
	pr $(PFILES) | lpr -low

pribm:
	/bin/pr -l62 -f $(PFILES) | lpr -Pibm


transfer:

distrib_dir:
	rsh $(DISTRIB_MACH) rm -rf $(DISTRIB_DIR)/doc
	rsh $(DISTRIB_MACH) mkdir $(DISTRIB_DIR)/doc
	rcp $(ACTIVE) $(DISTRIB_MACH):$(DISTRIB_DIR)/doc


manual.ps: $(REFMANS)
	soelim bweman.me | $(TBL) | /usr/local/bin/ditroff -Tpsc -me 2> index.out | psdit > manual.ps
	$(INDEX) < index.out | /usr/local/bin/ditroff -Tpsc -me | psdit > index.ps

