From 9aa69ae40db1cf8484d0caadb1da2d88f2038ddc Mon Sep 17 00:00:00 2001 From: Adrien Nader Date: Sun, 8 Feb 2015 18:59:24 +0100 Subject: debugger, ocamlbuild, ocamldoc: separate their build from the compiler's. 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). --- Makefile | 17 +--- configure | 24 ----- configure_tool | 162 ++++++++++++++++++++++++++++++ debugger/.depend | 256 ++++++++++++++++------------------------------- debugger/Makefile | 99 +++++++++++++++++- debugger/Makefile.nt | 14 --- debugger/Makefile.shared | 129 ------------------------ ocamlbuild/.depend | 50 ++++----- ocamlbuild/Makefile | 21 ++-- ocamldoc/.depend | 26 ++--- ocamldoc/Makefile | 10 +- ocamldoc/Makefile.nt | 253 ---------------------------------------------- ocamldoc/runocamldoc | 23 ----- 13 files changed, 398 insertions(+), 686 deletions(-) create mode 100755 configure_tool delete mode 100644 debugger/Makefile.nt delete mode 100644 debugger/Makefile.shared delete mode 100644 ocamldoc/Makefile.nt delete mode 100644 ocamldoc/runocamldoc diff --git a/Makefile b/Makefile index 0a8b05373..a4bf9269a 100644 --- a/Makefile +++ b/Makefile @@ -30,11 +30,6 @@ CAMLRUN=byterun/ocamlrun SHELL=/bin/sh MKDIR=mkdir -p -OCAMLBUILDBYTE=$(WITH_OCAMLBUILD:=.byte) -OCAMLBUILDNATIVE=$(WITH_OCAMLBUILD:=.native) - -OCAMLDOC_OPT=$(WITH_OCAMLDOC:=.opt) - INCLUDES=-I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver \ -I toplevel @@ -145,8 +140,7 @@ all: $(MAKE) runtime $(MAKE) coreall $(MAKE) ocaml - $(MAKE) otherlibraries $(OCAMLBUILDBYTE) $(WITH_DEBUGGER) \ - $(WITH_OCAMLDOC) + $(MAKE) otherlibraries # Compile everything the first time world: @@ -287,12 +281,10 @@ opt.opt: $(MAKE) ocaml $(MAKE) opt-core $(MAKE) ocamlc.opt - $(MAKE) otherlibraries $(WITH_DEBUGGER) $(WITH_OCAMLDOC) \ - $(OCAMLBUILDBYTE) + $(MAKE) otherlibraries $(MAKE) ocamlopt.opt $(MAKE) otherlibrariesopt - $(MAKE) ocamllex.opt ocamltoolsopt ocamltoolsopt.opt $(OCAMLDOC_OPT) \ - $(OCAMLBUILDNATIVE) + $(MAKE) ocamllex.opt ocamltoolsopt ocamltoolsopt.opt base.opt: $(MAKE) checkstack @@ -301,8 +293,7 @@ base.opt: $(MAKE) ocaml $(MAKE) opt-core $(MAKE) ocamlc.opt - $(MAKE) otherlibraries $(OCAMLBUILDBYTE) $(WITH_DEBUGGER) \ - $(WITH_OCAMLDOC) + $(MAKE) otherlibraries $(MAKE) ocamlopt.opt $(MAKE) otherlibrariesopt diff --git a/configure b/configure index 1be4682a3..7f0128489 100755 --- a/configure +++ b/configure @@ -39,9 +39,6 @@ debugruntime=noruntimed with_sharedlibs=yes gcc_warnings="-Wall" partialld="ld -r" -with_debugger=ocamldebugger -with_ocamldoc=ocamldoc -with_ocamlbuild=ocamlbuild with_frame_pointers=false no_naked_pointers=false TOOLPREF="" @@ -139,12 +136,6 @@ while : ; do verbose=yes;; -with-debug-runtime|--with-debug-runtime) debugruntime=runtimed;; - -no-debugger|--no-debugger) - with_debugger="";; - -no-ocamldoc|--no-ocamldoc) - with_ocamldoc="";; - -no-ocamlbuild|--no-ocamlbuild) - with_ocamlbuild="";; -with-frame-pointers|--with-frame-pointers) with_frame_pointers=true;; -no-naked-pointers|--no-naked-pointers) @@ -1317,18 +1308,6 @@ if sh ./hasgot nice; then echo "#define HAS_NICE" >> s.h fi -# Determine if the debugger is supported - -if test -n "$with_debugger"; then - if test "$has_sockets" = "yes"; then - inf "Replay debugger supported." - with_debugger="ocamldebugger" - else - inf "No replay debugger (missing system calls)" - with_debugger="" - fi -fi - # Determine if system stack overflows can be detected case "$arch,$system" in @@ -1706,9 +1685,6 @@ echo "MKEXEDEBUGFLAG=$mkexedebugflag" >> Makefile echo "MKDLL=$mksharedlib" >> Makefile echo "MKMAINDLL=$mkmaindll" >> Makefile echo "RUNTIMED=${debugruntime}" >>Makefile -echo "WITH_DEBUGGER=${with_debugger}" >>Makefile -echo "WITH_OCAMLDOC=${with_ocamldoc}" >>Makefile -echo "WITH_OCAMLBUILD=${with_ocamlbuild}" >>Makefile echo "ASM_CFI_SUPPORTED=$asm_cfi_supported" >> Makefile echo "WITH_FRAME_POINTERS=$with_frame_pointers" >> Makefile echo "TARGET=$target" >> Makefile diff --git a/configure_tool b/configure_tool new file mode 100755 index 000000000..499ab5dc2 --- /dev/null +++ b/configure_tool @@ -0,0 +1,162 @@ +#!/bin/sh -eu + +# Very quick and simple "configure" script for the debugger, ocamlbuild and +# ocamldoc. +# Arguments: +# $1: tool to configure for: "debugger", "ocamlbuild" or "ocamldoc" +# Environment variables: +# UNINSTALLED_OCAML_DESTDIR: see below +# UNINSTALLED_OCAML_PREFIX: see below + +TOOL="${1:="none"}" + +# Configuration from the user through environment variables: +# - UNINSTALLED_OCAML_DESTDIR: if the OCaml compiler has been installed +# temporarily, the location it has been installed to. +# - UNINSTALLED_OCAML_PREFIX: the -prefix used for the ocaml compilation; only +# used if UNINSTALLED_OCAML_PREFIX is set. + +: ${UNINSTALLED_OCAML_DESTDIR:=""} +: ${UNINSTALLED_OCAML_PREFIX:=/usr/local} + + +# Helper functions + +# test_ocaml_tool: test that the command named "$1" and provided as "$2" runs; +# this is a simple test which runs "$1 -version 2>/dev/null >/dev/null". +test_ocaml_tool() { + local NAME="${1}" # This is only used to give a better error message + local COMMAND="${2}" + + if ${COMMAND} -version 2>/dev/null >/dev/null; then + echo "${COMMAND}" + else + echo "Couldn't find a way to invoke '${NAME}'." 1>&2 + fi +} + +# bytecode_or_native: turn the command name provided through "$1" into a +# command to invoke it, either by prepending ${OCAMLRUN} or by appending .opt +# (basically). +bytecode_or_native() { + local EXECUTABLE="${1}" + + if [ -z "${OPT}" ]; then + test_ocaml_tool "${EXECUTABLE}" "${OCAMLRUN}${U_BINDIR}${EXECUTABLE}" + else + test_ocaml_tool "${EXECUTABLE}" "${U_BINDIR}${EXECUTABLE}.opt" + fi +} + +# Test the given code in the toplevel; useful to check that a given +# functionality is available. +test_in_toplevel() { + CODE="${1}" + MODULES="${2}" + ( + export CAML_LD_LIBRARY_PATH=${CAML_LD_LIBRARY_PATH} + printf "${CODE}" | ${OCAML} ${MODULES} >/dev/null + ) +} + + +# Body + +if [ -n "${UNINSTALLED_OCAML_DESTDIR}" ]; then + U_BINDIR="${UNINSTALLED_OCAML_DESTDIR}/${UNINSTALLED_OCAML_PREFIX}/bin/" +else + U_BINDIR="" +fi + +# Determine whether we can use .opt binaries for the compilation; the test is +# fairly simple but should cover > 95% of uses and since it's only a speed +# improvement it doesn't have to be perfect. +# NOTE: if your .opt binaries don't work for one reason or another, simply run +# "chmod -x" on (one of) them. +if [ -x "${U_BINDIR}ocamlc.opt" ] && [ -x "${U_BINDIR}ocamlopt.opt" ]; then + echo "Will use .opt binaries." + OPT=".opt" +else + echo "Will not use .opt binaries." + OPT="" +fi + +: ${OCAMLRUN:="${U_BINDIR}ocamlrun "} +: ${OCAML:="${OCAMLRUN}${U_BINDIR}ocaml"} +: ${OCAMLC:="$(bytecode_or_native ocamlc)"} +: ${OCAMLOPT:="$(bytecode_or_native ocamlopt)"} +: ${OCAMLLEX:="$(bytecode_or_native ocamllex)"} +: ${OCAMLDEP:="$(bytecode_or_native ocamldep)"} +: ${OCAMLYACC:="${U_BINDIR}ocamlyacc"} +: ${OCAMLDOC_RUN:="${OCAMLRUN}./ocamldoc"} + +if [ -z "${OCAMLC}" ] || [ -z "${OCAMLLEX}" ] || [ -z "${OCAMLDEP}" ]; then + printf '\nERROR: some required tools were not found.\n\n' 1>&2 + exit 1 +fi + +# If the compiler is in an uninstalled state, we need to invoke it with +# "-nostdlib -I $DESTDIR/$LIBDIR" so determine that. It will also be useful for +# the Makefile "include" directive. +LIBDIR="$(${OCAMLC} -config | awk -F' ' '/^standard_library_default: / { print $2; }')" +if [ -z "${UNINSTALLED_OCAML_DESTDIR}" ]; then + CLFLAGS="-I +compiler-libs" + OCAML_MAKEFILE_CONFIG="${LIBDIR}/Makefile.config" + CAML_LD_LIBRARY_PATH="" +else + CLFLAGS="-nostdlib -I ${UNINSTALLED_OCAML_DESTDIR}/${LIBDIR} -I ${UNINSTALLED_OCAML_DESTDIR}/${LIBDIR}/compiler-libs" + OCAML_MAKEFILE_CONFIG="${UNINSTALLED_OCAML_DESTDIR}/${LIBDIR}/Makefile.config" + CAML_LD_LIBRARY_PATH="${UNINSTALLED_OCAML_DESTDIR}/${LIBDIR}/stublibs" +fi + +# Now that we have the compiler and linker search flags, append them. +OCAML="${OCAML} ${CLFLAGS}" +OCAMLC="${OCAMLC} ${CLFLAGS}" +OCAMLOPT="${OCAMLOPT} ${CLFLAGS}" + +# Log to the user +echo "ocamlrun: ${OCAMLRUN}" +echo "ocaml: ${OCAML}" +echo "ocamlc: ${OCAMLC}" +echo "ocamlopt: ${OCAMLOPT}" +echo "ocamllex: ${OCAMLLEX}" +echo "ocamldep: ${OCAMLDEP}" +echo "ocamlyacc: ${OCAMLYACC}" +echo "ocamldoc_run: ${OCAMLDOC_RUN}" +echo "uninstalled libdir: ${LIBDIR}" + +# Check the tool-specific dependencies +case "${TOOL}" in + 'debugger') + echo 'Checking for sockets...' + test_in_toplevel \ + 'open Unix;;\nlet sock = socket PF_INET SOCK_STREAM 0;;' \ + 'unix.cma' + ;; + 'ocamldoc') + ;; + 'ocamlbuild') + ;; + *) + printf '\nERROR: you need to select a tool: "debugger", "ocamlbuild" or "ocamldoc".\n\n' + exit 1 + ;; +esac + +# Write the configuration summary to Makefile.local_config +cat > "${TOOL}/Makefile.local" << EOF +OCAML_MAKEFILE_CONFIG=${OCAML_MAKEFILE_CONFIG} +include \$(OCAML_MAKEFILE_CONFIG) +OCAML=${OCAML} +OCAMLC=${OCAMLC} +OCAMLOPT=${OCAMLOPT} +OCAMLLEX=${OCAMLLEX} +OCAMLDEP=${OCAMLDEP} +OCAMLYACC=${OCAMLYACC} +OCAMLDOC_RUN=${OCAMLDOC_RUN} +export CAML_LD_LIBRARY_PATH=${CAML_LD_LIBRARY_PATH} +UNINSTALLED_LIBDIR="${LIBDIR}" +EOF + +echo "Successfully configured for '${TOOL}'." + diff --git a/debugger/.depend b/debugger/.depend index c9a56ac14..137d9a35f 100644 --- a/debugger/.depend +++ b/debugger/.depend @@ -1,215 +1,137 @@ -breakpoints.cmi : primitives.cmi ../bytecomp/instruct.cmi +breakpoints.cmi : primitives.cmi checkpoints.cmi : primitives.cmi debugcom.cmi command_line.cmi : debugcom.cmi : primitives.cmi debugger_config.cmi : -dynlink.cmi : -eval.cmi : ../typing/types.cmi ../typing/path.cmi parser_aux.cmi \ - ../parsing/longident.cmi ../bytecomp/instruct.cmi ../typing/ident.cmi \ - ../typing/env.cmi debugcom.cmi -events.cmi : ../bytecomp/instruct.cmi +eval.cmi : parser_aux.cmi debugcom.cmi +events.cmi : exec.cmi : -frames.cmi : primitives.cmi ../bytecomp/instruct.cmi +frames.cmi : primitives.cmi history.cmi : input_handling.cmi : primitives.cmi int64ops.cmi : lexer.cmi : parser.cmi -loadprinter.cmi : ../parsing/longident.cmi dynlink.cmi +loadprinter.cmi : parameters.cmi : -parser_aux.cmi : primitives.cmi ../parsing/longident.cmi -parser.cmi : parser_aux.cmi ../parsing/longident.cmi -pattern_matching.cmi : ../typing/typedtree.cmi parser_aux.cmi debugcom.cmi -pos.cmi : ../bytecomp/instruct.cmi -primitives.cmi : $(UNIXDIR)/unix.cmi -printval.cmi : ../typing/types.cmi ../typing/path.cmi parser_aux.cmi \ - ../typing/env.cmi debugcom.cmi +parser.cmi : parser_aux.cmi +parser_aux.cmi : primitives.cmi +pattern_matching.cmi : parser_aux.cmi debugcom.cmi +pos.cmi : +primitives.cmi : +printval.cmi : parser_aux.cmi debugcom.cmi program_loading.cmi : primitives.cmi program_management.cmi : question.cmi : -show_information.cmi : ../bytecomp/instruct.cmi -show_source.cmi : ../bytecomp/instruct.cmi +show_information.cmi : +show_source.cmi : source.cmi : -symbols.cmi : ../bytecomp/instruct.cmi +symbols.cmi : time_travel.cmi : primitives.cmi trap_barrier.cmi : -unix_tools.cmi : $(UNIXDIR)/unix.cmi -breakpoints.cmo : symbols.cmi primitives.cmi pos.cmi \ - ../bytecomp/instruct.cmi exec.cmi debugcom.cmi checkpoints.cmi \ - breakpoints.cmi -breakpoints.cmx : symbols.cmx primitives.cmx pos.cmx \ - ../bytecomp/instruct.cmx exec.cmx debugcom.cmx checkpoints.cmx \ - breakpoints.cmi +unix_tools.cmi : +breakpoints.cmo : symbols.cmi primitives.cmi pos.cmi exec.cmi debugcom.cmi \ + checkpoints.cmi breakpoints.cmi +breakpoints.cmx : symbols.cmx primitives.cmx pos.cmx exec.cmx debugcom.cmx \ + checkpoints.cmx breakpoints.cmi checkpoints.cmo : primitives.cmi int64ops.cmi debugcom.cmi checkpoints.cmi checkpoints.cmx : primitives.cmx int64ops.cmx debugcom.cmx checkpoints.cmi -command_line.cmo : unix_tools.cmi $(UNIXDIR)/unix.cmi \ - ../typing/types.cmi time_travel.cmi symbols.cmi source.cmi \ +command_line.cmo : unix_tools.cmi time_travel.cmi symbols.cmi source.cmi \ show_source.cmi show_information.cmi question.cmi program_management.cmi \ program_loading.cmi printval.cmi primitives.cmi pos.cmi parser_aux.cmi \ - parser.cmi parameters.cmi ../utils/misc.cmi ../parsing/longident.cmi \ - ../parsing/location.cmi loadprinter.cmi lexer.cmi int64ops.cmi \ - ../bytecomp/instruct.cmi input_handling.cmi history.cmi frames.cmi \ - events.cmi eval.cmi ../typing/envaux.cmi ../typing/env.cmi \ - debugger_config.cmi debugcom.cmi ../typing/ctype.cmi ../utils/config.cmi \ - checkpoints.cmi breakpoints.cmi command_line.cmi -command_line.cmx : unix_tools.cmx $(UNIXDIR)/unix.cmx \ - ../typing/types.cmx time_travel.cmx symbols.cmx source.cmx \ + parser.cmi parameters.cmi loadprinter.cmi lexer.cmi int64ops.cmi \ + input_handling.cmi history.cmi frames.cmi events.cmi eval.cmi \ + debugger_config.cmi debugcom.cmi checkpoints.cmi breakpoints.cmi \ + command_line.cmi +command_line.cmx : unix_tools.cmx time_travel.cmx symbols.cmx source.cmx \ show_source.cmx show_information.cmx question.cmx program_management.cmx \ program_loading.cmx printval.cmx primitives.cmx pos.cmx parser_aux.cmi \ - parser.cmx parameters.cmx ../utils/misc.cmx ../parsing/longident.cmx \ - ../parsing/location.cmx loadprinter.cmx lexer.cmx int64ops.cmx \ - ../bytecomp/instruct.cmx input_handling.cmx history.cmx frames.cmx \ - events.cmx eval.cmx ../typing/envaux.cmx ../typing/env.cmx \ - debugger_config.cmx debugcom.cmx ../typing/ctype.cmx ../utils/config.cmx \ - checkpoints.cmx breakpoints.cmx command_line.cmi -debugcom.cmo : primitives.cmi ../utils/misc.cmi int64ops.cmi \ - input_handling.cmi debugcom.cmi -debugcom.cmx : primitives.cmx ../utils/misc.cmx int64ops.cmx \ - input_handling.cmx debugcom.cmi + parser.cmx parameters.cmx loadprinter.cmx lexer.cmx int64ops.cmx \ + input_handling.cmx history.cmx frames.cmx events.cmx eval.cmx \ + debugger_config.cmx debugcom.cmx checkpoints.cmx breakpoints.cmx \ + command_line.cmi +debugcom.cmo : primitives.cmi int64ops.cmi input_handling.cmi debugcom.cmi +debugcom.cmx : primitives.cmx int64ops.cmx input_handling.cmx debugcom.cmi debugger_config.cmo : int64ops.cmi debugger_config.cmi debugger_config.cmx : int64ops.cmx debugger_config.cmi -dynlink.cmo : ../bytecomp/symtable.cmi ../bytecomp/opcodes.cmo \ - ../utils/misc.cmi ../bytecomp/meta.cmi ../bytecomp/dll.cmi \ - ../utils/consistbl.cmi ../utils/config.cmi ../bytecomp/cmo_format.cmi \ - ../typing/cmi_format.cmi dynlink.cmi -dynlink.cmx : ../bytecomp/symtable.cmx ../bytecomp/opcodes.cmx \ - ../utils/misc.cmx ../bytecomp/meta.cmx ../bytecomp/dll.cmx \ - ../utils/consistbl.cmx ../utils/config.cmx ../bytecomp/cmo_format.cmi \ - ../typing/cmi_format.cmx dynlink.cmi -eval.cmo : ../typing/types.cmi ../bytecomp/symtable.cmi ../typing/subst.cmi \ - printval.cmi ../typing/printtyp.cmi ../typing/predef.cmi \ - ../typing/path.cmi parser_aux.cmi ../utils/misc.cmi \ - ../parsing/longident.cmi ../bytecomp/instruct.cmi ../typing/ident.cmi \ - frames.cmi ../typing/env.cmi debugcom.cmi ../typing/ctype.cmi \ - ../typing/btype.cmi eval.cmi -eval.cmx : ../typing/types.cmx ../bytecomp/symtable.cmx ../typing/subst.cmx \ - printval.cmx ../typing/printtyp.cmx ../typing/predef.cmx \ - ../typing/path.cmx parser_aux.cmi ../utils/misc.cmx \ - ../parsing/longident.cmx ../bytecomp/instruct.cmx ../typing/ident.cmx \ - frames.cmx ../typing/env.cmx debugcom.cmx ../typing/ctype.cmx \ - ../typing/btype.cmx eval.cmi -events.cmo : ../parsing/location.cmi ../bytecomp/instruct.cmi events.cmi -events.cmx : ../parsing/location.cmx ../bytecomp/instruct.cmx events.cmi +eval.cmo : printval.cmi parser_aux.cmi frames.cmi debugcom.cmi eval.cmi +eval.cmx : printval.cmx parser_aux.cmi frames.cmx debugcom.cmx eval.cmi +events.cmo : events.cmi +events.cmx : events.cmi exec.cmo : exec.cmi exec.cmx : exec.cmi -frames.cmo : symbols.cmi ../utils/misc.cmi ../bytecomp/instruct.cmi \ - events.cmi debugcom.cmi frames.cmi -frames.cmx : symbols.cmx ../utils/misc.cmx ../bytecomp/instruct.cmx \ - events.cmx debugcom.cmx frames.cmi +frames.cmo : symbols.cmi events.cmi debugcom.cmi frames.cmi +frames.cmx : symbols.cmx events.cmx debugcom.cmx frames.cmi history.cmo : primitives.cmi int64ops.cmi debugger_config.cmi \ checkpoints.cmi history.cmi history.cmx : primitives.cmx int64ops.cmx debugger_config.cmx \ checkpoints.cmx history.cmi -input_handling.cmo : $(UNIXDIR)/unix.cmi primitives.cmi \ - input_handling.cmi -input_handling.cmx : $(UNIXDIR)/unix.cmx primitives.cmx \ - input_handling.cmi +input_handling.cmo : primitives.cmi input_handling.cmi +input_handling.cmx : primitives.cmx input_handling.cmi int64ops.cmo : int64ops.cmi int64ops.cmx : int64ops.cmi lexer.cmo : parser.cmi lexer.cmi lexer.cmx : parser.cmx lexer.cmi -loadprinter.cmo : ../typing/types.cmi ../bytecomp/symtable.cmi printval.cmi \ - ../typing/printtyp.cmi ../typing/path.cmi ../utils/misc.cmi \ - ../parsing/longident.cmi ../typing/ident.cmi ../typing/env.cmi \ - dynlink.cmi ../typing/ctype.cmi ../utils/config.cmi loadprinter.cmi -loadprinter.cmx : ../typing/types.cmx ../bytecomp/symtable.cmx printval.cmx \ - ../typing/printtyp.cmx ../typing/path.cmx ../utils/misc.cmx \ - ../parsing/longident.cmx ../typing/ident.cmx ../typing/env.cmx \ - dynlink.cmx ../typing/ctype.cmx ../utils/config.cmx loadprinter.cmi -main.cmo : unix_tools.cmi $(UNIXDIR)/unix.cmi time_travel.cmi \ - show_information.cmi question.cmi program_management.cmi primitives.cmi \ - parameters.cmi ../utils/misc.cmi input_handling.cmi frames.cmi exec.cmi \ - ../typing/env.cmi debugger_config.cmi ../utils/config.cmi \ - command_line.cmi ../typing/cmi_format.cmi ../utils/clflags.cmi \ - checkpoints.cmi -main.cmx : unix_tools.cmx $(UNIXDIR)/unix.cmx time_travel.cmx \ - show_information.cmx question.cmx program_management.cmx primitives.cmx \ - parameters.cmx ../utils/misc.cmx input_handling.cmx frames.cmx exec.cmx \ - ../typing/env.cmx debugger_config.cmx ../utils/config.cmx \ - command_line.cmx ../typing/cmi_format.cmx ../utils/clflags.cmx \ - checkpoints.cmx -parameters.cmo : primitives.cmi ../typing/envaux.cmi debugger_config.cmi \ - ../utils/config.cmi parameters.cmi -parameters.cmx : primitives.cmx ../typing/envaux.cmx debugger_config.cmx \ - ../utils/config.cmx parameters.cmi -parser.cmo : parser_aux.cmi ../parsing/longident.cmi int64ops.cmi \ - input_handling.cmi parser.cmi -parser.cmx : parser_aux.cmi ../parsing/longident.cmx int64ops.cmx \ - input_handling.cmx parser.cmi -pattern_matching.cmo : ../typing/typedtree.cmi parser_aux.cmi \ - ../utils/misc.cmi debugger_config.cmi debugcom.cmi ../typing/ctype.cmi \ +loadprinter.cmo : printval.cmi loadprinter.cmi +loadprinter.cmx : printval.cmx loadprinter.cmi +main.cmo : unix_tools.cmi time_travel.cmi show_information.cmi question.cmi \ + program_management.cmi primitives.cmi parameters.cmi input_handling.cmi \ + frames.cmi exec.cmi debugger_config.cmi command_line.cmi checkpoints.cmi +main.cmx : unix_tools.cmx time_travel.cmx show_information.cmx question.cmx \ + program_management.cmx primitives.cmx parameters.cmx input_handling.cmx \ + frames.cmx exec.cmx debugger_config.cmx command_line.cmx checkpoints.cmx +parameters.cmo : primitives.cmi debugger_config.cmi parameters.cmi +parameters.cmx : primitives.cmx debugger_config.cmx parameters.cmi +parser.cmo : parser_aux.cmi int64ops.cmi input_handling.cmi parser.cmi +parser.cmx : parser_aux.cmi int64ops.cmx input_handling.cmx parser.cmi +pattern_matching.cmo : parser_aux.cmi debugger_config.cmi debugcom.cmi \ pattern_matching.cmi -pattern_matching.cmx : ../typing/typedtree.cmx parser_aux.cmi \ - ../utils/misc.cmx debugger_config.cmx debugcom.cmx ../typing/ctype.cmx \ +pattern_matching.cmx : parser_aux.cmi debugger_config.cmx debugcom.cmx \ pattern_matching.cmi -pos.cmo : source.cmi primitives.cmi ../parsing/location.cmi \ - ../bytecomp/instruct.cmi pos.cmi -pos.cmx : source.cmx primitives.cmx ../parsing/location.cmx \ - ../bytecomp/instruct.cmx pos.cmi -primitives.cmo : $(UNIXDIR)/unix.cmi primitives.cmi -primitives.cmx : $(UNIXDIR)/unix.cmx primitives.cmi -printval.cmo : ../typing/types.cmi ../bytecomp/symtable.cmi \ - ../typing/printtyp.cmi ../typing/path.cmi parser_aux.cmi \ - ../typing/outcometree.cmi ../typing/oprint.cmi \ - ../toplevel/genprintval.cmi debugcom.cmi printval.cmi -printval.cmx : ../typing/types.cmx ../bytecomp/symtable.cmx \ - ../typing/printtyp.cmx ../typing/path.cmx parser_aux.cmi \ - ../typing/outcometree.cmi ../typing/oprint.cmx \ - ../toplevel/genprintval.cmx debugcom.cmx printval.cmi -program_loading.cmo : unix_tools.cmi $(UNIXDIR)/unix.cmi \ - primitives.cmi parameters.cmi input_handling.cmi debugger_config.cmi \ - program_loading.cmi -program_loading.cmx : unix_tools.cmx $(UNIXDIR)/unix.cmx \ - primitives.cmx parameters.cmx input_handling.cmx debugger_config.cmx \ - program_loading.cmi -program_management.cmo : unix_tools.cmi $(UNIXDIR)/unix.cmi \ - time_travel.cmi symbols.cmi question.cmi program_loading.cmi \ - primitives.cmi parameters.cmi int64ops.cmi input_handling.cmi history.cmi \ - ../typing/envaux.cmi debugger_config.cmi ../utils/config.cmi \ +pos.cmo : source.cmi primitives.cmi pos.cmi +pos.cmx : source.cmx primitives.cmx pos.cmi +primitives.cmo : primitives.cmi +primitives.cmx : primitives.cmi +printval.cmo : parser_aux.cmi debugcom.cmi printval.cmi +printval.cmx : parser_aux.cmi debugcom.cmx printval.cmi +program_loading.cmo : unix_tools.cmi primitives.cmi parameters.cmi \ + input_handling.cmi debugger_config.cmi program_loading.cmi +program_loading.cmx : unix_tools.cmx primitives.cmx parameters.cmx \ + input_handling.cmx debugger_config.cmx program_loading.cmi +program_management.cmo : unix_tools.cmi time_travel.cmi symbols.cmi \ + question.cmi program_loading.cmi primitives.cmi parameters.cmi \ + int64ops.cmi input_handling.cmi history.cmi debugger_config.cmi \ breakpoints.cmi program_management.cmi -program_management.cmx : unix_tools.cmx $(UNIXDIR)/unix.cmx \ - time_travel.cmx symbols.cmx question.cmx program_loading.cmx \ - primitives.cmx parameters.cmx int64ops.cmx input_handling.cmx history.cmx \ - ../typing/envaux.cmx debugger_config.cmx ../utils/config.cmx \ +program_management.cmx : unix_tools.cmx time_travel.cmx symbols.cmx \ + question.cmx program_loading.cmx primitives.cmx parameters.cmx \ + int64ops.cmx input_handling.cmx history.cmx debugger_config.cmx \ breakpoints.cmx program_management.cmi question.cmo : primitives.cmi lexer.cmi input_handling.cmi question.cmi question.cmx : primitives.cmx lexer.cmx input_handling.cmx question.cmi show_information.cmo : symbols.cmi source.cmi show_source.cmi printval.cmi \ - parameters.cmi ../utils/misc.cmi ../bytecomp/instruct.cmi frames.cmi \ - events.cmi debugcom.cmi checkpoints.cmi breakpoints.cmi \ - show_information.cmi + parameters.cmi frames.cmi events.cmi debugcom.cmi checkpoints.cmi \ + breakpoints.cmi show_information.cmi show_information.cmx : symbols.cmx source.cmx show_source.cmx printval.cmx \ - parameters.cmx ../utils/misc.cmx ../bytecomp/instruct.cmx frames.cmx \ - events.cmx debugcom.cmx checkpoints.cmx breakpoints.cmx \ - show_information.cmi -show_source.cmo : source.cmi primitives.cmi parameters.cmi \ - ../parsing/location.cmi ../bytecomp/instruct.cmi events.cmi \ + parameters.cmx frames.cmx events.cmx debugcom.cmx checkpoints.cmx \ + breakpoints.cmx show_information.cmi +show_source.cmo : source.cmi primitives.cmi parameters.cmi events.cmi \ debugger_config.cmi show_source.cmi -show_source.cmx : source.cmx primitives.cmx parameters.cmx \ - ../parsing/location.cmx ../bytecomp/instruct.cmx events.cmx \ +show_source.cmx : source.cmx primitives.cmx parameters.cmx events.cmx \ debugger_config.cmx show_source.cmi -source.cmo : primitives.cmi ../utils/misc.cmi debugger_config.cmi \ - ../utils/config.cmi source.cmi -source.cmx : primitives.cmx ../utils/misc.cmx debugger_config.cmx \ - ../utils/config.cmx source.cmi -symbols.cmo : ../bytecomp/symtable.cmi program_loading.cmi \ - ../bytecomp/instruct.cmi events.cmi debugger_config.cmi debugcom.cmi \ - checkpoints.cmi ../bytecomp/bytesections.cmi symbols.cmi -symbols.cmx : ../bytecomp/symtable.cmx program_loading.cmx \ - ../bytecomp/instruct.cmx events.cmx debugger_config.cmx debugcom.cmx \ - checkpoints.cmx ../bytecomp/bytesections.cmx symbols.cmi +source.cmo : primitives.cmi debugger_config.cmi source.cmi +source.cmx : primitives.cmx debugger_config.cmx source.cmi +symbols.cmo : program_loading.cmi events.cmi debugger_config.cmi \ + debugcom.cmi checkpoints.cmi symbols.cmi +symbols.cmx : program_loading.cmx events.cmx debugger_config.cmx \ + debugcom.cmx checkpoints.cmx symbols.cmi time_travel.cmo : trap_barrier.cmi symbols.cmi question.cmi \ - program_loading.cmi primitives.cmi ../utils/misc.cmi int64ops.cmi \ - ../bytecomp/instruct.cmi input_handling.cmi exec.cmi events.cmi \ - debugger_config.cmi debugcom.cmi checkpoints.cmi breakpoints.cmi \ - time_travel.cmi + program_loading.cmi primitives.cmi int64ops.cmi input_handling.cmi \ + exec.cmi events.cmi debugger_config.cmi debugcom.cmi checkpoints.cmi \ + breakpoints.cmi time_travel.cmi time_travel.cmx : trap_barrier.cmx symbols.cmx question.cmx \ - program_loading.cmx primitives.cmx ../utils/misc.cmx int64ops.cmx \ - ../bytecomp/instruct.cmx input_handling.cmx exec.cmx events.cmx \ - debugger_config.cmx debugcom.cmx checkpoints.cmx breakpoints.cmx \ - time_travel.cmi + program_loading.cmx primitives.cmx int64ops.cmx input_handling.cmx \ + exec.cmx events.cmx debugger_config.cmx debugcom.cmx checkpoints.cmx \ + breakpoints.cmx time_travel.cmi trap_barrier.cmo : exec.cmi debugcom.cmi checkpoints.cmi trap_barrier.cmi trap_barrier.cmx : exec.cmx debugcom.cmx checkpoints.cmx trap_barrier.cmi -unix_tools.cmo : $(UNIXDIR)/unix.cmi primitives.cmi ../utils/misc.cmi \ - unix_tools.cmi -unix_tools.cmx : $(UNIXDIR)/unix.cmx primitives.cmx ../utils/misc.cmx \ - unix_tools.cmi +unix_tools.cmo : primitives.cmi unix_tools.cmi +unix_tools.cmx : primitives.cmx unix_tools.cmi diff --git a/debugger/Makefile b/debugger/Makefile index 75f4aa8eb..fc0f59c40 100644 --- a/debugger/Makefile +++ b/debugger/Makefile @@ -10,5 +10,100 @@ # # ######################################################################### -UNIXDIR=../otherlibs/$(UNIXLIB) -include Makefile.shared +include Makefile.local + +ROOTDIR=.. +COMPFLAGS=-warn-error A -safe-string +LINKFLAGS=-linkall +YACCFLAGS= + +INSTALL_BINDIR=$(DESTDIR)$(BINDIR) + +OTHEROBJS=\ + unix.cma \ + misc.cmo config.cmo tbl.cmo \ + clflags.cmo consistbl.cmo warnings.cmo \ + location.cmo longident.cmo \ + ast_helper.cmo ast_mapper.cmo \ + ident.cmo path.cmo types.cmo \ + btype.cmo primitive.cmo typedtree.cmo \ + subst.cmo predef.cmo \ + datarepr.cmo cmi_format.cmo env.cmo \ + oprint.cmo \ + ctype.cmo printtyp.cmo mtype.cmo \ + envaux.cmo \ + runtimedef.cmo bytesections.cmo \ + dll.cmo meta.cmo symtable.cmo \ + opcodes.cmo \ + genprintval.cmo + + +OBJS=\ + int64ops.cmo \ + primitives.cmo \ + unix_tools.cmo \ + debugger_config.cmo \ + parameters.cmo \ + lexer.cmo \ + input_handling.cmo \ + question.cmo \ + debugcom.cmo \ + exec.cmo \ + source.cmo \ + pos.cmo \ + checkpoints.cmo \ + events.cmo \ + program_loading.cmo \ + symbols.cmo \ + breakpoints.cmo \ + trap_barrier.cmo \ + history.cmo \ + printval.cmo \ + show_source.cmo \ + time_travel.cmo \ + program_management.cmo \ + frames.cmo \ + eval.cmo \ + show_information.cmo \ + loadprinter.cmo \ + parser.cmo \ + command_line.cmo \ + main.cmo + +all: ocamldebug$(EXE) + +ocamldebug$(EXE): $(OBJS) + $(OCAMLC) $(LINKFLAGS) -o ocamldebug$(EXE) -linkall $(OTHEROBJS) dynlink.cma $(OBJS) + +install: + cp ocamldebug$(EXE) $(INSTALL_BINDIR)/ocamldebug$(EXE) + +clean:: + rm -f ocamldebug$(EXE) + rm -f *.cmo *.cmi + +.SUFFIXES: +.SUFFIXES: .ml .cmo .mli .cmi + +.ml.cmo: + $(OCAMLC) -c $(COMPFLAGS) $< + +.mli.cmi: + $(OCAMLC) -c $(COMPFLAGS) $< + +depend: beforedepend + $(OCAMLDEP) $(DEPFLAGS) *.mli *.ml > .depend + +lexer.ml: lexer.mll + $(OCAMLLEX) lexer.mll +clean:: + rm -f lexer.ml +beforedepend:: lexer.ml + +parser.ml parser.mli: parser.mly + $(OCAMLYACC) parser.mly +clean:: + rm -f parser.ml parser.mli +beforedepend:: parser.ml parser.mli + +include .depend diff --git a/debugger/Makefile.nt b/debugger/Makefile.nt deleted file mode 100644 index 4182c7c77..000000000 --- a/debugger/Makefile.nt +++ /dev/null @@ -1,14 +0,0 @@ -######################################################################### -# # -# OCaml # -# # -# Xavier Leroy, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999 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. # -# # -######################################################################### - -UNIXDIR=../otherlibs/win32unix -include Makefile.shared diff --git a/debugger/Makefile.shared b/debugger/Makefile.shared deleted file mode 100644 index fed1d26da..000000000 --- a/debugger/Makefile.shared +++ /dev/null @@ -1,129 +0,0 @@ -######################################################################### -# # -# OCaml # -# # -# Xavier Leroy, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999 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 - -ROOTDIR=.. -CAMLC=$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib -COMPFLAGS=-warn-error A -safe-string $(INCLUDES) -LINKFLAGS=-linkall -I $(UNIXDIR) -CAMLYACC=../boot/ocamlyacc -YACCFLAGS= -CAMLLEX=../boot/ocamlrun ../boot/ocamllex -CAMLDEP=../boot/ocamlrun ../tools/ocamldep -DEPFLAGS=$(INCLUDES) - -INSTALL_BINDIR=$(DESTDIR)$(BINDIR) - -INCLUDES=\ - -I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../toplevel \ - -I $(UNIXDIR) - -OTHEROBJS=\ - $(UNIXDIR)/unix.cma \ - ../utils/misc.cmo ../utils/config.cmo ../utils/tbl.cmo \ - ../utils/clflags.cmo ../utils/consistbl.cmo ../utils/warnings.cmo \ - ../parsing/location.cmo ../parsing/longident.cmo \ - ../parsing/ast_helper.cmo ../parsing/ast_mapper.cmo \ - ../typing/ident.cmo ../typing/path.cmo ../typing/types.cmo \ - ../typing/btype.cmo ../typing/primitive.cmo ../typing/typedtree.cmo \ - ../typing/subst.cmo ../typing/predef.cmo \ - ../typing/datarepr.cmo ../typing/cmi_format.cmo ../typing/env.cmo \ - ../typing/oprint.cmo \ - ../typing/ctype.cmo ../typing/printtyp.cmo ../typing/mtype.cmo \ - ../typing/envaux.cmo \ - ../bytecomp/runtimedef.cmo ../bytecomp/bytesections.cmo \ - ../bytecomp/dll.cmo ../bytecomp/meta.cmo ../bytecomp/symtable.cmo \ - ../bytecomp/opcodes.cmo \ - ../toplevel/genprintval.cmo - - -OBJS=\ - dynlink.cmo \ - int64ops.cmo \ - primitives.cmo \ - unix_tools.cmo \ - debugger_config.cmo \ - parameters.cmo \ - lexer.cmo \ - input_handling.cmo \ - question.cmo \ - debugcom.cmo \ - exec.cmo \ - source.cmo \ - pos.cmo \ - checkpoints.cmo \ - events.cmo \ - program_loading.cmo \ - symbols.cmo \ - breakpoints.cmo \ - trap_barrier.cmo \ - history.cmo \ - printval.cmo \ - show_source.cmo \ - time_travel.cmo \ - program_management.cmo \ - frames.cmo \ - eval.cmo \ - show_information.cmo \ - loadprinter.cmo \ - parser.cmo \ - command_line.cmo \ - main.cmo - -all: ocamldebug$(EXE) - -ocamldebug$(EXE): $(OBJS) $(OTHEROBJS) - $(CAMLC) $(LINKFLAGS) -o ocamldebug$(EXE) -linkall $(OTHEROBJS) $(OBJS) - -install: - cp ocamldebug$(EXE) $(INSTALL_BINDIR)/ocamldebug$(EXE) - -clean:: - rm -f ocamldebug$(EXE) - rm -f *.cmo *.cmi - -.SUFFIXES: -.SUFFIXES: .ml .cmo .mli .cmi - -.ml.cmo: - $(CAMLC) -c $(COMPFLAGS) $< - -.mli.cmi: - $(CAMLC) -c $(COMPFLAGS) $< - -depend: beforedepend - $(CAMLDEP) $(DEPFLAGS) *.mli *.ml \ - | sed -e 's,$(UNIXDIR)/,$$(UNIXDIR)/,' > .depend - -lexer.ml: lexer.mll - $(CAMLLEX) lexer.mll -clean:: - rm -f lexer.ml -beforedepend:: lexer.ml - -parser.ml parser.mli: parser.mly - $(CAMLYACC) parser.mly -clean:: - rm -f parser.ml parser.mli -beforedepend:: parser.ml parser.mli - -dynlink.ml: ../otherlibs/dynlink/dynlink.ml - grep -v 'REMOVE_ME for ../../debugger/dynlink.ml' \ - ../otherlibs/dynlink/dynlink.ml >dynlink.ml -dynlink.mli: ../otherlibs/dynlink/dynlink.mli - cp ../otherlibs/dynlink/dynlink.mli . -clean:: - rm -f dynlink.ml dynlink.mli -beforedepend:: dynlink.ml dynlink.mli - -include .depend diff --git a/ocamlbuild/.depend b/ocamlbuild/.depend index d6dda722e..3b67d873d 100644 --- a/ocamlbuild/.depend +++ b/ocamlbuild/.depend @@ -8,9 +8,9 @@ exit_codes.cmi : fda.cmi : slurp.cmi findlib.cmi : signatures.cmi command.cmi flags.cmi : tags.cmi command.cmi +glob.cmi : signatures.cmi glob_ast.cmi bool.cmi glob_ast.cmi : bool.cmi glob_lexer.cmi : glob_ast.cmi -glob.cmi : signatures.cmi glob_ast.cmi bool.cmi hooks.cmi : hygiene.cmi : slurp.cmi lexers.cmi : loc.cmi glob.cmi @@ -20,17 +20,17 @@ main.cmi : my_std.cmi : signatures.cmi my_unix.cmi : ocaml_arch.cmi : signatures.cmi command.cmi -ocamlbuild_executor.cmi : -ocamlbuildlight.cmi : -ocamlbuild.cmi : -ocamlbuild_plugin.cmi : -ocamlbuild_unix_plugin.cmi : -ocamlbuild_where.cmi : ocaml_compiler.cmi : tags.cmi rule.cmi pathname.cmi command.cmi ocaml_dependencies.cmi : pathname.cmi ocaml_specific.cmi : ocaml_tools.cmi : tags.cmi rule.cmi pathname.cmi command.cmi ocaml_utils.cmi : tags.cmi pathname.cmi command.cmi +ocamlbuild.cmi : +ocamlbuild_executor.cmi : +ocamlbuild_plugin.cmi : +ocamlbuild_unix_plugin.cmi : +ocamlbuild_where.cmi : +ocamlbuildlight.cmi : options.cmi : slurp.cmi signatures.cmi command.cmi param_tags.cmi : tags.cmi loc.cmi pathname.cmi : signatures.cmi @@ -75,12 +75,12 @@ findlib.cmx : my_unix.cmx my_std.cmx lexers.cmx const.cmx command.cmx \ findlib.cmi flags.cmo : tags.cmi param_tags.cmi log.cmi command.cmi bool.cmi flags.cmi flags.cmx : tags.cmx param_tags.cmx log.cmx command.cmx bool.cmx flags.cmi +glob.cmo : my_std.cmi glob_lexer.cmi glob_ast.cmi bool.cmi glob.cmi +glob.cmx : my_std.cmx glob_lexer.cmx glob_ast.cmx bool.cmx glob.cmi glob_ast.cmo : bool.cmi glob_ast.cmi glob_ast.cmx : bool.cmx glob_ast.cmi glob_lexer.cmo : glob_ast.cmi bool.cmi glob_lexer.cmi glob_lexer.cmx : glob_ast.cmx bool.cmx glob_lexer.cmi -glob.cmo : my_std.cmi glob_lexer.cmi glob_ast.cmi bool.cmi glob.cmi -glob.cmx : my_std.cmx glob_lexer.cmx glob_ast.cmx bool.cmx glob.cmi hooks.cmo : hooks.cmi hooks.cmx : hooks.cmi hygiene.cmo : slurp.cmi shell.cmi pathname.cmi options.cmi my_std.cmi \ @@ -111,22 +111,6 @@ my_unix.cmo : my_std.cmi my_unix.cmi my_unix.cmx : my_std.cmx my_unix.cmi ocaml_arch.cmo : pathname.cmi my_std.cmi command.cmi ocaml_arch.cmi ocaml_arch.cmx : pathname.cmx my_std.cmx command.cmx ocaml_arch.cmi -ocamlbuild_config.cmo : -ocamlbuild_config.cmx : -ocamlbuild_executor.cmo : ocamlbuild_executor.cmi -ocamlbuild_executor.cmx : ocamlbuild_executor.cmi -ocamlbuildlight.cmo : ocamlbuildlight.cmi -ocamlbuildlight.cmx : ocamlbuildlight.cmi -ocamlbuild.cmo : ocamlbuild_unix_plugin.cmi ocamlbuild.cmi -ocamlbuild.cmx : ocamlbuild_unix_plugin.cmx ocamlbuild.cmi -ocamlbuild_plugin.cmo : ocamlbuild_plugin.cmi -ocamlbuild_plugin.cmx : ocamlbuild_plugin.cmi -ocamlbuild_unix_plugin.cmo : ocamlbuild_executor.cmi my_unix.cmi my_std.cmi \ - exit_codes.cmi ocamlbuild_unix_plugin.cmi -ocamlbuild_unix_plugin.cmx : ocamlbuild_executor.cmx my_unix.cmx my_std.cmx \ - exit_codes.cmx ocamlbuild_unix_plugin.cmi -ocamlbuild_where.cmo : ocamlbuild_config.cmo ocamlbuild_where.cmi -ocamlbuild_where.cmx : ocamlbuild_config.cmx ocamlbuild_where.cmi ocaml_compiler.cmo : tools.cmi tags.cmi rule.cmi resource.cmi pathname.cmi \ options.cmi ocaml_utils.cmi ocaml_dependencies.cmi ocaml_arch.cmi \ my_std.cmi log.cmi command.cmi ocaml_compiler.cmi @@ -157,6 +141,22 @@ ocaml_utils.cmo : tools.cmi tags.cmi pathname.cmi param_tags.cmi options.cmi \ ocaml_utils.cmx : tools.cmx tags.cmx pathname.cmx param_tags.cmx options.cmx \ my_std.cmx log.cmx lexers.cmx flags.cmx const.cmx command.cmx \ ocaml_utils.cmi +ocamlbuild.cmo : ocamlbuild_unix_plugin.cmi ocamlbuild.cmi +ocamlbuild.cmx : ocamlbuild_unix_plugin.cmx ocamlbuild.cmi +ocamlbuild_config.cmo : +ocamlbuild_config.cmx : +ocamlbuild_executor.cmo : ocamlbuild_executor.cmi +ocamlbuild_executor.cmx : ocamlbuild_executor.cmi +ocamlbuild_plugin.cmo : ocamlbuild_plugin.cmi +ocamlbuild_plugin.cmx : ocamlbuild_plugin.cmi +ocamlbuild_unix_plugin.cmo : ocamlbuild_executor.cmi my_unix.cmi my_std.cmi \ + exit_codes.cmi ocamlbuild_unix_plugin.cmi +ocamlbuild_unix_plugin.cmx : ocamlbuild_executor.cmx my_unix.cmx my_std.cmx \ + exit_codes.cmx ocamlbuild_unix_plugin.cmi +ocamlbuild_where.cmo : ocamlbuild_config.cmo ocamlbuild_where.cmi +ocamlbuild_where.cmx : ocamlbuild_config.cmx ocamlbuild_where.cmi +ocamlbuildlight.cmo : ocamlbuildlight.cmi +ocamlbuildlight.cmx : ocamlbuildlight.cmi options.cmo : shell.cmi ocamlbuild_where.cmi ocamlbuild_config.cmo \ my_std.cmi log.cmi lexers.cmi const.cmo command.cmi options.cmi options.cmx : shell.cmx ocamlbuild_where.cmx ocamlbuild_config.cmx \ diff --git a/ocamlbuild/Makefile b/ocamlbuild/Makefile index b40d0eada..7ca7d52cb 100644 --- a/ocamlbuild/Makefile +++ b/ocamlbuild/Makefile @@ -10,17 +10,10 @@ # # ######################################################################### -include ../config/Makefile - -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 +include Makefile.local + CP = cp -COMPFLAGS= -warn-error A -w L -w R -w Z -I ../otherlibs/$(UNIXLIB) -safe-string -LINKFLAGS= -I ../otherlibs/$(UNIXLIB) +COMPFLAGS= -warn-error A -w L -w R -w Z -safe-string PACK_CMO=\ const.cmo \ @@ -98,15 +91,15 @@ allopt: ocamlbuild.native ocamlbuildlib.cmxa # The executables ocamlbuild.byte: ocamlbuild_pack.cmo $(EXTRA_CMO) ocamlbuild.cmo - $(OCAMLC) $(LINKFLAGS) -o ocamlbuild.byte \ + $(OCAMLC) -o ocamlbuild.byte \ unix.cma ocamlbuild_pack.cmo $(EXTRA_CMO) ocamlbuild.cmo ocamlbuildlight.byte: ocamlbuild_pack.cmo ocamlbuildlight.cmo - $(OCAMLC) $(LINKFLAGS) -o ocamlbuildlight.byte \ + $(OCAMLC) -o ocamlbuildlight.byte \ ocamlbuild_pack.cmo ocamlbuildlight.cmo ocamlbuild.native: ocamlbuild_pack.cmx $(EXTRA_CMX) ocamlbuild.cmx - $(OCAMLOPT) $(LINKFLAGS) -o ocamlbuild.native \ + $(OCAMLOPT) -o ocamlbuild.native \ unix.cmxa ocamlbuild_pack.cmx $(EXTRA_CMX) ocamlbuild.cmx # The libraries @@ -133,7 +126,7 @@ ocamlbuild_pack.cmx: $(PACK_CMX) # The config file -ocamlbuild_config.ml: ../config/Makefile +ocamlbuild_config.ml: (echo 'let bindir = "$(BINDIR)"'; \ echo 'let libdir = "$(LIBDIR)"'; \ echo 'let supports_shared_libraries = $(SUPPORTS_SHARED_LIBRARIES)';\ diff --git a/ocamldoc/.depend b/ocamldoc/.depend index ec461d73d..5a2df26c5 100644 --- a/ocamldoc/.depend +++ b/ocamldoc/.depend @@ -1,3 +1,11 @@ +odoc.cmo : ../typing/typedtree.cmi odoc_messages.cmo odoc_info.cmi \ + odoc_global.cmi odoc_gen.cmi odoc_config.cmi odoc_args.cmi \ + odoc_analyse.cmi ../utils/misc.cmi ../utils/config.cmi \ + ../utils/clflags.cmi +odoc.cmx : ../typing/typedtree.cmx odoc_messages.cmx odoc_info.cmx \ + odoc_global.cmx odoc_gen.cmx odoc_config.cmx odoc_args.cmx \ + odoc_analyse.cmx ../utils/misc.cmx ../utils/config.cmx \ + ../utils/clflags.cmx odoc_analyse.cmo : ../utils/warnings.cmi ../typing/types.cmi \ ../typing/typemod.cmi ../typing/typedtree.cmi ../parsing/syntaxerr.cmi \ ../driver/pparse.cmi ../parsing/parse.cmi odoc_types.cmi odoc_text.cmi \ @@ -44,8 +52,6 @@ odoc_class.cmo : ../typing/types.cmi odoc_value.cmo odoc_types.cmi \ odoc_parameter.cmo odoc_name.cmi odoc_class.cmx : ../typing/types.cmx odoc_value.cmx odoc_types.cmx \ odoc_parameter.cmx odoc_name.cmx -odoc_comments_global.cmo : odoc_comments_global.cmi -odoc_comments_global.cmx : odoc_comments_global.cmi odoc_comments.cmo : odoc_types.cmi odoc_text.cmi odoc_see_lexer.cmo \ odoc_parser.cmi odoc_misc.cmi odoc_messages.cmo odoc_merge.cmi \ odoc_lexer.cmo odoc_global.cmi odoc_cross.cmi odoc_comments_global.cmi \ @@ -54,6 +60,8 @@ odoc_comments.cmx : odoc_types.cmx odoc_text.cmx odoc_see_lexer.cmx \ odoc_parser.cmx odoc_misc.cmx odoc_messages.cmx odoc_merge.cmx \ odoc_lexer.cmx odoc_global.cmx odoc_cross.cmx odoc_comments_global.cmx \ odoc_comments.cmi +odoc_comments_global.cmo : odoc_comments_global.cmi +odoc_comments_global.cmx : odoc_comments_global.cmi odoc_config.cmo : ../utils/config.cmi odoc_config.cmi odoc_config.cmx : ../utils/config.cmx odoc_config.cmi odoc_control.cmo : @@ -144,14 +152,6 @@ odoc_misc.cmo : ../typing/types.cmi ../typing/predef.cmi ../typing/path.cmi \ odoc_misc.cmx : ../typing/types.cmx ../typing/predef.cmx ../typing/path.cmx \ odoc_types.cmx odoc_messages.cmx ../parsing/longident.cmx \ ../typing/ctype.cmx ../typing/btype.cmx odoc_misc.cmi -odoc.cmo : ../typing/typedtree.cmi odoc_messages.cmo odoc_info.cmi \ - odoc_global.cmi odoc_gen.cmi odoc_config.cmi odoc_args.cmi \ - odoc_analyse.cmi ../utils/misc.cmi ../utils/config.cmi \ - ../utils/clflags.cmi -odoc.cmx : ../typing/typedtree.cmx odoc_messages.cmx odoc_info.cmx \ - odoc_global.cmx odoc_gen.cmx odoc_config.cmx odoc_args.cmx \ - odoc_analyse.cmx ../utils/misc.cmx ../utils/config.cmx \ - ../utils/clflags.cmx odoc_module.cmo : ../typing/types.cmi odoc_value.cmo odoc_types.cmi \ odoc_type.cmo odoc_name.cmi odoc_extension.cmo odoc_exception.cmo \ odoc_class.cmo @@ -214,12 +214,12 @@ odoc_texi.cmo : ../typing/types.cmi odoc_to_text.cmo odoc_messages.cmo \ odoc_info.cmi ../parsing/asttypes.cmi odoc_texi.cmx : ../typing/types.cmx odoc_to_text.cmx odoc_messages.cmx \ odoc_info.cmx ../parsing/asttypes.cmi -odoc_text_lexer.cmo : odoc_text_parser.cmi odoc_misc.cmi -odoc_text_lexer.cmx : odoc_text_parser.cmx odoc_misc.cmx odoc_text.cmo : odoc_types.cmi odoc_text_parser.cmi odoc_text_lexer.cmo \ odoc_text.cmi odoc_text.cmx : odoc_types.cmx odoc_text_parser.cmx odoc_text_lexer.cmx \ odoc_text.cmi +odoc_text_lexer.cmo : odoc_text_parser.cmi odoc_misc.cmi +odoc_text_lexer.cmx : odoc_text_parser.cmx odoc_misc.cmx odoc_text_parser.cmo : odoc_types.cmi odoc_misc.cmi odoc_text_parser.cmi odoc_text_parser.cmx : odoc_types.cmx odoc_misc.cmx odoc_text_parser.cmi odoc_to_text.cmo : odoc_module.cmo odoc_messages.cmo odoc_info.cmi @@ -238,8 +238,8 @@ odoc_analyse.cmi : odoc_module.cmo odoc_global.cmi odoc_args.cmi : odoc_gen.cmi odoc_ast.cmi : ../typing/types.cmi ../typing/typedtree.cmi \ ../parsing/parsetree.cmi odoc_sig.cmi odoc_name.cmi odoc_module.cmo -odoc_comments_global.cmi : odoc_comments.cmi : odoc_types.cmi odoc_module.cmo +odoc_comments_global.cmi : odoc_config.cmi : odoc_cross.cmi : odoc_types.cmi odoc_module.cmo odoc_dag2html.cmi : odoc_info.cmi 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 diff --git a/ocamldoc/Makefile.nt b/ocamldoc/Makefile.nt deleted file mode 100644 index 22cd36eb0..000000000 --- a/ocamldoc/Makefile.nt +++ /dev/null @@ -1,253 +0,0 @@ -#(***********************************************************************) -#(* *) -#(* OCamldoc *) -#(* *) -#(* 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 -########################## -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) - -OCAMLPP=-pp "grep -v DEBUG" - -# For installation -############## -MKDIR=mkdir -CP=cp -OCAMLDOC=ocamldoc -OCAMLDOC_RUN=$(CAMLRUN) $(OCAMLDOC) -OCAMLDOC_OPT=$(OCAMLDOC).opt -OCAMLDOC_LIBCMA=odoc_info.cma -OCAMLDOC_LIBCMI=odoc_info.cmi -OCAMLDOC_LIBCMXA=odoc_info.cmxa -OCAMLDOC_LIBA=odoc_info.$(A) -INSTALL_LIBDIR=$(DESTDIR)$(OCAMLLIB)/ocamldoc -INSTALL_CUSTOMDIR=$(INSTALL_LIBDIR)/custom -INSTALL_BINDIR=$(DESTDIR)$(OCAMLBIN) - -INSTALL_MLIS=odoc_info.mli -INSTALL_CMIS=$(INSTALL_MLIS:.mli=.cmi) - -# Compilation -############# -OCAMLSRCDIR=.. -INCLUDES_DEP=-I $(OCAMLSRCDIR)/parsing \ - -I $(OCAMLSRCDIR)/utils \ - -I $(OCAMLSRCDIR)/typing \ - -I $(OCAMLSRCDIR)/driver \ - -I $(OCAMLSRCDIR)/bytecomp \ - -I $(OCAMLSRCDIR)/tools \ - -I $(OCAMLSRCDIR)/toplevel/ - -INCLUDES_NODEP= -I $(OCAMLSRCDIR)/stdlib \ - -I $(OCAMLSRCDIR)/otherlibs/str \ - -I $(OCAMLSRCDIR)/otherlibs/dynlink \ - -I $(OCAMLSRCDIR)/otherlibs/$(UNIXLIB) \ - -I $(OCAMLSRCDIR)/otherlibs/num \ - -I $(OCAMLSRCDIR)/otherlibs/$(GRAPHLIB) - -INCLUDES=$(INCLUDES_DEP) $(INCLUDES_NODEP) - -COMPFLAGS=$(INCLUDES) -warn-error A -safe-string -LINKFLAGS=$(INCLUDES) -nostdlib - -CMOFILES= odoc_config.cmo \ - odoc_messages.cmo\ - odoc_global.cmo\ - 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_extension.cmo\ - odoc_exception.cmo\ - odoc_class.cmo\ - odoc_module.cmo\ - odoc_print.cmo \ - 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\ - odoc_scan.cmo\ - odoc_cross.cmo\ - odoc_comments.cmo\ - odoc_dep.cmo\ - odoc_analyse.cmo\ - odoc_info.cmo - - -CMXFILES= $(CMOFILES:.cmo=.cmx) -CMIFILES= $(CMOFILES:.cmo=.cmi) - -EXECMOFILES=$(CMOFILES) \ - odoc_dag2html.cmo \ - odoc_to_text.cmo \ - odoc_ocamlhtml.cmo \ - odoc_html.cmo \ - odoc_man.cmo \ - odoc_latex_style.cmo \ - odoc_latex.cmo \ - odoc_texi.cmo \ - odoc_dot.cmo \ - odoc_gen.cmo \ - odoc_args.cmo \ - odoc.cmo - -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)/tools/depend.cmo - -OCAMLCMXFILES=$(OCAMLCMOFILES:.cmo=.cmx) - -all: - $(MAKEREC) exe - $(MAKEREC) lib - -exe: $(OCAMLDOC) -lib: $(OCAMLDOC_LIBCMA) $(OCAMLDOC_LIBCMI) - -opt.opt: exeopt libopt -exeopt: $(OCAMLDOC_OPT) -libopt: $(OCAMLDOC_LIBCMXA) $(OCAMLDOC_LIBCMI) - -debug: - $(MAKEREC) OCAMLPP="" - -$(OCAMLDOC): $(EXECMOFILES) - $(OCAMLC) -o $@ -linkall unix.cma str.cma dynlink.cma \ - $(OCAMLSRCDIR)/compilerlibs/ocamlcommon.cma \ - $(LINKFLAGS) $(OCAMLCMOFILES) $(EXECMOFILES) -$(OCAMLDOC_OPT): $(EXECMXFILES) - $(OCAMLOPT) -o $@ -linkall unix.cmxa str.cmxa dynlink.cmxa \ - $(OCAMLSRCDIR)/compilerlibs/ocamlcommon.cmxa \ - $(LINKFLAGS) $(OCAMLCMXFILES) $(EXECMXFILES) - -$(OCAMLDOC_LIBCMA): $(LIBCMOFILES) - $(OCAMLC) -a -o $@ $(LINKFLAGS) $(OCAMLSRCDIR)/tools/depend.cmo \ - $(LIBCMOFILES) -$(OCAMLDOC_LIBCMXA): $(LIBCMXFILES) - $(OCAMLOPT) -a -o $@ $(LINKFLAGS) $(OCAMLSRCDIR)/tools/depend.cmx \ - $(LIBCMXFILES) - -# 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 - - -# generic rules : -################# - -.SUFFIXES: .mll .mly .ml .mli .cmo .cmi .cmx .cmxs - -.ml.cmo: - $(OCAMLC) $(OCAMLPP) $(COMPFLAGS) -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLPP) $(COMPFLAGS) -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLPP) $(COMPFLAGS) -c $< - -.ml.cmxs: - $(OCAMLOPT) -shared -o $@ $(OCAMLPP) $(COMPFLAGS) $< - -.mll.ml: - $(OCAMLLEX) $< - -.mly.ml: - $(OCAMLYACC) -v $< - -.mly.mli: - $(OCAMLYACC) -v $< - -# Installation targets -###################### -install: dummy - $(MKDIR) -p $(INSTALL_BINDIR) - $(MKDIR) -p $(INSTALL_LIBDIR) - $(CP) $(OCAMLDOC) $(INSTALL_BINDIR)/$(OCAMLDOC)$(EXE) - $(CP) ocamldoc.hva *.cmi $(OCAMLDOC_LIBCMA) $(INSTALL_LIBDIR) - $(CP) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR) - -installopt: - if test -f $(OCAMLDOC_OPT); then $(MAKEREC) installopt_really; fi - -installopt_really: - $(MKDIR) -p $(INSTALL_BINDIR) - $(MKDIR) -p $(INSTALL_LIBDIR) - $(CP) $(OCAMLDOC_OPT) $(INSTALL_BINDIR)/$(OCAMLDOC_OPT)$(EXE) - $(CP) ocamldoc.hva $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) $(INSTALL_LIBDIR) - $(CP) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR) - - -# backup, clean and depend : -############################ - -clean:: dummy - @rm -f *~ \#*\# - @rm -f $(OCAMLDOC) $(OCAMLDOC_OPT) *.cma *.cmxa *.cmo *.cmi *.cmx *.$(A) *.$(O) - @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 - @rm -f odoc_parser.ml odoc_parser.mli odoc_text_parser.ml odoc_text_parser.mli - @rm -rf stdlib_man - @rm -f generators/*.cm[aiox] generators/*.$(A) generators/*.$(O) generators/*.cmx[as] - -depend:: - $(OCAMLYACC) odoc_text_parser.mly - $(OCAMLYACC) odoc_parser.mly - $(OCAMLLEX) odoc_text_lexer.mll - $(OCAMLLEX) odoc_lexer.mll - $(OCAMLLEX) odoc_ocamlhtml.mll - $(OCAMLLEX) odoc_see_lexer.mll - $(OCAMLDEP) $(INCLUDES_DEP) *.mll *.mly *.ml *.mli > .depend - -dummy: - -include .depend diff --git a/ocamldoc/runocamldoc b/ocamldoc/runocamldoc deleted file mode 100644 index d2112e9cd..000000000 --- a/ocamldoc/runocamldoc +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -####################################################################### -# # -# OCaml # -# # -# Xavier Leroy, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 2002 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. # -# # -####################################################################### - -case "$1" in - true) shift - exec ../boot/ocamlrun -I ../otherlibs/unix -I ../otherlibs/str \ - ./ocamldoc "$@" - ;; - *) shift - exec ./ocamldoc "$@" - ;; -esac -- cgit v1.2.3-70-g09d2