Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] error messages to stdout?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Florian Douetteau <douet@c...>
Subject: Re: [Caml-list] error messages to stdout?
>
> I'd be interested in the trampoline program.
>
> At the moment we are operating in a homogeneous computing environment.
> Sooner or later we will add some a different computer architecture to
> our pool and I was thinking about how to take advantage of compiling
> byte-code once and using it on all platforms.  This has the advantage
> that a developer can compile once, on any one platform, and make that
> program immediately available on all other machine architectures.
>
> I'm not sure of the best way to do this.  I was thinking of using the
> bash MACHTYPE environment variable and then install the byte-code
> program in /usr/local/bin but have the 1st line of that file say
>
>    #! /usr/local/bin/ocamlrun.$MACHTYPE
>

An usual trick  is to make the bytecode file
start with

#! /path_to_my_mach_type_dispatcher /usr/local/bin/ocamlrun

Executing the file will make the system execute:
"my_mach_type_dispatcher /usr/local/bin/ocamlrun bytecode-file-name"

my_mach_type_dispatcher can be a script as simple as:
#! /bin/sh
$1.$MACHTYPE $2

Another trick is to make each /usr/local/bin/ocamlrun.$MACHTYPE
be a symbol link to a script:
$0.$MACHTYPE $@

--
Florian Douetteau
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr