Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Freyr
committed
Oct 3, 2017
1 parent
89ab231
commit 9e6a101
Showing
5 changed files
with
130 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
USE_OCAMLFIND = true | ||
NATIVE_ENABLED = true | ||
BYTE_ENABLED = true | ||
|
||
OCAMLPACKS[] = | ||
csv | ||
sqlite3 | ||
lwt | ||
lwt.ppx | ||
lwt.unix | ||
threads | ||
|
||
OCAMLFLAGS = -thread -bin-annot -g -w +a-4-6-9-27..29-32..99 -warn-error -a | ||
|
||
OCAMLDEP_MODULES_ENABLED = false | ||
|
||
%.sig: %.ml %.cmo | ||
$(OCAMLFIND) ocamlc -package $(concat \,, $(OCAMLPACKS)) \ | ||
$(OCAMLFINDFLAGS) \ | ||
$(mapprefix -I, $(OCAMLINCLUDES)) \ | ||
$(OCAMLFLAGS) $(OCAMLCFLAGS) -i $< > $@ | ||
|
||
.SUBDIRS: src tests/ppx tests/syntax | ||
|
||
.PHONY: clean | ||
|
||
clean: | ||
rm -f $(filter-proper-targets $(ls R, .)) *.s *.annot *.so *.a | ||
|
||
section | ||
VERSION = $`(shell oasis query Version | tail -1) | ||
NAME = $`(string ocaml-sqlexpr-$(VERSION)) | ||
DATE = $`(shell date +%F) | ||
BRANCH = $`(string $(VERSION)_$(DATE)) | ||
|
||
.PHONY: release | ||
release: | ||
git checkout -b $(BRANCH) | ||
oasis setup | ||
echo "let () = Ocamlbuild_plugin.dispatch (fun hook -> Ocamlbuild_cppo.dispatcher hook)" >> myocamlbuild.ml | ||
git add -f src/META sqlexpr.odocl Makefile _tags configure \ | ||
myocamlbuild.ml setup.ml \ | ||
src/sqlexpr.mllib src/syntax/sqlexpr_syntax.mllib src/ppx/ppx.mllib | ||
git commit -m "Add OASIS-generated build system." | ||
git archive -v --prefix $(NAME)/ -o $(NAME).tar HEAD | ||
rm -f $(NAME).tar.gz | ||
gzip $(NAME).tar | ||
git checkout master | ||
git branch -D $(BRANCH) | ||
|
||
# vim: set sw=4 et: |
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,6 @@ | ||
open build/C | ||
open build/OCaml | ||
|
||
DefineCommandVars() | ||
|
||
.SUBDIRS: . |
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,17 @@ | ||
.SUBDIRS: syntax | ||
unsetenv(OCAMLFIND_TOOLCHAIN) | ||
OCAMLFINDFLAGS = -syntax camlp4o | ||
NATIVE_ENABLED = false | ||
OCAMLPACKS[] = estring camlp4.quotations | ||
pa_sql.cmi pa_sql.cmo: pa_sql.ml | ||
|
||
.SUBDIRS: ppx | ||
OCAMLPACKS[] = compiler-libs.common ocaml-migrate-parsetree ppx_tools_versioned ppx_core re.pcre unix ppx_tools_versioned.metaquot_403 | ||
OCamlProgram(ppx_sqlexpr, sqlexpr_parser ppx_sqlexpr) | ||
|
||
.SCANNER: scan-ocaml-%.ml: %.ml syntax/pa_sql.cmo | ||
.SCANNER: scan-ocaml-%.mli: %.mli syntax/pa_sql.cmo | ||
|
||
OCamlLibrary(sqlexpr, sqlexpr_utils sqlexpr_concurrency sqlexpr_sqlite sqlexpr_sqlite_lwt) | ||
|
||
.DEFAULT: syntax/pa_sql.cmo ppx/ppx_sqlexpr sqlexpr.cma sqlexpr.cmxa |
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,35 @@ | ||
EXTENSIONS = $(ROOT)/src/ppx/ppx_sqlexpr | ||
|
||
.SCANNER: scan-ocaml-%.ml: %.ml $(EXTENSIONS) | ||
.SCANNER: scan-ocaml-%.mli: %.mli $(EXTENSIONS) | ||
|
||
OCAMLINCLUDES += $(ROOT)/src | ||
OCAML_LIBS[] += $(ROOT)/src/sqlexpr | ||
|
||
section | ||
OCAMLPACKS[] = | ||
compiler-libs.common | ||
csv | ||
lwt | ||
lwt.ppx | ||
lwt.unix | ||
ppx_tools.metaquot | ||
re.pcre | ||
sqlite3 | ||
threads | ||
oUnit | ||
unix | ||
|
||
OCAMLFINDFLAGS = -ppx $(ROOT)/src/ppx/ppx_sqlexpr -ppxopt lwt.ppx,-no-debug | ||
OCAMLDEPFLAGS = -ppx $(ROOT)/src/ppx/ppx_sqlexpr | ||
|
||
OCamlProgram(t_parse, t_parse) | ||
OCamlProgram(t_sqlexpr, t_sqlexpr) | ||
$(addsuffixes .o .cmx .cmi .cmo, t_parse t_sqlexpr): | ||
|
||
.PHONY: test | ||
test: t_sqlexpr$(EXE) t_parse$(EXE) | ||
./t_sqlexpr | ||
./t_parse | ||
|
||
# vim: set ts=8 expandtab sw=4: |
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,21 @@ | ||
EXTENSIONS = $(ROOT)/src/syntax/pa_sql.cmo | ||
|
||
.SCANNER: scan-ocaml-%.ml: %.ml $(EXTENSIONS) | ||
.SCANNER: scan-ocaml-%.mli: %.mli $(EXTENSIONS) | ||
|
||
OCAMLINCLUDES += $(ROOT)/src | ||
OCAML_LIBS[] += $(ROOT)/src/sqlexpr | ||
|
||
section | ||
OCAMLPACKS[] = csv estring lwt.syntax lwt.unix oUnit sqlite3 threads | ||
OCAMLFINDFLAGS = -syntax camlp4o -ppopt $(ROOT)/src/syntax/pa_sql.cmo | ||
OCamlProgram(t_sqlexpr_sqlite, t_sqlexpr_sqlite) | ||
OCamlProgram(bm_sqlexpr_sqlite_lwt, bm_sqlexpr_sqlite_lwt) | ||
$(addsuffixes .o .cmx .cmi .cmo, bm_sqlexpr_sqlite_lwt t_sqlexpr_sqlite): | ||
|
||
.PHONY: test | ||
test: t_sqlexpr$(EXE) t_parse$(EXE) | ||
./t_sqlexpr | ||
./t_parse | ||
|
||
# vim: set ts=8 expandtab sw=4: |