Skip to content

Commit

Permalink
use oasis
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Apr 13, 2014
1 parent a5385ce commit 7d5d7a4
Show file tree
Hide file tree
Showing 11 changed files with 7,757 additions and 38 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ _build
*.html
man/
sequence.install
setup.log
setup.data
11 changes: 7 additions & 4 deletions META
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name="sequence"
version="0.3.4"
description="Abstract sequences of elements, for conversion into and from data structures"
requires=""
# OASIS_START
# DO NOT EDIT (digest: 8fe7646cd958ccfd4ec565a95fe6b68c)
version = "0.3.7"
description = "Simple sequence (iterator) datatype and combinators"
archive(byte) = "sequence.cma"
archive(byte, plugin) = "sequence.cma"
archive(native) = "sequence.cmxa"
archive(native, plugin) = "sequence.cmxs"
exists_if = "sequence.cma"
# OASIS_STOP

75 changes: 41 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
# OASIS_START
# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954)

NAME = sequence
DOC = sequence.docdir/index.html
TARGETS = sequence.cma sequence.cmxa sequence.cmxs sequence.cmi sequence.a
LIB = $(addprefix _build/, $(TARGETS))
INSTALL = $(LIB) sequence.mli

bin:
ocamlbuild $(TARGETS) $(DOC)

doc: bin
mkdir -p man/man3/
ocamlfind ocamldoc -I _build/ sequence.ml sequence.mli -man -d man/man3/

install_file:
@rm sequence.install || true
@echo 'doc: [' >> sequence.install
@for m in $(wildcard sequence.docdir/*.html) ; do \
echo " \"?$${m}\"" >> sequence.install; \
done
@echo ']' >> sequence.install
@echo 'man: [' >> sequence.install
@for m in $(wildcard man/man3/[A-Z]*.3o) ; do \
echo " \"?$${m}\"" >> sequence.install; \
done
@echo ']' >> sequence.install

all: bin doc install_file
SETUP = ocaml setup.ml

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

doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)

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

all:
$(SETUP) -all $(ALLFLAGS)

install: setup.data
$(SETUP) -install $(INSTALLFLAGS)

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

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

clean:
$(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

benchs: all
ocamlbuild -use-ocamlfind -pkg bench -pkg benchmark -pkg unix \
Expand All @@ -35,13 +48,7 @@ benchs: all
tests:
ocamlbuild -use-ocamlfind -pkg oUnit tests/run_tests.native

install: all doc
ocamlfind install $(NAME) META $(INSTALL)

push_doc: all doc
scp -r sequence.docdir/* cedeela.fr:~/simon/root/software/sequence/

clean:
ocamlbuild -clean

.PHONY: all clean tests benchs push_doc
.PHONY: benchs tests
37 changes: 37 additions & 0 deletions _oasis
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
OASISFormat: 0.4
Name: sequence
Version: 0.3.7
Homepage: https://github.com/c-cube/sequence
Authors: Simon Cruanes
License: BSD-2-clause
LicenseFile: LICENSE
Plugins: META (0.3), DevFiles (0.3)
BuildTools: ocamlbuild

Synopsis: Simple sequence (iterator) datatype and combinators
Description:
Simple sequence datatype, intended to transfer a finite number of
elements from one data structure to another. Some transformations on sequences,
like `filter`, `map`, `take`, `drop` and `append` can be performed before the
sequence is iterated/folded on.

Library "sequence"
Path: .
Modules: Sequence

Document sequence
Title: Sequence docs
Type: ocamlbuild (0.3)
BuildTools+: ocamldoc
Install: true
XOCamlbuildPath: .
XOCamlbuildLibraries: sequence

Test all
Type: custom
Command: make tests

SourceRepository head
Type: git
Location: https://github.com/c-cube/sequence
Browser: https://github.com/c-cube/sequence/tree/master/src
18 changes: 18 additions & 0 deletions _tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# OASIS_START
# DO NOT EDIT (digest: 34c62fcaf6a79f081a2b2c5cf44cbe05)
# 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 sequence
"sequence.cmxs": use_sequence
# 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
Loading

0 comments on commit 7d5d7a4

Please sign in to comment.