-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oasis build system #78
Conversation
Makefile, configure and setup.ml are generated automatically by Oasis. Makefile.old is a previous version of Makefile using OCamlMake. myocamlbuild.ml contains some code to silence silly warnings and nothing much but that.
Also use Objects instead of Libraries.
This ensure a reasonably recent version of ocamlbuild. Oasis outputs a more favorable myocamlbuild/_tags when doing so.
This reverts commit fd103c4. Conflicts: _oasis lib/lite/lite_database.ml lib/lite3/lite3_database.ml lib/lite3_database.ml lib/lite_database.ml lib/m5_database.ml lib/monetdb/m5_database.ml lib/mysql/mysql_database.ml lib/mysql_database.ml lib/pg_database.ml lib/postgres/pg_database.ml lite3_database.ml lite_database.ml m5_database.ml mysql_database.ml pg_database.ml
I think I should elaborate a bit more on this one:
Actually, Oasis has a simple way of passing extra arguments to the compiler. One either uses Also, which version do we want to build by default: byte or native? I see no easy way to switch between them other than changing entry in the |
You don't need to: just add an OR dependency in the opam file. In any cases, that's better left for the opam description.
Add to
annot is the new name of dtypes. |
Won't |
No, just give oasis his section and it'll be happy. Example. |
This recovers warning setting defined previously in a Makefile
For comparison, here is a branch that uses OMake instead of ocamlbuild. Conditional building works much the same way as the existing OCamlMakefile approach, and does not require reorganizing the directory. |
Closing without merging, as just discussed. |
Here's a preliminary patch replacing OCamlMake build system with Oasis (#62). Big thanks go to Gabriel Radanne for his help. Please review this patch but don't merge yet.
What we get with Oasis:
_build
directory and no longer clutter the directory with source filesconfigure
andMakefile
, so now we build things like./configure --enable-postgresql --enable-tests --enable-docs && make && make docs && make test
THREADS
environment variable. By default parallel build is on.What changes in our workflow:
oasis
package installed. Oasis generates several files (setup.ml
,configure
,Makefile
). These files are stored inside the repo, which means that end users should not need oasis to install Links. At first I was worried about stroging automatically generated files in the repository but I believe these files will hardly ever change. I think adding new flags and sections to_oasis
file will changeconfigure
script and that's it. From now on we useconfigure
/make
routine.Questions
deriving
directory along with executable inside it. Things seem to magically work nevertheless. Can someone more knowledgeable than me verify that this is indeed OK?TODO
links.native
rather thanlinks
. This can be done in_oasis
file withCommand: testing_script $links_executable
, where$links_executable
is executable section nameMakefile
. One that worries me the most isOCAMLFLAGS=-dtypes -w Ae-44-45 -g -cclib -lunix
. I will keep working on this. EDIT: fix this in_tags
file - see comments belowsrc
and backends onsrc/drivers/
. At the moment they are inlib
, per Gabriel's patch. I guess it is best to take a look at other OCaml projects and see whether they tend to store their library source files insrc
orlib
_oasis
file need tweaking before we make a release. We need to specify which files should be installed and where. Related to Figure out how to do a release #61.