Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: adept/tup-ocaml
base: 98ed3df7af
...
head fork: adept/tup-ocaml
compare: 4cc301bbe6
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 12 files changed
  • 0 commit comments
  • 1 contributor
View
6 .gitignore
@@ -0,0 +1,6 @@
+*.cmi
+*.cmo
+*.cma
+/sexplib/lib/lexer.ml
+/sexplib/lib/parser.ml
+/sexplib/lib/parser.mli
View
BIN  .tup/db
Binary file not shown
View
0  .tup/object
No changes.
View
0  .tup/shared
No changes.
View
0  .tup/tri
No changes.
View
0  .tup/vardict
No changes.
View
1  README
@@ -0,0 +1 @@
+Both sexplib and type-conv have their own build scripts, I would not be removing them, but I would not be using them either
View
15 Tuprules.tup
@@ -0,0 +1,15 @@
+TOP=$(TUP_CWD)
+LIBDIR=$(TOP)/lib
+OCAMLC_FLAGS=
+
+# Byte-compile preprocessor extension
+!byte_pp = |> ocamlc -I +camlp4 -I $(LIBDIR) $(OCAMLC_FLAGS) -pp camlp4orf -c %f -o %o |>
+
+# Byte-compile interface (.mli -> .cmi)
+!byte_i = |> ocamlc -I +camlp4 -I $(LIBDIR) $(OCAMLC_FLAGS) -c %f -o %o |> %B.cmi
+
+# Byte-compile object file, when interface was compiled separately (.ml -> .cmo, .mli is present)
+!byte_o = |> ocamlc -I +camlp4 -I $(LIBDIR) $(OCAMLC_FLAGS) -c %f -o %o |> %B.cmo
+
+# Byte-compile object file, when interface was compiled separately (.ml -> .cmo, .cmi, no .mli)
+!byte_io = |> ocamlc -I +camlp4 -I $(LIBDIR) $(OCAMLC_FLAGS) -c %f -o %o |> %B.cmo | %B.cmi
View
8 lib/Tupfile
@@ -0,0 +1,8 @@
+include_rules
+
+# "Install" preprocessor extensions to local search path
+: $(TOP)/type-conv/lib/pa_type_conv.cmi |> cp %f %o |> pa_type_conv.cmi
+: $(TOP)/type-conv/lib/pa_type_conv.cmo |> cp %f %o |> pa_type_conv.cmo
+# Those cause circular dependecy - why?
+#: $(TOP)/sexplib/syntax/pa_sexp_conv.cmi |> cp %f %o |> pa_sexp_conv.cmi
+#: $(TOP)/sexplib/syntax/pa_sexp_conv.cmo |> cp %f %o |> pa_sexp_conv.cmo
View
44 sexplib/lib/Tupfile
@@ -0,0 +1,44 @@
+include_rules
+
+# First, generate auto-generated sources
+: foreach *.mll |> ocamllex -q %f |> %B.ml
+: foreach *.mly |> ocamlyacc %f |> %B.ml %B.mli
+
+# Building library modules
+# Note that rules are very similar, differ in order-defining deps only, and all order-defining deps are created by rules within this directory
+# It would be nice to be able to specify some kind of "foreach" rule that captures general compilation command and then specify order-defining
+# dependencies separately
+: type.ml |> !byte_io |> {cmo}
+
+: parser.mli | type.cmi |> !byte_i |>
+: parser.ml | parser.cmi |> !byte_o |> {cmo}
+
+: lexer.ml | parser.cmi |> !byte_io |> {cmo}
+
+# It would be nice to avoid such manual management of flags and be able to set flags for one specific command only
+OCAMLC_FLAGS_BAK = $(OCAMLC_FLAGS)
+OCAMLC_FLAGS += -pp cpp
+: pre_sexp.ml | lexer.cmi |> !byte_io |> {cmo}
+OCAMLC_FLAGS = $(OCAMLC_FLAGS_BAK)
+
+: sexp_intf.ml | pre_sexp.cmi |> !byte_io |> {cmo}
+
+: sexp.mli | sexp_intf.cmi |> !byte_i |>
+: sexp.ml | sexp.cmi |> !byte_o |> {cmo}
+
+: path.mli | sexp.cmi |> !byte_i |>
+: path.ml | path.cmi |> !byte_o |> {cmo}
+
+: conv.mli | path.cmi sexp.cmi |> !byte_i |>
+: conv.ml | conv.cmi |> !byte_o |> {cmo}
+
+: conv_error.ml | conv.cmi |> !byte_io |> {cmo}
+
+: exn_magic.mli | path.cmi sexp.cmi conv.cmi |> !byte_i |>
+: exn_magic.ml | exn_magic.cmi conv.cmi |> !byte_o |> {cmo}
+
+: std.ml | conv.cmi |> !byte_io |> {cmo}
+
+: {cmo} |> ocamlc -a -o %o %f |> sexplib.cma
+
+# Now I would like to "install" .cma to $(LIBDIR)/sexplib/sexplib.cma, but apparently I can't create sexplib subdir on the fly :(
View
3  sexplib/syntax/Tupfile
@@ -0,0 +1,3 @@
+include_rules
+: pa_sexp_conv.mli |> !byte_pp |> pa_sexp_conv.cmi
+: pa_sexp_conv.ml | $(LIBDIR)/pa_type_conv.cmi pa_sexp_conv.cmi |> !byte_pp |> pa_sexp_conv.cmo
View
3  type-conv/lib/Tupfile
@@ -0,0 +1,3 @@
+include_rules
+: pa_type_conv.mli |> !byte_pp |> pa_type_conv.cmi
+: pa_type_conv.ml | pa_type_conv.cmi |> !byte_pp |> pa_type_conv.cmo

No commit comments for this range

Something went wrong with that request. Please try again.