#*********************************************************************#
#                                                                     #
#                           HTMLC                                     #
#                                                                     #
#            Pierre Weis, projet Cristal, INRIA Rocquencourt          #
#                                                                     #
#  Copyright 2003 Institut National de Recherche en Informatique et   #
#  en Automatique.  Distributed only by permission.                   #
#                                                                     #
#*********************************************************************#

#(* $Id: Makefile,v 1.7 2004/04/08 20:37:00 weis Exp $ *)

# To debug the compiler
# ledit ocamldebug ../htmlc.byt
# set arguments -I ../../doc_src/Includes/ -env env1.ml -c test0.html
# directory ..
# run

HTMLC=../htmlc
HTMLCFLAGS0=-I ../../doc_src/Includes/ -env env0
HTMLCFLAGS1=-I ../../doc_src/Includes/ -env env1.ml

ENVS=env0 env1.ml
SOURCES0=test00.html test0.html test1.html test2.html
SOURCES1=example-eng.html included-fra.html
SOURCES2=example-fra.html included-eng.html

SOURCES=$(SOURCES0) $(SOURCES1) $(SOURCES2)
TARGETS=$(SOURCES:.html=.htm)

all : $(TARGETS)
	for i in $(SOURCES); do \
	echo $$i; \
	j=`basename $$i .html`.htm; \
	cmp $$j results/$$j || exit 2; \
	done

$(TARGETS): $(SOURCES) $(ENVS) ../../doc_src/Includes/htmlc-version.html

clean:
	/bin/rm -f *.htm *~

.SUFFIXES:
.SUFFIXES: .shtml .html .htm

.shtml.htm:
	$(HTMLC) $(HTMLCFLAGS0) -s $<

.html.htm:
	$(HTMLC) $(HTMLCFLAGS1) -c $<
