Skip to content

Commit

Permalink
Minor build system improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
pgj committed Aug 21, 2012
1 parent c10b740 commit ecb4a60
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/bsd.mirage.kmod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ KMOD?= mirage

# caml begins here

CAMLP4= camlp4of -I +camlp4 ${LWTSYNTAX}
CAMLP4= camlp4of -I +camlp4 ${LWTSYNTAX} ${CSTSYNTAX}
CAMLCC= ${OCAMLOPT} -nostdlib -I ${STDLIBDIR} -pp '${CAMLP4}'

MIRDIR!= ${OCAMLFIND} query mirage-platform
Expand All @@ -20,6 +20,7 @@ LWTSYNTAX= -I ${LWTDIR} lwt-syntax-options.cma lwt-syntax.cma
CSTDIR!= ${OCAMLFIND} query cstruct
CSTOBJS!= ls ${CSTDIR}/*.cmxa
CSTAS!= ls ${CSTDIR}/*.a
CSTSYNTAX= -I ${CSTDIR} cstruct-syntax.cma

STLIBS= ${MIRAS} ${CSTAS} ${LWTAS}

Expand Down
2 changes: 1 addition & 1 deletion packages/mirage-platform/_tags
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<lib/*>: for-pack(OS), use_syntax, use_custom_stdlib, use_lwt_syntax, use_cstruct
<lib/*>: for-pack(OS), use_syntax, use_custom_stdlib, use_lwt, use_cstruct
<syntax/*>: build_syntax
true: camlp4of
8 changes: 7 additions & 1 deletion packages/myocamlbuild.ml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ dispatch begin function
(S[A "-nostdlib"; A "-I"; A (query "mirage-stdlib")]);
flag ["compile"; "use_cstruct"]
(S[A "-I"; A (query "cstruct")]);
flag ["ocaml"; "pp"; "use_lwt_syntax"]
flag ["compile"; "use_lwt"]
(S[A "-I"; A (query "lwt")]);
flag ["compile"; "use_os"]
(S[A "-I"; A (query "mirage-platform")]);
flag ["ocaml"; "pp"; "use_lwt"]
(S[A "-I"; A (query "lwt"); A "lwt-syntax-options.cma"; A "lwt-syntax.cma"]);
flag ["ocaml"; "pp"; "use_cstruct"]
(S[A "-I"; A (query "cstruct"); A "cstruct-syntax.cma"]);
pflag ["ocaml"; "pack"] "for-repack"
(fun param -> S [A "-for-pack"; A param]);
| _ -> ()
end;;

0 comments on commit ecb4a60

Please sign in to comment.