Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect $MAKE environment variable in myocamlbuild.ml #43

Open
madroach opened this issue Jun 21, 2018 · 4 comments
Open

Respect $MAKE environment variable in myocamlbuild.ml #43

madroach opened this issue Jun 21, 2018 · 4 comments

Comments

@madroach
Copy link

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"
@pmetzger
Copy link
Collaborator

  1. You should probably do a pull request. It makes it easier to patch things.
  2. It appears the maintainers are no longer really maintaining CIL so don't expect to hear from them any time soon.

@kerneis
Copy link
Contributor

kerneis commented Jun 21, 2018

it appears the maintainers are no longer really maintaining CIL so don't expect to hear from them any time soon.

True. @pmetzger, I've given you write access to CIL. Sorry I didn't do that sooner, as suggested on the previous pull request. Feel free to merge in pending PR that make sense, if you can test that they compile/work.

@pmetzger
Copy link
Collaborator

@madroach If you could re-open this as a pull request, it would make potential merging easier.

@pmetzger
Copy link
Collaborator

@kerneis Just a warning, I'm not really a good custodian for the code. I'm not currently using it for my work (though I've borrowed pieces of the code). I can help a little bit, but you should perhaps ask on the CIL mailing list to find some maintainers who are more committed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants