Skip to content

Commit 45af238

Browse files
author
Arjun Guha
committed
Version bump and cleanup
1 parent d40c76b commit 45af238

File tree

7 files changed

+92
-142
lines changed

7 files changed

+92
-142
lines changed

.travis-ci.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

Makefile

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,41 @@
1-
all: build
1+
# OASIS_START
2+
# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954)
23

3-
ASYNC ?= $(shell if ocamlfind query async >/dev/null 2>&1; then echo --enable-async; else echo --disable-async; fi)
4-
# Implies --enable-quickcheck
5-
TESTS ?= $(shell if ocamlfind query quickcheck >/dev/null 2>&1; then echo --enable-tests; else echo --disable-tests; fi)
4+
SETUP = ocaml setup.ml
65

7-
NAME=openflow
8-
J=4
6+
build: setup.data
7+
$(SETUP) -build $(BUILDFLAGS)
98

10-
setup.ml: _oasis
11-
oasis setup
9+
doc: setup.data build
10+
$(SETUP) -doc $(DOCFLAGS)
1211

13-
setup.data: setup.ml
14-
ocaml setup.ml -configure $(ASYNC) $(TESTS)
12+
test: setup.data build
13+
$(SETUP) -test $(TESTFLAGS)
1514

16-
build: setup.data setup.ml
17-
ocaml setup.ml -build -j $(J)
15+
all:
16+
$(SETUP) -all $(ALLFLAGS)
1817

19-
install: setup.data setup.ml
20-
ocaml setup.ml -install
18+
install: setup.data
19+
$(SETUP) -install $(INSTALLFLAGS)
2120

22-
test: setup.ml build
23-
_build/test/Test.byte inline-test-runner openflow
21+
uninstall: setup.data
22+
$(SETUP) -uninstall $(UNINSTALLFLAGS)
2423

25-
reinstall: setup.ml
26-
ocamlfind remove $(NAME) || true
27-
ocaml setup.ml -reinstall
24+
reinstall: setup.data
25+
$(SETUP) -reinstall $(REINSTALLFLAGS)
2826

2927
clean:
30-
ocamlbuild -clean
31-
rm -f setup.data setup.log
28+
$(SETUP) -clean $(CLEANFLAGS)
29+
30+
distclean:
31+
$(SETUP) -distclean $(DISTCLEANFLAGS)
32+
33+
setup.data:
34+
$(SETUP) -configure $(CONFIGUREFLAGS)
35+
36+
configure:
37+
$(SETUP) -configure $(CONFIGUREFLAGS)
38+
39+
.PHONY: build doc test all install uninstall reinstall clean distclean configure
40+
41+
# OASIS_STOP

_oasis

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
11
OASISFormat: 0.3
22
OCamlVersion: >= 4.01.0
33
Name: openflow
4-
Version: 0.7.0
4+
Version: 0.8.0
55
Synopsis: Serialization library for OpenFlow
66
Authors: https://github.com/frenetic-lang/ocaml-openflow/contributors
77
License: LGPL
8-
Plugins: META (0.3)
8+
Plugins: META (0.3), DevFiles (0.3)
99
BuildTools:
1010
ocamlbuild
1111

12-
Flag quickcheck
13-
Description: build the openflow.quickcheck library
14-
Default: false
15-
16-
Flag async
17-
Description: build the openflow.async library
18-
Default: false
19-
2012
Library openflow
2113
Path: lib
2214
BuildDepends:
@@ -50,7 +42,6 @@ Library async
5042
Findlibparent: openflow
5143
Findlibname: async
5244
Path: async
53-
Build$: flag(async)
5445
BuildDepends:
5546
async,
5647
openflow,
@@ -74,7 +65,6 @@ Library quickcheck
7465
Findlibparent: openflow
7566
Findlibname: quickcheck
7667
Path: quickcheck
77-
Build$: flag(tests) || flag(quickcheck)
7868
BuildDepends:
7969
quickcheck,
8070
openflow,
@@ -103,19 +93,19 @@ Executable testtool
10393
Executable ping_test
10494
Path: ping-test
10595
Install: false
106-
Build$: flag(tests) && flag(async)
96+
Build$: flag(tests)
10797
MainIs: PingTest.ml
10898
BuildDepends: packet,openflow,openflow.async,oUnit,pa_ounit,pa_ounit.syntax
10999

