#################################################################################
#                Cameleon                                                       #
#                                                                               #
#    Copyright (C) 2004-2008 Institut National de Recherche en Informatique     #
#    et en Automatique. All rights reserved.                                    #
#                                                                               #
#    This program is free software; you can redistribute it and/or modify       #
#    it under the terms of the GNU Library General Public License as            #
#    published by the Free Software Foundation; either version 2 of the         #
#    License, or any later version.                                             #
#                                                                               #
#    This program is distributed in the hope that it will be useful,            #
#    but WITHOUT ANY WARRANTY; without even the implied warranty of             #
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              #
#    GNU Library General Public License for more details.                       #
#                                                                               #
#    You should have received a copy of the GNU Library General Public          #
#    License along with this program; if not, write to the Free Software        #
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA                   #
#    02111-1307  USA                                                            #
#                                                                               #
#    Contact: Maxence.Guesdon@inria.fr                                          #
#                                                                               #
#################################################################################

# $Id: Makefile 644 2008-04-30 14:26:13Z zoggy $

include ../master.Makefile

all: doc_stdlib doc_cameleon

STDLIB_DOC=stdlib.odoc
doc_stdlib:dummy
	$(OCAMLDOC) -I +threads \
	-dump $(STDLIB_DOC) \
	`ls $(OCAMLLIB)/*.mli | grep -v outcometree`

CAMELEON_DOC=cameleon.odoc
doc_cameleon:dummy
	cd $(ROOT)/src && $(MAKE) $(ROOT)/doc/$(CAMELEON_DOC)

install:
	@echo
	@echo Installing documentation...
	@echo
	@$(MKDIR) $(LIBDIR)
	@for i in $(STDLIB_DOC) $(CAMELEON_DOC); do \
	if test -f $$i; then \
                $(CP) $$i $(LIBDIR); echo $(LIBDIR)/`basename $$i` installed; \
        else \
                echo $$i NOT installed ; \
        fi; done
clean:
	$(RM) *.odoc
distclean: clean
dummy: