2002-03-27 08:20:32 -08:00
|
|
|
#(***********************************************************************)
|
2012-08-01 05:09:31 -07:00
|
|
|
#(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
#(* OCamldoc *)
|
2002-03-27 08:20:32 -08:00
|
|
|
#(* *)
|
|
|
|
#(* Maxence Guesdon, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
#(* *)
|
|
|
|
#(* Copyright 2001 Institut National de Recherche en Informatique et *)
|
|
|
|
#(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
#(* under the terms of the Q Public License version 1.0. *)
|
|
|
|
#(* *)
|
|
|
|
#(***********************************************************************)
|
|
|
|
|
|
|
|
include ../config/Makefile
|
|
|
|
|
|
|
|
# Various commands and dir
|
|
|
|
##########################
|
2013-09-19 17:22:38 -07:00
|
|
|
OCAMLC = $(CAMLC_BIN) -nostdlib -I ../stdlib
|
|
|
|
OCAMLOPT = $(CAMLOPT_BIN) -nostdlib -I ../stdlib
|
2002-03-27 08:20:32 -08:00
|
|
|
OCAMLDEP = $(CAMLRUN) ../tools/ocamldep
|
|
|
|
OCAMLLEX = $(CAMLRUN) ../boot/ocamllex
|
|
|
|
OCAMLYACC= ../boot/ocamlyacc
|
|
|
|
OCAMLLIB = $(LIBDIR)
|
|
|
|
OCAMLBIN = $(BINDIR)
|
|
|
|
|
2003-07-27 02:13:43 -07:00
|
|
|
OCAMLPP=-pp './remove_DEBUG'
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2004-12-03 06:42:09 -08:00
|
|
|
# For installation
|
2002-03-27 08:20:32 -08:00
|
|
|
##############
|
|
|
|
MKDIR=mkdir -p
|
2002-04-23 04:35:15 -07:00
|
|
|
CP=cp -f
|
2002-03-27 08:20:32 -08:00
|
|
|
OCAMLDOC=ocamldoc
|
2011-07-20 02:17:07 -07:00
|
|
|
OCAMLDOC_RUN=sh ./runocamldoc $(SUPPORTS_SHARED_LIBRARIES)
|
2002-03-27 08:20:32 -08:00
|
|
|
OCAMLDOC_OPT=$(OCAMLDOC).opt
|
2004-12-03 06:42:09 -08:00
|
|
|
OCAMLDOC_LIBCMA=odoc_info.cma
|
2002-03-27 08:20:32 -08:00
|
|
|
OCAMLDOC_LIBCMI=odoc_info.cmi
|
2004-12-03 06:42:09 -08:00
|
|
|
OCAMLDOC_LIBCMXA=odoc_info.cmxa
|
2012-06-13 02:22:06 -07:00
|
|
|
OCAMLDOC_LIBA=odoc_info.$(A)
|
2002-03-29 03:40:00 -08:00
|
|
|
INSTALL_LIBDIR=$(OCAMLLIB)/ocamldoc
|
2004-01-28 06:10:20 -08:00
|
|
|
INSTALL_CUSTOMDIR=$(INSTALL_LIBDIR)/custom
|
2002-03-27 08:20:32 -08:00
|
|
|
INSTALL_BINDIR=$(OCAMLBIN)
|
2003-07-08 06:52:22 -07:00
|
|
|
INSTALL_MANODIR=$(MANDIR)/man3
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2004-12-03 06:42:09 -08:00
|
|
|
INSTALL_MLIS=odoc_info.mli
|
2002-03-27 08:20:32 -08:00
|
|
|
INSTALL_CMIS=$(INSTALL_MLIS:.mli=.cmi)
|
|
|
|
|
2004-02-20 08:28:27 -08:00
|
|
|
ODOC_TEST=odoc_test.cmo
|
|
|
|
|
2010-08-24 04:48:46 -07:00
|
|
|
GENERATORS_CMOS= \
|
|
|
|
generators/odoc_todo.cmo \
|
|
|
|
generators/odoc_literate.cmo
|
2012-08-09 10:06:08 -07:00
|
|
|
true = $(GENERATORS_CMOS:.cmo=.cmxs)
|
|
|
|
false =
|
|
|
|
GENERATORS_CMXS := $($(NATDYNLINK))
|
2010-08-24 04:48:46 -07:00
|
|
|
|
2004-02-20 08:28:27 -08:00
|
|
|
|
2002-03-27 08:20:32 -08:00
|
|
|
# Compilation
|
|
|
|
#############
|
2002-04-29 02:26:59 -07:00
|
|
|
OCAMLSRCDIR=..
|
2002-08-19 06:28:20 -07:00
|
|
|
INCLUDES_DEP=-I $(OCAMLSRCDIR)/parsing \
|
2002-03-27 08:20:32 -08:00
|
|
|
-I $(OCAMLSRCDIR)/utils \
|
|
|
|
-I $(OCAMLSRCDIR)/typing \
|
|
|
|
-I $(OCAMLSRCDIR)/driver \
|
|
|
|
-I $(OCAMLSRCDIR)/bytecomp \
|
|
|
|
-I $(OCAMLSRCDIR)/tools \
|
2002-08-19 06:28:20 -07:00
|
|
|
-I $(OCAMLSRCDIR)/toplevel/
|
|
|
|
|
|
|
|
INCLUDES_NODEP= -I $(OCAMLSRCDIR)/stdlib \
|
2002-03-27 08:20:32 -08:00
|
|
|
-I $(OCAMLSRCDIR)/otherlibs/str \
|
|
|
|
-I $(OCAMLSRCDIR)/otherlibs/dynlink \
|
2013-06-30 05:58:34 -07:00
|
|
|
-I $(OCAMLSRCDIR)/otherlibs/$(UNIXLIB) \
|
2002-03-27 08:20:32 -08:00
|
|
|
-I $(OCAMLSRCDIR)/otherlibs/num \
|
2013-06-30 05:58:34 -07:00
|
|
|
-I $(OCAMLSRCDIR)/otherlibs/$(GRAPHLIB)
|
2002-08-19 06:28:20 -07:00
|
|
|
|
|
|
|
INCLUDES=$(INCLUDES_DEP) $(INCLUDES_NODEP)
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2004-12-03 06:42:09 -08:00
|
|
|
COMPFLAGS=$(INCLUDES) -warn-error A
|
2007-11-06 07:16:56 -08:00
|
|
|
LINKFLAGS=$(INCLUDES) -nostdlib
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2004-01-28 05:36:20 -08:00
|
|
|
CMOFILES= odoc_config.cmo \
|
2002-03-27 08:20:32 -08:00
|
|
|
odoc_messages.cmo\
|
2010-08-24 02:45:45 -07:00
|
|
|
odoc_global.cmo\
|
2002-03-27 08:20:32 -08:00
|
|
|
odoc_types.cmo\
|
|
|
|
odoc_misc.cmo\
|
|
|
|
odoc_text_parser.cmo\
|
|
|
|
odoc_text_lexer.cmo\
|
|
|
|
odoc_text.cmo\
|
|
|
|
odoc_name.cmo\
|
|
|
|
odoc_parameter.cmo\
|
|
|
|
odoc_value.cmo\
|
|
|
|
odoc_type.cmo\
|
|
|
|
odoc_exception.cmo\
|
|
|
|
odoc_class.cmo\
|
|
|
|
odoc_module.cmo\
|
2004-03-05 06:57:52 -08:00
|
|
|
odoc_print.cmo \
|
2002-03-27 08:20:32 -08:00
|
|
|
odoc_str.cmo\
|
|
|
|
odoc_comments_global.cmo\
|
|
|
|
odoc_parser.cmo\
|
|
|
|
odoc_lexer.cmo\
|
|
|
|
odoc_see_lexer.cmo\
|
|
|
|
odoc_env.cmo\
|
|
|
|
odoc_merge.cmo\
|
|
|
|
odoc_sig.cmo\
|
|
|
|
odoc_ast.cmo\
|
|
|
|
odoc_control.cmo\
|
|
|
|
odoc_inherit.cmo\
|
|
|
|
odoc_search.cmo\
|
2004-03-22 04:40:49 -08:00
|
|
|
odoc_scan.cmo\
|
2002-03-27 08:20:32 -08:00
|
|
|
odoc_cross.cmo\
|
2006-09-20 04:14:37 -07:00
|
|
|
odoc_comments.cmo\
|
2002-03-27 08:20:32 -08:00
|
|
|
odoc_dep.cmo\
|
|
|
|
odoc_analyse.cmo\
|
|
|
|
odoc_info.cmo
|
|
|
|
|
|
|
|
|
|
|
|
CMXFILES= $(CMOFILES:.cmo=.cmx)
|
|
|
|
CMIFILES= $(CMOFILES:.cmo=.cmi)
|
|
|
|
|
2009-03-11 00:04:39 -07:00
|
|
|
EXECMOFILES=$(CMOFILES) \
|
|
|
|
odoc_dag2html.cmo \
|
|
|
|
odoc_to_text.cmo \
|
|
|
|
odoc_ocamlhtml.cmo \
|
|
|
|
odoc_html.cmo \
|
|
|
|
odoc_man.cmo \
|
2003-07-04 03:02:13 -07:00
|
|
|
odoc_latex_style.cmo \
|
2009-03-11 00:04:39 -07:00
|
|
|
odoc_latex.cmo \
|
|
|
|
odoc_texi.cmo \
|
|
|
|
odoc_dot.cmo \
|
2010-08-24 02:45:45 -07:00
|
|
|
odoc_gen.cmo \
|
2012-06-13 02:22:06 -07:00
|
|
|
odoc_args.cmo \
|
2009-03-11 00:04:39 -07:00
|
|
|
odoc.cmo
|
2002-03-27 08:20:32 -08:00
|
|
|
|
|
|
|
EXECMXFILES= $(EXECMOFILES:.cmo=.cmx)
|
|
|
|
EXECMIFILES= $(EXECMOFILES:.cmo=.cmi)
|
|
|
|
|
|
|
|
LIBCMOFILES=$(CMOFILES)
|
|
|
|
LIBCMXFILES= $(LIBCMOFILES:.cmo=.cmx)
|
|
|
|
LIBCMIFILES= $(LIBCMOFILES:.cmo=.cmi)
|
|
|
|
|
|
|
|
# Les cmo et cmx de la distrib OCAML
|
|
|
|
OCAMLCMOFILES=$(OCAMLSRCDIR)/parsing/printast.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/ident.cmo \
|
|
|
|
$(OCAMLSRCDIR)/utils/tbl.cmo \
|
|
|
|
$(OCAMLSRCDIR)/utils/misc.cmo \
|
|
|
|
$(OCAMLSRCDIR)/utils/config.cmo \
|
|
|
|
$(OCAMLSRCDIR)/utils/clflags.cmo \
|
|
|
|
$(OCAMLSRCDIR)/utils/warnings.cmo \
|
|
|
|
$(OCAMLSRCDIR)/utils/ccomp.cmo \
|
2002-11-17 08:42:12 -08:00
|
|
|
$(OCAMLSRCDIR)/utils/consistbl.cmo \
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLSRCDIR)/parsing/location.cmo\
|
|
|
|
$(OCAMLSRCDIR)/parsing/longident.cmo \
|
|
|
|
$(OCAMLSRCDIR)/parsing/syntaxerr.cmo \
|
2013-03-08 06:59:45 -08:00
|
|
|
$(OCAMLSRCDIR)/parsing/ast_helper.cmo \
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLSRCDIR)/parsing/parser.cmo \
|
|
|
|
$(OCAMLSRCDIR)/parsing/lexer.cmo \
|
|
|
|
$(OCAMLSRCDIR)/parsing/parse.cmo \
|
2013-09-26 08:24:11 -07:00
|
|
|
$(OCAMLSRCDIR)/parsing/ast_mapper.cmo \
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLSRCDIR)/typing/types.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/path.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/btype.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/predef.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/datarepr.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/subst.cmo \
|
2012-05-30 07:52:37 -07:00
|
|
|
$(OCAMLSRCDIR)/typing/cmi_format.cmo \
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLSRCDIR)/typing/env.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/ctype.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/primitive.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/oprint.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/printtyp.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/includecore.cmo \
|
2003-08-12 04:59:16 -07:00
|
|
|
$(OCAMLSRCDIR)/typing/typedtree.cmo \
|
2013-03-06 03:47:59 -08:00
|
|
|
$(OCAMLSRCDIR)/typing/typetexp.cmo \
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLSRCDIR)/typing/parmatch.cmo \
|
2003-04-01 17:32:09 -08:00
|
|
|
$(OCAMLSRCDIR)/typing/stypes.cmo \
|
2012-07-12 04:02:18 -07:00
|
|
|
$(OCAMLSRCDIR)/typing/typedtreeMap.cmo \
|
2012-05-30 07:52:37 -07:00
|
|
|
$(OCAMLSRCDIR)/typing/cmt_format.cmo \
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLSRCDIR)/typing/typecore.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/includeclass.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/typedecl.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/typeclass.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/mtype.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/includemod.cmo \
|
|
|
|
$(OCAMLSRCDIR)/typing/typemod.cmo \
|
|
|
|
$(OCAMLSRCDIR)/bytecomp/lambda.cmo \
|
|
|
|
$(OCAMLSRCDIR)/bytecomp/typeopt.cmo \
|
|
|
|
$(OCAMLSRCDIR)/bytecomp/printlambda.cmo \
|
|
|
|
$(OCAMLSRCDIR)/bytecomp/switch.cmo \
|
|
|
|
$(OCAMLSRCDIR)/bytecomp/matching.cmo \
|
|
|
|
$(OCAMLSRCDIR)/bytecomp/translobj.cmo \
|
|
|
|
$(OCAMLSRCDIR)/bytecomp/translcore.cmo \
|
|
|
|
$(OCAMLSRCDIR)/bytecomp/translclass.cmo \
|
2012-06-13 01:32:57 -07:00
|
|
|
$(OCAMLSRCDIR)/tools/depend.cmo \
|
|
|
|
$(OCAMLSRCDIR)/driver/pparse.cmo
|
2002-03-27 08:20:32 -08:00
|
|
|
|
|
|
|
OCAMLCMXFILES=$(OCAMLCMOFILES:.cmo=.cmx)
|
|
|
|
|
2002-05-29 01:32:15 -07:00
|
|
|
STDLIB_MLIS=../stdlib/*.mli \
|
2013-06-30 05:58:34 -07:00
|
|
|
../otherlibs/$(UNIXLIB)/unix.mli \
|
2002-05-29 01:32:15 -07:00
|
|
|
../otherlibs/str/str.mli \
|
|
|
|
../otherlibs/bigarray/bigarray.mli \
|
|
|
|
../otherlibs/num/num.mli
|
|
|
|
|
2013-07-24 07:39:31 -07:00
|
|
|
all:
|
|
|
|
$(MAKE) exe
|
|
|
|
$(MAKE) lib
|
|
|
|
$(MAKE) generators
|
|
|
|
$(MAKE) manpages
|
2005-05-31 04:52:16 -07:00
|
|
|
|
2002-03-27 08:20:32 -08:00
|
|
|
exe: $(OCAMLDOC)
|
2004-02-20 08:28:27 -08:00
|
|
|
lib: $(OCAMLDOC_LIBCMA) $(OCAMLDOC_LIBCMI) $(ODOC_TEST)
|
2010-08-24 04:48:46 -07:00
|
|
|
generators: $(GENERATORS_CMOS)
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2010-08-24 04:48:46 -07:00
|
|
|
opt.opt: exeopt libopt generatorsopt
|
2002-03-27 08:20:32 -08:00
|
|
|
exeopt: $(OCAMLDOC_OPT)
|
2004-12-03 06:42:09 -08:00
|
|
|
libopt: $(OCAMLDOC_LIBCMXA) $(OCAMLDOC_LIBCMI)
|
2010-08-24 04:48:46 -07:00
|
|
|
generatorsopt: $(GENERATORS_CMXS)
|
|
|
|
|
2004-12-03 06:42:09 -08:00
|
|
|
debug:
|
2012-07-10 08:29:19 -07:00
|
|
|
$(MAKE) OCAMLPP=""
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2009-03-11 00:04:39 -07:00
|
|
|
$(OCAMLDOC): $(EXECMOFILES)
|
|
|
|
$(OCAMLC) -o $@ -linkall unix.cma str.cma dynlink.cma $(LINKFLAGS) $(OCAMLCMOFILES) $(EXECMOFILES)
|
|
|
|
$(OCAMLDOC_OPT): $(EXECMXFILES)
|
2012-07-26 12:21:54 -07:00
|
|
|
$(OCAMLOPT) -o $@ -linkall unix.cmxa str.cmxa dynlink.cmxa $(LINKFLAGS) $(OCAMLCMXFILES) $(EXECMXFILES)
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2002-04-26 06:07:59 -07:00
|
|
|
$(OCAMLDOC_LIBCMA): $(LIBCMOFILES)
|
2012-07-26 12:21:54 -07:00
|
|
|
$(OCAMLC) -a -o $@ $(LINKFLAGS) $(OCAMLSRCDIR)/tools/depend.cmo $(LIBCMOFILES)
|
2002-04-26 06:07:59 -07:00
|
|
|
$(OCAMLDOC_LIBCMXA): $(LIBCMXFILES)
|
2012-07-26 12:21:54 -07:00
|
|
|
$(OCAMLOPT) -a -o $@ $(LINKFLAGS) $(OCAMLSRCDIR)/tools/depend.cmx $(LIBCMXFILES)
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2004-01-28 05:36:20 -08:00
|
|
|
manpages: stdlib_man/Pervasives.3o
|
2002-04-22 02:40:14 -07:00
|
|
|
|
2009-03-11 00:04:39 -07:00
|
|
|
dot: $(EXECMOFILES)
|
2006-09-20 04:14:37 -07:00
|
|
|
$(OCAMLDOC_RUN) -dot -dot-reduce -o ocamldoc.dot $(INCLUDES) \
|
|
|
|
odoc*.ml
|
|
|
|
|
2002-04-26 06:07:59 -07:00
|
|
|
# Parsers and lexers dependencies :
|
|
|
|
###################################
|
|
|
|
odoc_text_parser.ml: odoc_text_parser.mly
|
|
|
|
odoc_text_parser.mli: odoc_text_parser.mly
|
|
|
|
|
|
|
|
odoc_parser.ml: odoc_parser.mly
|
|
|
|
odoc_parser.mli:odoc_parser.mly
|
|
|
|
|
|
|
|
odoc_text_lexer.ml: odoc_text_lexer.mll
|
|
|
|
|
|
|
|
odoc_lexer.ml:odoc_lexer.mll
|
|
|
|
|
|
|
|
odoc_ocamlhtml.ml: odoc_ocamlhtml.mll
|
|
|
|
|
|
|
|
odoc_see_lexer.ml: odoc_see_lexer.mll
|
|
|
|
|
|
|
|
|
2002-03-27 08:20:32 -08:00
|
|
|
# generic rules :
|
|
|
|
#################
|
|
|
|
|
2010-08-24 04:48:46 -07:00
|
|
|
.SUFFIXES: .mll .mly .ml .mli .cmo .cmi .cmx .cmxs
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2002-04-26 06:07:59 -07:00
|
|
|
.ml.cmo:
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLC) $(OCAMLPP) $(COMPFLAGS) -c $<
|
|
|
|
|
2002-04-26 06:07:59 -07:00
|
|
|
.mli.cmi:
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLC) $(OCAMLPP) $(COMPFLAGS) -c $<
|
|
|
|
|
2002-04-26 06:07:59 -07:00
|
|
|
.ml.cmx:
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLOPT) $(OCAMLPP) $(COMPFLAGS) -c $<
|
|
|
|
|
2010-08-24 04:48:46 -07:00
|
|
|
.ml.cmxs:
|
|
|
|
$(OCAMLOPT) -shared -o $@ $(OCAMLPP) $(COMPFLAGS) $<
|
|
|
|
|
2002-04-26 06:07:59 -07:00
|
|
|
.mll.ml:
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLLEX) $<
|
|
|
|
|
2002-04-26 06:07:59 -07:00
|
|
|
.mly.ml:
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLYACC) -v $<
|
|
|
|
|
2002-04-29 02:26:59 -07:00
|
|
|
.mly.mli:
|
|
|
|
$(OCAMLYACC) -v $<
|
|
|
|
|
2002-03-27 08:20:32 -08:00
|
|
|
# Installation targets
|
|
|
|
######################
|
|
|
|
install: dummy
|
|
|
|
if test -d $(INSTALL_BINDIR); then : ; else $(MKDIR) $(INSTALL_BINDIR); fi
|
|
|
|
if test -d $(INSTALL_LIBDIR); then : ; else $(MKDIR) $(INSTALL_LIBDIR); fi
|
2004-01-28 06:10:20 -08:00
|
|
|
if test -d $(INSTALL_CUSTOMDIR); then : ; else $(MKDIR) $(INSTALL_CUSTOMDIR); fi
|
2007-11-06 07:16:56 -08:00
|
|
|
$(CP) $(OCAMLDOC) $(INSTALL_BINDIR)/$(OCAMLDOC)$(EXE)
|
2004-03-22 07:25:10 -08:00
|
|
|
$(CP) ocamldoc.hva *.cmi $(OCAMLDOC_LIBCMA) $(INSTALL_LIBDIR)
|
2002-03-27 08:20:32 -08:00
|
|
|
$(CP) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
|
2002-04-24 01:32:43 -07:00
|
|
|
if test -d $(INSTALL_MANODIR); then : ; else $(MKDIR) $(INSTALL_MANODIR); fi
|
2006-06-29 05:07:35 -07:00
|
|
|
if test -d stdlib_man; then $(CP) stdlib_man/* $(INSTALL_MANODIR); else : ; fi
|
2002-03-27 08:20:32 -08:00
|
|
|
|
|
|
|
installopt:
|
2002-04-02 01:15:25 -08:00
|
|
|
if test -f $(OCAMLDOC_OPT) ; then $(MAKE) installopt_really ; fi
|
|
|
|
|
|
|
|
installopt_really:
|
2002-03-27 08:20:32 -08:00
|
|
|
if test -d $(INSTALL_BINDIR); then : ; else $(MKDIR) $(INSTALL_BINDIR); fi
|
|
|
|
if test -d $(INSTALL_LIBDIR); then : ; else $(MKDIR) $(INSTALL_LIBDIR); fi
|
2003-09-29 07:05:01 -07:00
|
|
|
$(CP) $(OCAMLDOC_OPT) $(INSTALL_BINDIR)/$(OCAMLDOC_OPT)$(EXE)
|
2003-07-08 06:52:22 -07:00
|
|
|
$(CP) ocamldoc.hva $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) $(INSTALL_LIBDIR)
|
2002-03-27 08:20:32 -08:00
|
|
|
$(CP) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
|
|
|
|
|
2002-04-03 08:38:29 -08:00
|
|
|
# Testing :
|
|
|
|
###########
|
|
|
|
test: dummy
|
2004-12-03 06:42:09 -08:00
|
|
|
$(MKDIR) $@
|
2010-08-02 07:37:22 -07:00
|
|
|
$(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/ocamldoc.odoc odoc*.ml odoc*.mli -v
|
2010-08-24 04:48:46 -07:00
|
|
|
$(MKDIR) $@-custom
|
|
|
|
$(OCAMLDOC_RUN) -colorize-code -sort -d $@-custom $(INCLUDES) \
|
|
|
|
-g generators/odoc_literate.cmo -g generators/odoc_todo.cmo \
|
|
|
|
-load $@/ocamldoc.odoc -v
|
2002-04-03 08:38:29 -08:00
|
|
|
|
2002-04-04 00:38:53 -08:00
|
|
|
test_stdlib: dummy
|
2004-12-03 06:42:09 -08:00
|
|
|
$(MKDIR) $@
|
2003-11-21 07:56:09 -08:00
|
|
|
$(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/stdlib.odoc -keep-code \
|
|
|
|
../stdlib/pervasives.ml ../stdlib/*.mli \
|
2013-06-30 05:58:34 -07:00
|
|
|
../otherlibs/$(UNIXLIB)/unix.mli \
|
2002-04-04 00:38:53 -08:00
|
|
|
../otherlibs/str/str.mli
|
|
|
|
|
2012-07-26 12:21:54 -07:00
|
|
|
test_stdlib_code: dummy
|
|
|
|
$(MKDIR) $@
|
|
|
|
$(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/stdlib.odoc -keep-code \
|
|
|
|
`ls ../stdlib/*.ml | grep -v Labels` \
|
2013-06-30 05:58:34 -07:00
|
|
|
../otherlibs/$(UNIXLIB)/unix.ml \
|
2012-07-26 12:21:54 -07:00
|
|
|
../otherlibs/str/str.ml
|
|
|
|
|
2002-04-03 08:38:29 -08:00
|
|
|
test_framed: dummy
|
2004-12-03 06:42:09 -08:00
|
|
|
$(MKDIR) $@
|
2003-08-25 00:25:36 -07:00
|
|
|
$(OCAMLDOC_RUN) -g odoc_fhtml.cmo -sort -colorize-code -d $@ $(INCLUDES) odoc*.ml odoc*.mli
|
2002-04-03 08:38:29 -08:00
|
|
|
|
|
|
|
test_latex: dummy
|
2004-12-03 06:42:09 -08:00
|
|
|
$(MKDIR) $@
|
2006-01-04 08:55:50 -08:00
|
|
|
$(OCAMLDOC_RUN) -latex -sort -o $@/test.tex -d $@ $(INCLUDES) odoc*.ml odoc*.mli test2.txt ../stdlib/*.mli ../otherlibs/unix/unix.mli
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2004-03-26 07:57:03 -08:00
|
|
|
test_latex_simple: dummy
|
2004-12-03 06:42:09 -08:00
|
|
|
$(MKDIR) $@
|
2004-03-26 07:57:03 -08:00
|
|
|
$(OCAMLDOC_RUN) -latex -sort -o $@/test.tex -d $@ $(INCLUDES) \
|
2004-04-02 07:10:58 -08:00
|
|
|
-latextitle 6,subsection -latextitle 7,subsubection \
|
2004-03-26 07:57:03 -08:00
|
|
|
../stdlib/hashtbl.mli \
|
|
|
|
../stdlib/arg.mli \
|
2013-06-30 05:58:34 -07:00
|
|
|
../otherlibs/$(UNIXLIB)/unix.mli \
|
2004-03-26 07:57:03 -08:00
|
|
|
../stdlib/map.mli
|
|
|
|
|
2002-04-05 03:25:22 -08:00
|
|
|
test_man: dummy
|
2004-12-03 06:42:09 -08:00
|
|
|
$(MKDIR) $@
|
2003-08-25 00:25:36 -07:00
|
|
|
$(OCAMLDOC_RUN) -man -sort -d $@ $(INCLUDES) odoc*.ml odoc*.mli
|
2002-04-05 03:25:22 -08:00
|
|
|
|
|
|
|
test_texi: dummy
|
2004-12-03 06:42:09 -08:00
|
|
|
$(MKDIR) $@
|
2003-08-25 00:25:36 -07:00
|
|
|
$(OCAMLDOC_RUN) -texi -sort -d $@ $(INCLUDES) odoc*.ml odoc*.mli
|
2002-04-05 03:25:22 -08:00
|
|
|
|
2004-01-28 05:53:12 -08:00
|
|
|
stdlib_man/Pervasives.3o: $(STDLIB_MLIS)
|
2002-05-29 01:32:15 -07:00
|
|
|
$(MKDIR) stdlib_man
|
|
|
|
$(OCAMLDOC_RUN) -man -d stdlib_man $(INCLUDES) \
|
2005-03-24 09:20:54 -08:00
|
|
|
-t "OCaml library" -man-mini \
|
2002-05-29 01:32:15 -07:00
|
|
|
$(STDLIB_MLIS)
|
2002-04-22 02:40:14 -07:00
|
|
|
|
2003-11-24 13:20:51 -08:00
|
|
|
autotest_stdlib: dummy
|
2004-12-03 06:42:09 -08:00
|
|
|
$(MKDIR) $@
|
2003-11-24 13:20:51 -08:00
|
|
|
$(OCAMLDOC_RUN) -g autotest/odoc_test.cmo\
|
|
|
|
$(INCLUDES) -keep-code \
|
|
|
|
../stdlib/pervasives.ml ../stdlib/*.mli \
|
2013-06-30 05:58:34 -07:00
|
|
|
../otherlibs/$(UNIXLIB)/unix.mli \
|
2003-11-24 13:20:51 -08:00
|
|
|
../otherlibs/str/str.mli
|
|
|
|
|
2002-03-27 08:20:32 -08:00
|
|
|
# backup, clean and depend :
|
|
|
|
############################
|
|
|
|
|
|
|
|
clean:: dummy
|
|
|
|
@rm -f *~ \#*\#
|
2012-06-13 02:22:06 -07:00
|
|
|
@rm -f $(OCAMLDOC) $(OCAMLDOC_OPT) *.cma *.cmxa *.cmo *.cmi *.cmx *.$(A) *.$(O)
|
2002-03-27 08:20:32 -08:00
|
|
|
@rm -f odoc_parser.output odoc_text_parser.output
|
|
|
|
@rm -f odoc_lexer.ml odoc_text_lexer.ml odoc_see_lexer.ml odoc_ocamlhtml.ml
|
2004-12-03 06:42:09 -08:00
|
|
|
@rm -f odoc_parser.ml odoc_parser.mli odoc_text_parser.ml odoc_text_parser.mli
|
2003-07-08 06:52:22 -07:00
|
|
|
@rm -rf stdlib_man
|
2012-06-13 02:22:06 -07:00
|
|
|
@rm -f generators/*.cm[aiox] generators/*.$(A) generators/*.$(O) generators/*.cmx[as]
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2002-05-06 01:46:04 -07:00
|
|
|
depend::
|
2002-03-27 08:20:32 -08:00
|
|
|
$(OCAMLYACC) odoc_text_parser.mly
|
|
|
|
$(OCAMLYACC) odoc_parser.mly
|
|
|
|
$(OCAMLLEX) odoc_text_lexer.mll
|
|
|
|
$(OCAMLLEX) odoc_lexer.mll
|
2002-04-05 01:20:00 -08:00
|
|
|
$(OCAMLLEX) odoc_ocamlhtml.mll
|
|
|
|
$(OCAMLLEX) odoc_see_lexer.mll
|
2002-08-19 06:28:20 -07:00
|
|
|
$(OCAMLDEP) $(INCLUDES_DEP) *.mll *.mly *.ml *.mli > .depend
|
2002-03-27 08:20:32 -08:00
|
|
|
|
|
|
|
dummy:
|
|
|
|
|
|
|
|
include .depend
|