-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from euanh/sync-with-djs55
Sync with djs55
- Loading branch information
Showing
13 changed files
with
2,493 additions
and
626 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
*.annot | ||
*.cmo | ||
*.cma | ||
*.cmi | ||
*.a | ||
*.o | ||
*.cmx | ||
*.cmxs | ||
*.cmxa | ||
setup.bin | ||
setup.data | ||
setup.log | ||
dist | ||
_build | ||
api.docdir | ||
*.native | ||
*.byte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,41 @@ | ||
.PHONY: all clean install build | ||
all: build doc | ||
# OASIS_START | ||
# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954) | ||
|
||
NAME=fd-send-recv | ||
J=4 | ||
SETUP = ocaml setup.ml | ||
|
||
export OCAMLRUNPARAM=b | ||
build: setup.data | ||
$(SETUP) -build $(BUILDFLAGS) | ||
|
||
setup.bin: setup.ml | ||
@ocamlopt.opt -o $@ $< || ocamlopt -o $@ $< || ocamlc -o $@ $< | ||
@rm -f setup.cmx setup.cmi setup.o setup.cmo | ||
doc: setup.data build | ||
$(SETUP) -doc $(DOCFLAGS) | ||
|
||
setup.data: setup.bin | ||
@./setup.bin -configure | ||
test: setup.data build | ||
$(SETUP) -test $(TESTFLAGS) | ||
|
||
build: setup.data setup.bin | ||
@./setup.bin -build -j $(J) | ||
all: | ||
$(SETUP) -all $(ALLFLAGS) | ||
|
||
doc: setup.data setup.bin | ||
@./setup.bin -doc -j $(J) | ||
install: setup.data | ||
$(SETUP) -install $(INSTALLFLAGS) | ||
|
||
install: setup.bin | ||
@./setup.bin -install | ||
uninstall: setup.data | ||
$(SETUP) -uninstall $(UNINSTALLFLAGS) | ||
|
||
test: setup.bin build | ||
@./setup.bin -test | ||
|
||
reinstall: setup.bin | ||
@ocamlfind remove $(NAME) || true | ||
@./setup.bin -reinstall | ||
reinstall: setup.data | ||
$(SETUP) -reinstall $(REINSTALLFLAGS) | ||
|
||
clean: | ||
@ocamlbuild -clean | ||
@rm -f setup.data setup.log setup.bin | ||
$(SETUP) -clean $(CLEANFLAGS) | ||
|
||
distclean: | ||
$(SETUP) -distclean $(DISTCLEANFLAGS) | ||
|
||
setup.data: | ||
$(SETUP) -configure $(CONFIGUREFLAGS) | ||
|
||
configure: | ||
$(SETUP) -configure $(CONFIGUREFLAGS) | ||
|
||
.PHONY: build doc test all install uninstall reinstall clean distclean configure | ||
|
||
# OASIS_STOP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,62 @@ | ||
OASISFormat: 0.2 | ||
OASISFormat: 0.3 | ||
Name: fd-send-recv | ||
Version: 1.0.1 | ||
Synopsis: Bindings to sendmsg/recvmsg which allow fds to be sent/received | ||
Authors: Jonathan Ludlam <jonathan.ludlam@eu.citrix.com> | ||
License: LGPL-2.1 with OCaml linking exception | ||
Plugins: META (0.2) | ||
Plugins: META (0.3), DevFiles (0.3) | ||
BuildTools: ocamlbuild | ||
|
||
Flag tuntap | ||
Description: Enable the tuntap test (require package tuntap) | ||
Default: false | ||
|
||
Library fd_send_recv | ||
CompiledObject: best | ||
Path: lib | ||
Findlibname: fd-send-recv | ||
Modules: Fd_send_recv | ||
CSources: fd_send_recv_stubs.c | ||
BuildDepends: unix | ||
|
||
Document api | ||
Title: Documentation and API reference | ||
Type: ocamlbuild (0.3) | ||
BuildTools+: ocamldoc | ||
XOCamlbuildLibraries: fd-send-recv | ||
XOcamlbuildPath: doc | ||
Install: false | ||
|
||
Executable test | ||
Path: test | ||
MainIs: test.ml | ||
BuildDepends: threads, fd-send-recv | ||
CompiledObject: best | ||
Install: false | ||
|
||
Executable test_fork | ||
Path: test | ||
MainIs: test_fork.ml | ||
BuildDepends: fd-send-recv | ||
CompiledObject: best | ||
Install: false | ||
|
||
Executable test_tuntap | ||
Build$: flag(tuntap) | ||
Install: false | ||
Path: test | ||
MainIs: test_tuntap.ml | ||
BuildDepends: fd-send-recv, tuntap | ||
CompiledObject: best | ||
|
||
Test test | ||
Command: ./test.native | ||
Run: true | ||
|
||
Test test_fork | ||
Command: ./test_fork.native | ||
Run: true | ||
|
||
Test test_tuntap | ||
Command: ./test_tuntap.native | ||
Run$: flag(tuntap) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
# OASIS_START | ||
# DO NOT EDIT (digest: dc86c2ad450f91ca10c931b6045d0499) | ||
set -e | ||
|
||
FST=true | ||
for i in "$@"; do | ||
if $FST; then | ||
set -- | ||
FST=false | ||
fi | ||
|
||
case $i in | ||
--*=*) | ||
ARG=${i%%=*} | ||
VAL=${i##*=} | ||
set -- "$@" "$ARG" "$VAL" | ||
;; | ||
*) | ||
set -- "$@" "$i" | ||
;; | ||
esac | ||
done | ||
|
||
ocaml setup.ml -configure "$@" | ||
# OASIS_STOP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fd_send_recv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.