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

#(* $Id: Makefile,v 1.3 2007-05-10 14:13:28 fclement Exp $ *)

# To compute the results to compiler's tests.

CP = cp -pf

SOURCES0=test00.html test0.html test1.html test2.html test3.html \
 test5.html test6.html \
 included-eng.html included-fra.html example-eng.html example-fra.html
MSOURCES=test4.man
ENV = env0 env1.ml env2.ml env3.ml
ALLSOURCES = $(ENV) $(SOURCES0) $(MSOURCES)

HSOURCES=$(SOURCES0) $(SOURCES1) $(SOURCES2)
HTARGETS=$(HSOURCES:.html=.htm)
MTARGETS=$(MSOURCES:.man=.m)

HTMLC = ../../htmlc.byt
HTMLCFLAGS = -I ../../../doc_src/Includes -I .. -env env -env env1.ml

.SUFFIXES: .html .htm .man .m

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

.man.m:
	$(HTMLC) $(HTMLCFLAGS) -f $< -t $@

.PHONY: all sources clean

all: sources
	$(MAKE) $(HTARGETS) $(MTARGETS)

sources:
	for i in $(ALLSOURCES); do \
	  $(CP) ../$$i .; \
	done

clean:
	rm -f *.htm *.m *~
