summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--_tags3
-rwxr-xr-xbuild/boot.sh2
-rw-r--r--myocamlbuild.ml10
3 files changed, 13 insertions, 2 deletions
diff --git a/_tags b/_tags
index 8df975045..3e611cf7e 100644
--- a/_tags
+++ b/_tags
@@ -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]);;