110100
Test all_tests
111101
Command: $testtool inline-test-runner openflow
112-
Run$: flag(quickcheck) && flag(tests)
102+
Run$: flag(tests)
113103
TestTools: testtool
114104

115105
Executable learning_switch
116106
Path: examples
117107
MainIs: Learning_Switch.ml
118-
Build$: flag(async)
108+
Build$: flag(tests)
119109
Install: false
120110
BuildDepends:
121111
threads,
@@ -129,7 +119,7 @@ Executable learning_switch
129119
Executable learning_switch0x04
130120
Path: examples
131121
MainIs: Learning_Switch0x04.ml
132-
Build$: flag(async)
122+
Build$: flag(tests)
133123
Install: false
134124
BuildDepends:
135125
threads,

configure

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
# OASIS_START
4+
# DO NOT EDIT (digest: dc86c2ad450f91ca10c931b6045d0499)
5+
set -e
6+
7+
FST=true
8+
for i in "$@"; do
9+
if $FST; then
10+
set --
11+
FST=false
12+
fi
13+
14+
case $i in
15+
--*=*)
16+
ARG=${i%%=*}
17+
VAL=${i##*=}
18+
set -- "$@" "$ARG" "$VAL"
19+
;;
20+
*)
21+
set -- "$@" "$i"
22+
;;
23+
esac
24+
done
25+
26+
ocaml setup.ml -configure "$@"
27+
# OASIS_STOP

lib/META

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: bca9ff9aca32d529880868a36b2f43fb)
3-
version = "0.7.0"
2+
# DO NOT EDIT (digest: 7d6f752d31baa2bcd0f0346f5d70c96f)
3+
version = "0.8.0"
44
description = "Serialization library for OpenFlow"
55
requires =
66
"str cstruct cstruct.syntax packet core sexplib.syntax sexplib threads"
@@ -10,7 +10,7 @@ archive(native) = "openflow.cmxa"
1010
archive(native, plugin) = "openflow.cmxs"
1111
exists_if = "openflow.cma"
1212
package "quickcheck" (
13-
version = "0.7.0"
13+
version = "0.8.0"
1414
description = "Serialization library for OpenFlow"
1515
requires = "quickcheck openflow packet.quickcheck"
1616
archive(byte) = "quickcheck.cma"
@@ -21,7 +21,7 @@ package "quickcheck" (
2121
)
2222

2323
package "async" (
24-
version = "0.7.0"
24+
version = "0.8.0"
2525
description = "Serialization library for OpenFlow"
2626
requires = "async openflow cstruct.async threads sexplib.syntax sexplib"
2727
archive(byte) = "async.cma"

opam

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
opam-version: "1"
2-
ocaml-version: [ >= "4.01.0" ]
1+
opam-version: "1.2"
2+
ocaml-version: [ >= "4.02.0" ]
33
version: "0.8.0"
44
name: "openflow"
5-
maintainer: "Spiros Eliopoulos <[email protected]>"
5+
maintainer: "Arjun Guha <[email protected]>"
66
build: [
7-
["ocaml" "setup.ml" "-configure" "--%{async:enable}%-async" "--%{quickcheck:enable}%-quickcheck" ]
8-
["ocaml" "setup.ml" "-build"]
9-
["ocaml" "setup.ml" "-install"]
7+
["./configure" "--%{pa_ounit:enable}%-tests"]
8+
[make "install"]
9+
]
10+
build-test: [
11+
[make "test"]
1012
]
1113
remove: [
1214
["ocamlfind" "remove" "openflow"]
@@ -15,10 +17,10 @@ depends: [
1517
"ocamlfind"
1618
"core"
1719
"cstruct" {>= "1.0.1"}
18-
"packet" {>= "0.3.0" }
20+
"packet" {>= "0.3.1" }
1921
"sexplib"
20-
]
21-
depopts: [
2222
"async" {>= "112.06.00" }
2323
"quickcheck"
24-
]
24+
"ounit" {test}
25+
"pa_ounit" {test}
26+
]

0 commit comments

Comments
 (0)