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

#(* $Id: Makefile,v 1.23 2004/08/14 16:32:17 weis Exp $ *)

PACKAGE=htmlc
MAINVERSION=1
SUBVERSION=5
VERSION=$(MAINVERSION).$(SUBVERSION)
OLDVERSION=1.4

CVSRELEASETAG=$(PACKAGE)-
ANNOUNCEFILE=Announce-$(VERSION)0

PACKAGEVERSIONFILE=compiler/version.ml
DOCVERSIONFILE=doc_src/Includes/htmlc-version.html

all:: byte

allopt: opt

byte:
	cd compiler; $(MAKE) all
	cd doc; $(MAKE) all

opt:
	cd compiler; $(MAKE) allopt

install:
	cd compiler; $(MAKE) install
installopt:
	cd compiler; $(MAKE) installopt

clean::
	cd compiler; $(MAKE) clean
	cd doc; $(MAKE) clean

depend:
	cd compiler; $(MAKE) depend

# Automatic handling of versionning
version:
	for i in $(PACKAGEVERSIONFILE) $(DOCVERSIONFILE); do \
	echo $$i; \
	mv $$i $$i~; \
	sed -e '/ersion/s/$(OLDVERSION)/$(VERSION)/' $$i~ > $$i; \
	done

distribution:
	$(MAKE) -f Makefile.distrib distribute

release:
	cvs rtag -R $(CVSRELEASETAG) bazar-ocaml/htmlc


announce:
	mail -n -s "New release of $(PACKAGE)" \
		caml-announce@inria.fr < $(ANNOUNCEFILE)

include config/Makefile

