# $Id: Makefile,v 1.8 2002/09/11 21:00:39 ri Exp $
DOCS=tutorial.html julian_dfa.html mic.html configure.html format.html hmmlist.html module.html
MANS=man_julius.html man_julian.html man_adinrec.html man_adintool.html man_jcontrol.html man_mkbingram.html man_mkgshmm.html man_mkss.html
CONTENTS = top.html system.html new.html platform.html howtoget.html install.html man.html $(MANS) docs.html $(DOCS) refs.html license.html history.html ml.html contact.html

CSS=default.css man.css menu.css
GIF=julius.gif julian.gif
DISTDIR = ..

all: $(DISTDIR)/.stamp $(DISTDIR)/menu.html $(DISTDIR)/index.html

$(DISTDIR)/index.html: index.html $(DISTDIR)/menu.html insert_menu.pl
	cat index.html | perl ./insert_menu.pl $(DISTDIR)/menu.html | nkf -j > $(DISTDIR)/index.html

$(DISTDIR)/menu.html: $(CONTENTS) makemenu.pl insertheader.pl
	perl ./makemenu.pl $(CONTENTS) HRHRHR | nkf -j > $(DISTDIR)/menu.html

$(DISTDIR)/.stamp: $(CONTENTS) insertheader.pl insertheader_man.pl filt.pl filt_man.pl $(CSS)
	for i in $(CONTENTS); do \
	  cat $$i | perl ./insertheader.pl | perl ./filt.pl | nkf -j > $(DISTDIR)/$$i; \
	done
	for i in $(MANS); do \
	  cat $$i | perl ./insertheader_man.pl | perl ./filt_man.pl | nkf -j > $(DISTDIR)/$$i; \
	done
	cp $(CSS) $(DISTDIR)
	cp $(GIF) $(DISTDIR)
	touch $(DISTDIR)/.stamp

clean:
	$(RM) menu.txt $(DISTDIR)/.stamp
