Skip to content

Commit

Permalink
Remove the mirage module for now: it's not clear this should live in …
Browse files Browse the repository at this point in the history
…this repo, and it depends on a special mirage-net
  • Loading branch information
David Scott committed Sep 18, 2012
1 parent 856d439 commit 2338b41
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 245 deletions.
3 changes: 1 addition & 2 deletions Makefile
Expand Up @@ -4,14 +4,13 @@ NAME=pcap
J=4

UNIX ?= $(shell if ocamlfind query lwt.unix >/dev/null 2>&1; then echo --enable-unix; fi)
MIRAGE ?= $(shell if ocamlfind query mirage-net >/dev/null 2>&1; then echo --enable-mirage; fi)
TESTS ?= $(shell if ocamlfind query oUnit >/dev/null 2>&1; then echo --enable-tests; fi)

setup.ml: _oasis
oasis setup

setup.data: setup.ml
ocaml setup.ml -configure $(UNIX) $(MIRAGE) $(TESTS)
ocaml setup.ml -configure $(UNIX) $(TESTS)

build: setup.data setup.ml
ocaml setup.ml -build -j $(J)
Expand Down
13 changes: 0 additions & 13 deletions _oasis
Expand Up @@ -11,26 +11,13 @@ Flag unix
Description: build the Unix binary
Default: false

Flag mirage
Description: build the mirage library
Default: false

Library pcap
CompiledObject: best
Path: lib
Findlibname: pcap
Modules: Pcap
BuildDepends: cstruct ( >= 0.5.0 ), cstruct.syntax

Library mirage
Build$: flag(mirage)
CompiledObject: best
Path: mirage
Findlibname: mirage
Findlibparent: pcap
Modules: Pcap_mirage
BuildDepends: mirage-net, pcap, lwt, lwt.syntax

