-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathMakefile.best_ocamldoc
41 lines (36 loc) · 1.83 KB
/
Makefile.best_ocamldoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#**************************************************************************
#* *
#* OCaml *
#* *
#* Florian Angeletti, projet Cambium, Inria Paris *
#* *
#* Copyright 2020 Institut National de Recherche en Informatique et *
#* en Automatique. *
#* *
#* All rights reserved. This file is distributed under the terms of *
#* the GNU Lesser General Public License version 2.1, with the *
#* special exception on linking described in the file LICENSE. *
#* *
#**************************************************************************
OCAMLDOC = $(ROOTDIR)/ocamldoc/ocamldoc$(EXE)
OCAMLDOC_OPT = $(ROOTDIR)/ocamldoc/ocamldoc.opt$(EXE)
ifeq "$(TARGET)" "$(HOST)"
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
OCAMLDOC_RUN_BYTE = $(OCAMLRUN) -I $(ROOTDIR)/otherlibs/unix \
-I $(ROOTDIR)/otherlibs/str ./$(OCAMLDOC)
else
# if shared-libraries are not supported, unix.cma and str.cma
# are compiled with -custom, so ocamldoc also uses -custom,
# and (ocamlrun ocamldoc) does not work.
OCAMLDOC_RUN_BYTE = ./$(OCAMLDOC)
endif
else
OCAMLDOC_RUN_BYTE = $(OCAMLRUN) ./$(OCAMLDOC)
endif
OCAMLDOC_RUN_OPT = ./$(OCAMLDOC_OPT)
OCAMLDOC_RUN_PLUGINS = $(OCAMLDOC_RUN_BYTE)
ifeq "$(wildcard $(OCAMLDOC_OPT))" ""
OCAMLDOC_RUN = $(OCAMLDOC_RUN_BYTE)
else
OCAMLDOC_RUN = $(OCAMLDOC_RUN_OPT)
endif