Skip to content

Respect $MAKE environment variable in myocamlbuild.ml #43

@madroach

Description

@madroach

Please consider the following patch for inclusion:

Index: myocamlbuild.ml
--- myocamlbuild.ml.orig
+++ myocamlbuild.ml
@@ -21,22 +21,25 @@ let cil_version =
   with Not_found -> "" ;;
 
 dispatch begin function
+| Before_options ->
+    Options.use_ocamlfind := true
 | After_rules ->
     (* the main CIL library *)
     ocaml_lib "src/cil";
 
     (* residual reliance on make to build some OCaml source files *)
     let make target =
+      let make = try Sys.getenv "MAKE" with Not_found -> "make" in
       let basename = Pathname.basename target in
       rule ("make " ^ target)
       ~dep: "Makefile"
       ~prod: basename
       (fun _ _ -> Cmd (S
-        [A "make"; A "-C"; P ".."; P ("_build" / target)]))
-      in
-      make "cilversion.ml";
-      make "feature_config.ml";
-      make "machdep.ml";
+        [A make; A "-C"; P ".."; P ("_build" / target)]))
+    in
+    make "cilversion.ml";
+    make "feature_config.ml";
+    make "machdep.ml";
 
     (* Build an list of files to install with ocamlfind *)
     rule "%.mllib -> %.libfiles"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions