Source

sulu-ocaml-core / base / sexplib / oasis.sh

#!/usr/bin/env bash
set -e -u -o pipefail

source ../../build-common.sh

cat >$HERE/_oasis <<EOF
#AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
OASISFormat:  0.2
OCamlVersion: >= 3.12
Name:         sexplib
Version:      5.2.2
Synopsis:     automated S-expression conversion
Authors:      Markus Mottl,
              Martin Sandin
Copyrights:   (C) 2005-2011 Jane Street Capital LLC
License:      LGPL-2.1 with OCaml linking exception
LicenseFile:  LICENSE
Plugins:      StdFiles (0.2),
              DevFiles (0.2),
              META (0.2)
BuildTools:   ocamlbuild, ocamllex, ocamlyacc
XStdFilesAUTHORS: false
XStdFilesINSTALLFilename: INSTALL
XStdFilesREADME: false

Library sexplib
  Path:               lib
  FindlibName:        sexplib
  #Pack:               true
  Modules:            Type,
                      Parser,
                      Lexer,
                      Pre_sexp,
                      Sexp_intf,
                      Sexp,
                      Std,
                      Path,
                      Conv,
                      Conv_error,
                      Exn_magic
  BuildDepends:       unix,bigarray,num
#  XMETAType:          library
  XMETARequires:      unix,bigarray,num

Library pa_sexp_conv
  Path:               syntax
  Modules:            Pa_sexp_conv
  FindlibParent:      sexplib
  FindlibName:        syntax
  BuildDepends:       camlp4.lib,
                      camlp4.quotations,
                      type-conv (>= 2.0.1)
  CompiledObject:     byte
  XMETAType:          syntax
  XMETARequires:      camlp4,type-conv,sexplib
  XMETADescription:   Syntax extension for Sexplib

#Library sexplib_top
#  Path:               top
#  FindlibParent:      sexplib
#  FindlibName:        top

# TODO: figure out how to build tests without installing sexplib
$(declare_tests_flag)

Executable sexp_test
  Path:               lib_test
  MainIs:             sexp_test.ml
  Build\$:            flag(tests)
  Install:            false
  BuildDepends:       sexplib, sexplib.syntax

Executable conv_test
  Path:               lib_test
  MainIs:             conv_test.ml
  Build\$:            flag(tests)
  Install:            false
  BuildDepends:       sexplib, sexplib.syntax

Test sexp
  Run\$:              flag(tests)
  Command:           \$sexp_test < test.sexp
  WorkingDirectory:   lib_test

Test conv
  Run\$:              flag(tests)
  Command:           \$conv_test
  WorkingDirectory:   lib_test

Document "sexplib"
  Title:                API reference for sexplib
  Type:                 ocamlbuild (0.2)
  BuildTools+:          ocamldoc
  XOCamlbuildPath:      lib
  XOCamlbuildLibraries: sexplib
EOF

make_tags $HERE/_tags <<EOF
# remove this part when oasis supports Pack: true
$(tag_for_pack Sexplib $HERE/lib/*.ml{,l,y})

<lib/pre_sexp.ml>: pp(cpp -undef -traditional -Werror -I$HERE/syntax)
<lib_test/*.ml{,i}>: syntax_camlp4o
<syntax/pa_sexp_conv.ml>: syntax_camlp4o
EOF

cd $HERE
rm -f setup.ml
oasis setup
enable_pack_in_setup_ml sexplib

./configure "$@"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.