Skip to content

Commit

Permalink
Add OASIS autogen
Browse files Browse the repository at this point in the history
  • Loading branch information
avsm committed Jan 18, 2014
1 parent f37e3ea commit 3104fe0
Show file tree
Hide file tree
Showing 10 changed files with 7,455 additions and 28 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
_build
_config
.*.swp
setup.data
setup.log
44 changes: 30 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
.PHONY: all _config build install doc clean
# OASIS_START
# DO NOT EDIT (digest: 7b2408909643717852b95f994b273fee)

OS ?= unix
PREFIX ?= /usr/local
INSTALLDIR := $(DESTDIR)$(PREFIX)
SETUP = ocaml setup.ml

all: build
build: setup.data
$(SETUP) -build $(BUILDFLAGS)

_config:
./cmd configure
doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)

build: _config
./cmd build
test: setup.data build
$(SETUP) -test $(TESTFLAGS)

install:
./cmd install
all:
$(SETUP) -all $(ALLFLAGS)

doc: _config
./cmd doc
install: setup.data
$(SETUP) -install $(INSTALLFLAGS)

uninstall: setup.data
$(SETUP) -uninstall $(UNINSTALLFLAGS)

reinstall: setup.data
$(SETUP) -reinstall $(REINSTALLFLAGS)

clean:
./cmd clean
$(SETUP) -clean $(CLEANFLAGS)

distclean:
$(SETUP) -distclean $(DISTCLEANFLAGS)

setup.data:
$(SETUP) -configure $(CONFIGUREFLAGS)

.PHONY: build doc test all install uninstall reinstall clean distclean configure

# OASIS_STOP
45 changes: 32 additions & 13 deletions _tags
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
<lib/*> and not <lib/net.*>: for-pack(Net)
<lib/**>: use_syntax
<lib/dhcp/*> and not <lib/dhcp/dhcp.*>: for-pack(Net.Dhcp)
<lib/tcp/*> and not <lib/tcp/tcp.*>: for-pack(Net.Tcp)
<lib/dhcp/dhcp.*>: for-repack(Net)
<lib/tcp/tcp.*>: for-repack(Net)
<lib>: include
<lib/tcp>: include
<lib/dhcp>: include
<lib_test/*>: use_lib, custom
<syntax/*>: build_syntax
true: camlp4o, warn_A
true: annot, bin_annot, debug
# OASIS_START
# DO NOT EDIT (digest: fd33e995d7a29b67bae1ebc54fddde7a)
# 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
<**/.svn>: -traverse
<**/.svn>: not_hygienic
".bzr": -traverse
".bzr": not_hygienic
".hg": -traverse
".hg": not_hygienic
".git": -traverse
".git": not_hygienic
"_darcs": -traverse
"_darcs": not_hygienic
# Library tcpip
"lib/tcpip.cmxs": use_tcpip
# Library ethif
"lib/ethif.cmxs": use_ethif
# Library ipv4
"lib/ipv4.cmxs": use_ipv4
<lib/*.ml{,i}>: pkg_io-page
<lib/*.ml{,i}>: pkg_mirage-types
<lib/*.ml{,i}>: pkg_ipaddr
<lib/*.ml{,i}>: pkg_cstruct
<lib/*.ml{,i}>: pkg_cstruct.syntax
<lib/*.ml{,i}>: pkg_lwt.syntax
# Library ethif-unix
"unix/ethif-unix.cmxs": use_ethif-unix
<unix/*.ml{,i}>: pkg_ethif
<unix/*.ml{,i}>: pkg_mirage-net-unix
# OASIS_STOP
27 changes: 27 additions & 0 deletions configure
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
5 changes: 5 additions & 0 deletions lib/ethif.mllib
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: 44dee88ac86ae169b17ccb33ee5e8eb4)
Ethif
Arpv4
# OASIS_STOP
4 changes: 4 additions & 0 deletions lib/ipv4.mllib
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# OASIS_START
# DO NOT EDIT (digest: e53211788365c0a2b1be74b682c19983)
Ipv4
# OASIS_STOP
4 changes: 4 additions & 0 deletions lib/tcpip.mllib
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# OASIS_START
# DO NOT EDIT (digest: b9ece18c950afbfa6b0fdbfa4ff731d3)
T
# OASIS_STOP
Loading

0 comments on commit 3104fe0

Please sign in to comment.