Commit Graph

60 Commits

Author SHA1 Message Date
Rudi Grinberg fb0ac48af2 Documentation for new configurator 2018-04-11 22:14:53 +07:00
Jeremie Dimino f26615e5b3 doc 2018-03-19 01:24:27 +08:00
Jeremie Dimino e2adf9d44a Allow to depend on the universe
Fix #255
2018-03-13 19:12:57 +00:00
François Bobot feba0827b8 Allow to link executables as static or shared objects (#23)
- Setup the rules to use the `-output-complete-obj` option of OCaml
- Introduce a `best` mode in addition to `byte` and `native`
- Extend the `modes` field of executables to mean "linking modes", and add linking modes for static and shared objects
2018-03-12 11:40:53 +00:00
Jeremie Dimino cc845e5fdb Make all variables accessible in jbuild files 2018-03-07 09:40:08 +00:00
Jeremie Dimino d415ed5f6c Expose a few more variables 2018-03-07 09:40:08 +00:00
Jeremie Dimino 232acdd92f Libraries and executables can allow overlapping dependencies 2018-03-06 12:59:01 +00:00
Rudi Grinberg 5ecf354127 Add a sub-system for inline tests (#547)
To support frameworks such as ppx_inline_test, ppx_expect and qtest
2018-02-27 19:06:12 +00:00
Christophe Troestler 4ddb268b39 Update the documentation for quoted strings 2018-02-15 00:43:08 +01:00
Jérémie Dimino b3838284c6
Better support for mli/rei only modules (#489) 2018-02-08 10:12:46 +00:00
Jérémie Dimino 437211f74f
Expose the promote mode (#437) 2018-01-25 19:07:46 +00:00
Rudi Grinberg 58f9e9840c Replace janestreet/jbuilder with ocaml/dune
Update all links where necessary
2018-01-23 17:52:44 +08:00
Jérémie Dimino b06aad431e
Replace promote actions by diff actions + promote command (#421)
* Remove (promote ...) and (promote-if ...)
* Remove `--promote ...`
* Add (diff ...) and (diff? ...)
* Add `jbuilder promote` and `--auto-promote`
* Fix #423
2018-01-18 11:32:20 +00:00
Anil Madhavapeddy 8c403c467f docs: fix typos in manual 2018-01-17 08:17:55 +00:00
Jérémie Dimino 49edf8ed65
Accept correction files produced by ppx_driver (#415)
* Accept correction files produced by ppx_driver so that [@@deriving_inline] works
* Change promote-if so that it doesn't promote the file when the source file doesn't exist in the source tree
2018-01-16 12:28:02 +00:00
Jeremie Dimino d4dec9b4f5 Change the default of --promote from check to copy
As said in the PR. I forgot to push the commit.
2018-01-15 14:55:17 +00:00
Jérémie Dimino eab1ff6c7b
Add promote actions and include stanzas (#402)
Add a promote action that allows to copy over generated files as
source files and an include stanza allowing to include a file in a
jbuild file.
2018-01-15 13:24:25 +00:00
Christophe Troestler f8617b5721 Let "concat" or "split" be a quality of the variable (#336)
* Let variables say whether they are Concat or Split

To concatenate the contents of a split variable, put it in a string:
"${var} ".

Fixes #300

See also https://github.com/janestreet/jbuilder/issues/408

* Issue a deprecation warning for ${!...}

* Treat ${CC}, ${<}, ${^} and ${read-lines:...} as split vars

* Change ${!^} into ${^} for this project jbuild rules
2018-01-15 09:32:40 +00:00
Jeremie Dimino 8466924a73 Update doc 2017-10-14 10:37:36 +08:00
Jeremie Dimino 5de73ca740 Add support for locks in rules
This is to allow users define more complicated tests without having
to resort to -j1.
2017-09-29 12:20:08 +01:00
Jeremie Dimino 50cbbe2ac5 Add ${path-no-dep:...}
To be able to resolve path names that are not dependencies.
2017-09-29 11:55:23 +01:00
Jeremie Dimino 47d1f74ef0 Explain the difference between copy_files and copy_files# 2017-09-10 02:39:34 +01:00
François Bobot cecf0a2aaf Add (copy_files <glob>) stanza (#35)
Add (copy_files <glob>) and (copy_files# <glob>) stanzas. These
stanzas setup rules for copying files from a sub-directory to the
current directory.

This provides a reasonable way to support multi-directory
library/executables in jbuilder.
2017-09-10 02:31:07 +01:00
Jeremie Dimino 297e82061e Update_file --> Write_file
The difference is not meaningful anymore. Also expose Write_file as
write-file.
2017-08-17 15:13:11 +01:00
Jérémie Dimino 6bed864057 Better behavior when the targets of a rule already exist in the source tree (#218)
Warn when a file is both present in the source tree and generated by
a rule. Before, jbuilder would silently ignore the rule. One now has
to add a field `(fallback)` to custom rules to keep the current
behavior.
2017-08-15 11:16:11 +01:00
Jeremie Dimino b913a42739 Fix documentation about library dependencies 2017-08-08 13:56:28 +01:00
Jeremie Dimino 06b47a73f6 Do not accept per_file anymore
It was renamed per_module and it is planned to reuse per_file for
another purpose.
2017-08-04 09:24:02 +01:00
David Allsopp 13b0eb9f2b Convert link_flags to the ordered set DSL 2017-08-03 17:28:32 +01:00
David Allsopp ec29651cff Extend (:include ) form to js_of_ocaml flags 2017-08-03 17:28:32 +01:00
David Allsopp cebbb219e7 Extend (:include ) form to OCaml flags
flags, ocaml_flags and ocamlopt_flags now support the (:include ) form
of the ordered set language.
2017-08-03 17:28:32 +01:00
Jeremie Dimino 4b40cad247 Revert public_interfaces for now
The code to support it is starting to become increasingly complicated
and the number of problem found is a bit alarming.

We'll reinclude it later after a bit more testing and hopefully some
simplifications.
2017-07-21 17:32:39 +01:00
Jeremie Dimino 9893c14500 Fix some problems related to public_interfaces
The dependencies on library artifacts are now properly setup to point
to the files in _build/install/...

Moreorver, private interfaces are now only visible inside the library
itself and are only allowed for private libraries. When a project
defines multiple packages, this ensures that the visibility when all
packages are built simultaneously and when they are installed one by
one.

We can relax these restrictions later with a bit more work and a clear
definition of where private modules should be visible.
2017-07-21 16:52:28 +01:00
Jeremie Dimino 2b93f960b6 Doc tweaks 2017-07-19 15:31:17 +01:00
François Bobot a3933a2c18 Add public_interfaces selection for libraries (#106)
Add a field "public_interfaces" to library stanza listing which modules are public.

Private modules won't be accessible outside the scope where the library is defined.
2017-07-19 15:26:48 +01:00
Jeremie Dimino daeb40b087 Add SCOPE_ROOT
While analysing packages using jbuilder, I found that some packages
use ${ROOT} to refer to the root of the project. However, this doesn't
work as ${ROOT} depends on the workspace configuration.

Add ${SCOPE_ROOT} to make this easier for projects with a lot of
nested sub-directories.
2017-06-09 12:45:05 +01:00
Jeremie Dimino eb7b5e2be4 Help users to not use non-future proof features in jbuild files 2017-06-08 11:33:59 +01:00
Jeremie Dimino e4300e7b51 Make (run prog ...) behave the same as (run ${bin:prog} ...)
This just seems like a better default
2017-06-08 10:37:25 +01:00
Jérémie Dimino 2e2a707d4b Automatically install executable with extension `.exe` on Windows (#123)
- Automatically add exe extension when installing executables
- Look for local binaries with .exe extension on Windows
2017-06-08 09:59:43 +01:00
Jeremie Dimino e51002d1b7 Restrict what one can do with the OCaml syntax
Until we decide in what direction it should go.
2017-06-06 10:23:22 +01:00
Anil Madhavapeddy d279e1e25d docs: remove an extra set of brackets from the `select ... from` (#121)
Looks like the right syntax is `(select foo from (x -> y) ( -> y))`
from the example use in js_of_ocaml/compiler
2017-06-05 16:16:49 +01:00
Jeremie Dimino 2be5e593d6 rework the documentation of scopes 2017-06-05 12:33:45 +01:00
Jeremie Dimino a392b59fcd copy-and-add-line-directive --> copy# 2017-06-05 12:11:39 +01:00
Jeremie Dimino a677a6077e Add a note about byte-code executables (#108) 2017-06-02 18:54:45 +01:00
Jeremie Dimino a7446ec7d3 per_file --> per_module 2017-06-02 17:58:20 +01:00
Jeremie Dimino fd76d7b9a9 Remove (ml_of_mli ...) and (re_of_rei ...)
Instead make jbuilder print the rule to do the same in the warning
message. The rule is not that big. Also add a note about mli only
modules in the "Known issues" section of the README.

This avoids polluting the jbuild specification and is still a
reasonable solution until someone implements proper support for mli
only modules in the compiler.
2017-06-02 13:17:28 +01:00
Jeremie Dimino 5e06daa5b2 Rename (do ...) to (rule ...) 2017-06-01 16:53:55 +01:00
Rudi Grinberg f98072deb7 Doc tweaks (#112)
* Fix a link and some typos
* Fix some crappy formatting introduced by the pandoc conversion.
* Use more subheadings rather than points.
2017-06-01 16:02:29 +01:00
Jeremie Dimino 827aac0e43 Fix doc for (preprocess (per_file ...)) 2017-06-01 11:19:59 +01:00
Jeremie Dimino 1c8ffaa3aa Check that no targets are generated outside of the current dir 2017-05-31 10:34:17 +01:00
Jeremie Dimino 419df111bf Update doc 2017-05-30 17:10:50 +01:00