Allow bitmatch-import-prefix.h to be installed centrally.
authorRichard W.M. Jones <rich@annexia.org>
Tue, 1 Jul 2008 14:15:18 +0000 (14:15 +0000)
committerRichard W.M. Jones <rich@annexia.org>
Tue, 1 Jul 2008 14:15:18 +0000 (14:15 +0000)
cil-tools/.depend
cil-tools/bitmatch_import_c.ml

index 4fa223b..ae0d049 100644 (file)
@@ -1,2 +1,4 @@
-bitmatch_import_c.cmo: ../bitmatch_persistent.cmi ../bitmatch.cmi 
-bitmatch_import_c.cmx: ../bitmatch_persistent.cmx ../bitmatch.cmx 
+bitmatch_import_c.cmo: ../bitmatch_persistent.cmi ../bitmatch_config.cmo \
+    ../bitmatch.cmi 
+bitmatch_import_c.cmx: ../bitmatch_persistent.cmx ../bitmatch_config.cmx \
+    ../bitmatch.cmx 
index 6936fac..dfe6dac 100644 (file)
@@ -26,6 +26,8 @@ open Cil
 
 module P = Bitmatch_persistent
 
+let (//) = Filename.concat
+
 let () =
   (* Parse command line arguments. *)
   let debug = ref false in
@@ -99,8 +101,9 @@ OPTIONS" in
     ) in
 
   let cmd =
-    sprintf "cpp %s -include bitmatch-import-prefix.h %s > %s"
+    sprintf "cpp %s -I %s -include bitmatch-import-prefix.h %s > %s"
       (String.concat " " (List.map Filename.quote cpp_args))
+      (Filename.quote (Bitmatch_config.ocamllibdir // "bitmatch"))
       (Filename.quote input_file) (Filename.quote tmp) in
   if debug then prerr_endline cmd;
   if Sys.command cmd <> 0 then (