Browse thread
[Caml-list] camlp4 in script
[
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: | 2003-11-04 (00:52) |
From: | Issac Trotts <ijtrotts@u...> |
Subject: | Re: [Caml-list] camlp4 in script |
On Mon, Nov 03, 2003 at 04:11:22PM -0500, William Lovas wrote: > On Mon, Nov 03, 2003 at 11:45:59AM -0800, Issac Trotts wrote: > > ijtrotts@beech:/tmp$ cat c4.ml > > let () = > > let includes = "-I /usr/lib/ocaml/camlp4" in > > let args = > > List.fold_left (^) "" (List.tl (Array.to_list Sys.argv)) > > I don't think this is what you want -- this will concatenate the arguments > without putting any whitespace between them. Maybe: > > let args = > String.concat " " (List.tl (Array.to_list Sys.argv)) > > > in > > let cmd = > > Printf.sprintf "ocaml %s camlp4r.cma %s" includes args > > in > > match Sys.command cmd with > > 0 -> () > > | _ -> prerr_endline ("Couldn't run "^cmd) > > > > [...] You're right. Thanks for catching it. Issac -- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners