Skip to content
Browse files

[net] reintegrate MPL into build

Build still broken due to Istring references which will be converted to Bigarray shortly
  • Loading branch information...
1 parent 949c67a commit 196a4c80e35221965d857c3705a2c0d6f1c291f8 @avsm committed Sep 30, 2011
View
10 lib/myocamlbuild.ml
@@ -103,7 +103,7 @@ end
(* Rules for MPL compiler *)
module MPL = struct
- let mplc_bin = "mplc"
+ let mplc_bin = "../../../tools/mpl/_build/mplc.native"
let mpl_c tags arg out =
Cmd (S [A mplc_bin; A"-q"; T(tags++"mpl"); P arg; Sh">"; Px out])
@@ -114,10 +114,10 @@ module MPL = struct
mpl_c tags mpl ml
let () =
- rule "mpl: mpl -> ml"
- ~prod:"%.ml"
- ~dep:"%.mpl"
- (mpl_compile "%.mpl" "%.ml")
+ rule "mpl: %.mpl -> %_mpl.ml"
+ ~prod:"%(file).ml"
+ ~dep:"%(file).mpl"
+ (mpl_compile "%(file).mpl" "%(file).ml")
end
(* Rules to directly invoke GCC rather than go through OCaml. *)
View
0 lib/net/direct/dhcp.mpl → lib/net/direct/mpl/dhcp.mpl
File renamed without changes.
View
0 lib/net/direct/ethernet.mpl → lib/net/direct/mpl/ethernet.mpl
File renamed without changes.
View
0 lib/net/direct/icmp.mpl → lib/net/direct/mpl/icmp.mpl
File renamed without changes.
View
0 lib/net/direct/ipv4.mpl → lib/net/direct/mpl/ipv4.mpl
File renamed without changes.
View
6 lib/net/direct/mpl/mpl.smlpack
@@ -0,0 +1,6 @@
+Dhcp
+Ethernet
+Icmp
+Ipv4
+Tcp
+Udp
View
0 lib/net/direct/tcp.mpl → lib/net/direct/mpl/tcp.mpl
File renamed without changes.
View
0 lib/net/direct/udp.mpl → lib/net/direct/mpl/udp.mpl
File renamed without changes.
View
1 lib/net/direct/net.smlpack
@@ -1,3 +1,4 @@
+mpl/Mpl
Nettypes
Checksum
Arp
View
2 tools/Makefile
@@ -4,10 +4,12 @@ JOBS ?= -j 4
all:
@cd crunch && ocamlbuild -quiet $(JOBS) crunch.native
+ @cd mpl && ocamlbuild -quiet $(JOBS) mplc.native
@cd ocp-pack && ocamlbuild -quiet $(JOBS) pack.native
@$(MAKE) -C fs
clean:
@cd crunch && ocamlbuild -clean
+ @cd mpl && ocamlbuild -clean
@cd ocp-pack && ocamlbuild -clean
@cd fs && $(MAKE) clean

0 comments on commit 196a4c8

Please sign in to comment.
Something went wrong with that request. Please try again.