X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=examples%2Fcompile-c%2Fcompile.ml;fp=examples%2Fcompile-c%2Fcompile.ml;h=8e43948e6f99654c52a63ed674ba2554e7ffe457;hb=c4c582dad5435d404490f13acb5ddb706b020f07;hp=043bc9a3a7f84659c7eb1967bb632e24101c8551;hpb=12f53f74a2e9858887a5f23c44c320f6321de82b;p=goaljobs.git diff --git a/examples/compile-c/compile.ml b/examples/compile-c/compile.ml index 043bc9a..8e43948 100644 --- a/examples/compile-c/compile.ml +++ b/examples/compile-c/compile.ml @@ -9,14 +9,14 @@ and built program sources = List.iter (fun s -> require (compiled s)) sources; let objects = List.map (change_file_extension "o") sources in - sh "cc %s -o %s" (String.concat " " objects) program + sh "cd $builddir && cc %s -o %s" (String.concat " " objects) program (* Goal: Make sure a C file is compiled (to an object file). *) and compiled c_file = let o_file = change_file_extension "o" c_file in target (more_recent [o_file] [c_file]); require (file_exists c_file); - sh "cc -c %s -o %s" c_file o_file + sh "cd $builddir && cc -c %s -o %s" c_file o_file (* XXX IMPLICIT *) let () =