Browse thread
OCaml compilation
-
Matthieu Dubuget
- Matthieu Dubuget
-
David Allsopp
- Matthieu Dubuget
- Matthieu Dubuget
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2010-05-28 (10:04) |
From: | Matthieu Dubuget <matthieu.dubuget@g...> |
Subject: | Re: [Caml-list] OCaml compilation |
Thanks for your answer, David. > Installs Tcl 8.5 > > Yes. >>> tkroot=C:/tcl >>> tkdll=tk85.dll >>> tcldll=tcl85.dll >>> download_file ${activetcl} ${activetcldownload} chmod +x >>> ${downloaddir}/${activetcl} ${downloaddir}/${activetcl} --directory >>> ${tkroot} >>> > <snip> > > >>> 9/ OCaml building >>> >>> #!/bin/bash >>> ocaml=ocaml-3.11.2 >>> ocamlarchive=${ocaml}.tar.bz2 >>> ocamldownload=http://caml.inria.fr/pub/distrib/ocaml-3.11/${ocamlarchi >>> ve} >>> >>> download_file ${ocamlarchive} ${ocamldownload} >>> >>> #Extract >>> extract_archive ${downloaddir}/${ocamlarchive} ${extractdir} ${ocaml} >>> >>> #Configure >>> cp ${extractdir}/${ocaml}/config/s-nt.h >>> ${extractdir}/${ocaml}/config/s.h cp >>> ${extractdir}/${ocaml}/config/m-nt.h ${extractdir}/${ocaml}/config/m.h >>> cp ${extractdir}/${ocaml}/config/Makefile.mingw >>> ${extractdir}/${ocaml}/config/Makefile >>> >>> tklink='$(TK_ROOT)' >>> cmd1="s|PREFIX=C:/ocamlmgw|PREFIX=$ocamldirwin|" >>> cmd2="s|TK_ROOT=c:/tcl|TK_ROOT=$tkroot|" >>> cmd3="s|TK_LINK=$tklink/bin/tk84.dll $tklink/bin/tcl84.dll >>> -lws2_32|TK_LINK=${tklink}/bin/${tkdll} ${tklink}/bin/${tcldll} >>> -lws2_32|" >>> sed -i.bak \ >>> -e "$cmd1" \ >>> -e "$cmd2" \ >>> -e "$cmd3" \ >>> ${extractdir}/${ocaml}/config/Makefile >>> > Does this definitely build the correct Makefile - you're searching for > tcl84.dll but out-of-the-box OCaml 3.11.2 uses references tcl85.dll. Your > sed instruction would be better if it was TK_ROOT=.* rather than assuming > the value that the OCaml Dev team will have left there. You shouldn't need > to update TK_LINK. > > Here are the corresponding lines in the Makefile just after sed ran: ### Configuration for LablTk # Set TK_ROOT to the directory where you installed TCL/TK 8.5 # There must be no spaces or special characters in $(TK_ROOT) TK_ROOT=C:/tcl TK_DEFS=-I$(TK_ROOT)/include TK_LINK=$(TK_ROOT)/bin/tk85.dll $(TK_ROOT)/bin/tcl85.dll -lws2_32 I'm ok with your advices in order to improve my small scripts. In this case (3.11.2), cmd3 does not modify anything. But it does when I'm installing an older version of Anyway, the resulting Makefile seems ok to me. And it compiles fine in one computer. Salutations Matt