include ../make/GenMakefile

#--------------------
# change if you want another destination
INFODST := ../info.nr
HTMLDST := ../info.html
#--------------------

INFOSRCS := Overview.t $(wildcard [A-Z]*.t) $(wildcard [a-z]*.t)
INFOCOMS := $(patsubst %.t,$(INFODST)/%,$(INFOSRCS))
HTMLCOMS := $(patsubst %.t,$(HTMLDST)/%.html,$(INFOSRCS))

COMMON := INFO.MAC CRT.MAC Blank.awk

$(INFODST)/%: %.t $(COMMON)
	$(NROFF) CRT.MAC $< | awk -f Blank.awk > $@

$(HTMLDST)/%.html: %.t $(COMMON) emp2html.pl
	emp2html.pl $< > $@

all: $(INFOCOMS) 

html: $(HTMLCOMS)
	ls -CF *.t | ls2html.pl > $(HTMLDST)/index.html


printout:
	$(TROFF) $(PRINTER) TROFF.MAC $(INFOSRCS)

