[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cduce



Hello,

On Mon, 31 Oct 2005 13:27:40 +0100
Sven Luther <sven.luther@wanadoo.fr> wrote:

> Thomas, you can also look at the Makefile, and other build structure
> to see if cduce use pre-compiled object files that are now in
> ocaml-compiler-libs, or if they patch the sources and do their own
> stuff.

I had a quick look at the Makefile (ocamliface/Makefile). Basically,
they copy some files from the OCaml source tree inside a directory
(ocamliface/ocaml_files), and then compile them:

all: caml_cduce.cmo caml_cduce.cmx

[...]

ocaml_files:
        mkdir ocaml_files
        $(HIDE)cp $(patsubst %,$(OCAML_SRC)/%, $(COPY_FILES))
ocaml_files/ cp location.ml ocaml_files
        mv ocaml_files/asttypes.mli ocaml_files/asttypes.ml
        sed s=STDLIB=$(STDLIB)= config.ml > ocaml_files/config.ml
        grep cmi_magic $(OCAML_SRC)/utils/config.mlp >>
ocaml_files/config.ml

caml_cduce.cmo: ocaml_files
        @echo "Build $@"
        (cd ocaml_files; ocamlc $(FORPACKOPT1) $@ -c $(COMPILE_FILES);\
        ocamlc $(FORPACKOPT2) -pack -o $@ $(OBJECTS); \
        cp caml_cduce.cmo caml_cduce.cmi ..)

caml_cduce.cmx: ocaml_files
        @echo "Build $@"
        (cd ocaml_files; ocamlopt $(FORPACKOPT1) $@ -c
$(COMPILE_FILES);\ ocamlopt $(FORPACKOPT2) -pack -o $@ $(XOBJECTS); \
        cp caml_cduce.cmx caml_cduce.o caml_cduce.cmi ..)

Where
 OCAML_SRC is the root of the source tree
 COPY_FILES and COMPILES_FILES are list of OCaml source files (.ml)

If I look in the ocamliface/Makefile of the 0.3.92, here the sources
were clearly not needed: they compiled directly using the
compiler-libs, so I think they know the existence of that stuff.

I'm going to ask them directly concerning this issue.

Thanks,

Thomas
-- 
PETAZZONI Thomas - thomas.petazzoni@enix.org 
http://{thomas,sos,kos}.enix.org - Jabber: thomas.petazzoni@jabber.dk
http://{agenda,livret}dulibre.org
Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E  1624 F653 CB30 98D3 F7A7

Attachment: pgp7y56_k0wEh.pgp
Description: PGP signature


Reply to: