diff options
-rw-r--r-- | _tags | 3 | ||||
-rwxr-xr-x | build/boot.sh | 2 | ||||
-rw-r--r-- | myocamlbuild.ml | 10 |
3 files changed, 13 insertions, 2 deletions
@@ -17,6 +17,8 @@ true: -traverse # Traverse only these directories <{bytecomp,driver,stdlib,tools,asmcomp,camlp4,ocamlbuild,toplevel,ocamldoc,typing,otherlibs,utils,debugger,lex,parsing,byterun,asmrun}/**>: traverse +"ocamlbuild/test" or "ocamlbuild/testsuite": -traverse + "boot" or "byterun" or "asmrun" or "compilerlibs": not_hygienic # These should not be required but it fails on *BSD and Windows... @@ -86,6 +88,5 @@ true: use_stdlib <otherlibs/threads/**>: otherlibs_threads "otherlibs/threads/unix.cma": -otherlibs_threads <otherlibs/systhreads/**>: otherlibs_systhreads -<otherlibs/dbm/**>: otherlibs_dbm <otherlibs/graph/**>: otherlibs_graph <otherlibs/win32graph/**>: otherlibs_win32graph diff --git a/build/boot.sh b/build/boot.sh index 059df99c3..0f1b82e62 100755 --- a/build/boot.sh +++ b/build/boot.sh @@ -31,7 +31,7 @@ rm -f _build/myocamlbuild boot/ocamlrun boot/myocamlbuild.boot \ -just-plugin -install-lib-dir _build/ocamlbuild -byte-plugin \ - -no-ocamlfind + -no-ocamlfind || exit 1 cp _build/myocamlbuild boot/myocamlbuild diff --git a/myocamlbuild.ml b/myocamlbuild.ml index bd6eb17d1..da5625c05 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -17,6 +17,7 @@ open Format module C = Myocamlbuild_config +let () = mark_tag_used "windows";; let windows = Sys.os_type = "Win32";; if windows then tag_any ["windows"];; let ccomptype = C.ccomptype @@ -399,6 +400,15 @@ rule "C files" mkobj (env ("%"-.-C.o)) (env "%.c") N end;; +let () = + (* define flags otherlibs_unix, otherlibs_bigarray... *) + let otherlibs = "otherlibs" in + let open Pathname in + Array.iter (fun file -> + if is_directory (concat "otherlibs" file) then + mark_tag_used ("otherlibs_" ^ file) + ) (readdir otherlibs);; + (* ../ is because .h files are not dependencies so they are not imported in build dir *) flag ["c"; "compile"; "otherlibs_bigarray"] (S[A"-I"; P"../otherlibs/bigarray"]);; flag [(* "ocaml" or "c"; *) "ocamlmklib"; "otherlibs_graph"] (S[Sh C.x11_link]);; |