Executable print
Build$: flag(unix)
CompiledObject: best
Expand Down
10 changes: 1 addition & 9 deletions _tags
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: 7fe842995f4991c2b872623f87cbdd5e)
# DO NOT EDIT (digest: 7fec0955b1fdff1eda5184c0e07ab8ed)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
Expand All @@ -17,14 +17,6 @@
"lib/pcap.cmxs": use_pcap
<lib/*.ml{,i}>: pkg_cstruct
<lib/*.ml{,i}>: pkg_cstruct.syntax
# Library mirage
"mirage/mirage.cmxs": use_mirage
<mirage/*.ml{,i}>: use_pcap
<mirage/*.ml{,i}>: pkg_lwt
<mirage/*.ml{,i}>: pkg_cstruct
<mirage/*.ml{,i}>: pkg_mirage-net
<mirage/*.ml{,i}>: pkg_lwt.syntax
<mirage/*.ml{,i}>: pkg_cstruct.syntax
# Executable print
<print/print.{native,byte}>: use_pcap
<print/print.{native,byte}>: pkg_lwt
Expand Down
12 changes: 1 addition & 11 deletions lib/META
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: f7c45aa484d44b13eb9c71667e9762f1)
# DO NOT EDIT (digest: c36eee819955a4053c7b7f39ffc39fe2)
version = "0.1.0"
description = "Pcap tools"
requires = "cstruct cstruct.syntax"
Expand All @@ -8,15 +8,5 @@ archive(byte, plugin) = "pcap.cma"
archive(native) = "pcap.cmxa"
archive(native, plugin) = "pcap.cmxs"
exists_if = "pcap.cma"
package "mirage" (
version = "0.1.0"
description = "Pcap tools"
requires = "mirage-net pcap lwt lwt.syntax"
archive(byte) = "mirage.cma"
archive(byte, plugin) = "mirage.cma"
archive(native) = "mirage.cmxa"
archive(native, plugin) = "mirage.cmxs"
exists_if = "mirage.cma"
)
# OASIS_STOP

100 changes: 0 additions & 100 deletions mirage/pcap_mirage.ml

This file was deleted.

21 changes: 10 additions & 11 deletions myocamlbuild.ml
@@ -1,7 +1,7 @@
(* OASIS_START *)
(* DO NOT EDIT (digest: 5b1cec25a6d4341f2d4dc4b90846fd71) *)
(* DO NOT EDIT (digest: d97eb6a4a76575f43024877abb2426c4) *)
module OASISGettext = struct
# 21 "/Users/avsm/.opam/3.12.1+mirage-unix-direct/build/oasis.0.3.0/src/oasis/OASISGettext.ml"
# 21 "/home/djs/.opam/3.12.1/build/oasis.0.3.0/src/oasis/OASISGettext.ml"

let ns_ str =
str
Expand All @@ -24,7 +24,7 @@ module OASISGettext = struct
end

module OASISExpr = struct
# 21 "/Users/avsm/.opam/3.12.1+mirage-unix-direct/build/oasis.0.3.0/src/oasis/OASISExpr.ml"
# 21 "/home/djs/.opam/3.12.1/build/oasis.0.3.0/src/oasis/OASISExpr.ml"



Expand Down Expand Up @@ -116,7 +116,7 @@ end

# 117 "myocamlbuild.ml"
module BaseEnvLight = struct
# 21 "/Users/avsm/.opam/3.12.1+mirage-unix-direct/build/oasis.0.3.0/src/base/BaseEnvLight.ml"
# 21 "/home/djs/.opam/3.12.1/build/oasis.0.3.0/src/base/BaseEnvLight.ml"

module MapString = Map.Make(String)

Expand Down Expand Up @@ -214,7 +214,7 @@ end

# 215 "myocamlbuild.ml"
module MyOCamlbuildFindlib = struct
# 21 "/Users/avsm/.opam/3.12.1+mirage-unix-direct/build/oasis.0.3.0/src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml"
# 21 "/home/djs/.opam/3.12.1/build/oasis.0.3.0/src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml"

(** OCamlbuild extension, copied from
* http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild
Expand Down Expand Up @@ -323,7 +323,7 @@ module MyOCamlbuildFindlib = struct
end

module MyOCamlbuildBase = struct
# 21 "/Users/avsm/.opam/3.12.1+mirage-unix-direct/build/oasis.0.3.0/src/plugins/ocamlbuild/MyOCamlbuildBase.ml"
# 21 "/home/djs/.opam/3.12.1/build/oasis.0.3.0/src/plugins/ocamlbuild/MyOCamlbuildBase.ml"

(** Base functions for writing myocamlbuild.ml
@author Sylvain Le Gall
Expand All @@ -339,7 +339,7 @@ module MyOCamlbuildBase = struct
type name = string
type tag = string

# 56 "/Users/avsm/.opam/3.12.1+mirage-unix-direct/build/oasis.0.3.0/src/plugins/ocamlbuild/MyOCamlbuildBase.ml"
# 56 "/home/djs/.opam/3.12.1/build/oasis.0.3.0/src/plugins/ocamlbuild/MyOCamlbuildBase.ml"

type t =
{
Expand Down Expand Up @@ -477,16 +477,15 @@ end
open Ocamlbuild_plugin;;
let package_default =
{
MyOCamlbuildBase.lib_ocaml = [("pcap", ["lib"]); ("mirage", ["mirage"])];
MyOCamlbuildBase.lib_ocaml = [("pcap", ["lib"])];
lib_c = [];
flags = [];
includes =
[("print", ["lib"]); ("mirage", ["lib"]); ("lib_test", ["lib"])];
includes = [("print", ["lib"]); ("lib_test", ["lib"])];
}
;;

let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;

# 491 "myocamlbuild.ml"
# 490 "myocamlbuild.ml"
(* OASIS_STOP *)
Ocamlbuild_plugin.dispatch dispatch_default;;

0 comments on commit 2338b41

Please sign in to comment.