summaryrefslogtreecommitdiffstats
path: root/ocamldoc/Makefile
diff options
context:
space:
mode:
authorAdrien Nader <adrien@notk.org>2015-02-08 18:59:24 +0100
committerAdrien Nader <adrien@notk.org>2015-02-08 18:59:24 +0100
commit9aa69ae40db1cf8484d0caadb1da2d88f2038ddc (patch)
tree07b097cf00935b2437f934e5b4817a221f17af16 /ocamldoc/Makefile
parent8fd3507127ac683825ccba3d98ad3048525b2acc (diff)
debugger, ocamlbuild, ocamldoc: separate their build from the compiler's.HEADmaster
In other words: "make world" doesn't build the aforementioned tools anymore and they need to be configured and built separately. They are still in the same source tree. At first sight this should lead to more work but there are _several_ reasons for such a split. * It dissociates the builds and therefore the breakage when doing changes in the build system. * It makes changing one of them simpler. * It simplifies the Makefile files and removes some needs for the UNIX_OR_WIN32 variable. * It removes the Makefile.nt files and enables the build of the manpages on Windows too. * It builds these tools using the .opt variants when possible. This doesn't save that much time but it's nice nonetheless. * It's simpler to package for distributions which already split these tools to their own packages. * It simplifies cross-compilation by reducing the scope of the changes needed (i.e. I hope there won't be a need for more changes in the build systems of these tools). * It refers less to boot/ and should make bootstrapping at least a bit simpler (I can't tell how much but in any case it's not negative). As for the negative aspects: * Possibly more steps for compiler hackers in the "hot path". * A hand-written "configure_tool" script which creates a "Makefile.local" file which is include'ed from the Makefile files and which defines the invocation of the compiler and of other tools. After these changes, there are two ways to build the tools: whether OCaml is installed system-wide or not (i.e. "uninstalled" [ I'm not to be blamed for this terminology ]). If the compiler has been installed (typical for packagers): ./configure_tool debugger make -C debugger all If the compiler has not been installed (probably typical for compiler devs even though I'm not sure most don't disable the build of the tools when doing their development): UNINSTALLED_OCAML_DESTDIR=$(pwd)/lapin UNINSTALLED_OCAML_PREFIX=/usr ./configure_tool debugger make -C debugger all In the example directly above, UNINSTALLED_OCAML_PREFIX defaults to "/usr/local" (the default for the compiler build too) and must match. UNINSTALLED_OCAML_DESTDIR has no default and must be the same as the value used for DESTDIR when running "make install DESTDIR=$(pwd)/lapin" for the compiler. Providing an absolute path, while not mandatory, is saner. Comments are welcome on how to make the whole process more handy for you (yes, "you", the reader, whoever you are).
Diffstat (limited to 'ocamldoc/Makefile')
-rw-r--r--ocamldoc/Makefile10
1 files changed, 1 insertions, 9 deletions
diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile
index 828aad062..30f7ebc0e 100644
--- a/ocamldoc/Makefile
+++ b/ocamldoc/Makefile
@@ -10,17 +10,10 @@
#(* *)
#(***********************************************************************)
-include ../config/Makefile
+include Makefile.local
# Various commands and dir
##########################
-ROOTDIR = ..
-OCAMLRUN = $(ROOTDIR)/boot/ocamlrun
-OCAMLC = $(OCAMLRUN) $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib
-OCAMLOPT = $(OCAMLRUN) $(ROOTDIR)/ocamlopt -nostdlib -I $(ROOTDIR)/stdlib
-OCAMLDEP = $(OCAMLRUN) $(ROOTDIR)/tools/ocamldep
-OCAMLLEX = $(OCAMLRUN) $(ROOTDIR)/boot/ocamllex
-OCAMLYACC = $(ROOTDIR)/yacc/ocamlyacc
OCAMLLIB = $(LIBDIR)
OCAMLBIN = $(BINDIR)
@@ -34,7 +27,6 @@ OCAMLPP=-pp "awk 'BEGIN { printf(\"# 1 %s\n\", ARGV[1]); } /DEBUG/ { printf(\"(*
MKDIR=mkdir -p
CP=cp -f
OCAMLDOC=ocamldoc
-OCAMLDOC_RUN=sh ./runocamldoc $(SUPPORTS_SHARED_LIBRARIES)
OCAMLDOC_OPT=$(OCAMLDOC).opt
OCAMLDOC_LIBCMA=odoc_info.cma
OCAMLDOC_LIBCMI=odoc_info.cmi