Commit Graph

298 Commits

Author SHA1 Message Date
Rudi Grinberg 11890d2b8d Port quick start to dune syntax
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-05 16:19:51 +07:00
Etienne Millon 35ff6466de Remove path-no-dep syntax
See #944

Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-07-04 10:39:57 +02:00
Etienne Millon 628914fe28 Rename path to dep in dune files
See #842

Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-07-03 15:59:52 +02:00
Jérémie Dimino e6a5ef9508
Add the lib_root and libexec_root install sections (#947)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-03 10:49:18 +01:00
Rudi Grinberg b85cc53b43
Merge branch 'master' into update-migration 2018-07-03 00:11:29 +07:00
Rudi Grinberg 1385e2046b s/jbuilder/dune/ in sphinx config
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-02 18:39:23 +07:00
Rudi Grinberg 8ed1b32ed2 Update table of renamed vars in docs
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-02 18:37:13 +07:00
Etienne Millon 2f5ac86c71 Rename jbuilder to dune in docs
This applies to the program name in text as well as CLI commands, but
not to existing jbuilder files.

Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-07-02 10:02:01 +02:00
Rudi Grinberg f163f6197a
Merge branch 'master' into rename-build-profile 2018-07-02 13:45:00 +07:00
Rudi Grinberg 5f6e0f658f Update doc/changes regarding %{profile}
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-02 12:55:48 +07:00
Jeremie Dimino 81bcd0f3e1 Add a "default" alias defined as follow:
- if "default" is specified by the user explicitely, use this
  definition
- otherwise assume the following definition:

  (alias
   (name default)
   (deps (alias_rec install)))

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-01 21:50:44 +01:00
Jeremie Dimino 30db63ef71 Support @@alias to build an alias non-recursively
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-01 21:50:44 +01:00
Wilfred Hughes ca424fb3a8 Fix typo
Signed-off-by: Wilfred Hughes <me@wilfred.me.uk>
2018-07-01 15:27:18 +01:00
Jeremie Dimino 744430b684 Update doc
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-01 01:46:32 +07:00
Jérémie Dimino 7e79e2870d
Make the set language more future proof (#930)
- forbid list starting by an atom not starting with - or :
- allow to avoid the toplevel parentheses in dune files

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-29 21:11:47 +01:00
Jérémie Dimino 793a0b7c17
Fix the build on 4.02 by emulating -no-keep-locs (#927)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-29 07:40:02 +01:00
Jeremie Dimino 2982567639 Make the default build profile be dev
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-28 11:23:10 +01:00
Rudi Grinberg ec14661a01 Update tests for new variables syntax
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 09:48:35 +06:30
Rudi Grinberg 2257a2057b Add templates to Usexp.t directly
Templates are now directly in dune's sexp language. The syntax is change to %{}
from ${} and $(). Old templates are still supported in jbuild files.

Other changes in this PR:

* Removal of ! patterns in variables
* Strict expansion for templates in dune files. Missing vars are now an error
* Using the correct syntax to parse included files in dune
* Improvements to the tests
* Syntax aware pretty printing of sexps. Now you must pass Dune vs. Jbuild to
  print sexps

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 09:46:10 +06:30
Jérémie Dimino 0f68e56f64
Remove most useless parentheses from the syntax (#915) 2018-06-27 16:38:05 +01:00
Rudi Grinberg e53f838ceb
Merge branch 'master' into migration-manual 2018-06-25 15:58:39 +06:30
Rudi Grinberg f36fd54017 Add migration page to manual
This includes the old migration page + a simple migration check list

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-25 15:07:28 +06:30
Jeremie Dimino f46a6aae53 Make (diff ...) work on Windows
- make (diff ...) trailing cr on Win32
- add a (cmp ...) action for comparing binary files
- add a test and run it in AppVeyor

Fix #844

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-25 08:14:27 +01:00
Jérémie Dimino 0eb302252e
Improve the syntax of ppx rewriters and flags (#910)
- old syntax: (pps (ppx1 -arg1 ppx2 (-foo x)))
- new syntax: (pps ppx1 -arg ppx2 -- -foo x)

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-25 07:56:35 +01:00
Jérémie Dimino 94c921f9c4
Rename files_recursively_in to source_tree (#899)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-20 10:45:54 +01:00
Ryan Slade b53ec85819 Fix typo (#890)
Signed-off-by: Ryan Slade <ryanslade@gmail.com>
2018-06-18 11:40:14 +01:00
Etienne Millon 96b01c569c Add link_deps field
In some cases, the linking step requires some dependencies. For example,
passing a version script to the linker. The new `(link_deps)` field
uses the dependency DSL already used in other places.

Closes #852

Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-06-13 14:38:47 +02:00
Jérémie Dimino 3cf2a0dab1
Add dune-project files to dune tests and remove old jbuild_version stanzas (#875)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-12 09:49:39 +01:00
Rudi Grinberg 17b04584b2 Give menhir its own section in the docs
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-07 17:57:10 +07:00
Jeremie Dimino b35fbbd7b2 Abstract the ppx driver system
- remove hard-coded knowledge of ocaml-migrate-parsetree and ppx_driver
- get the exact driver parameters directly from the driver itself

Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-05 19:19:10 +01:00
Jeremie Dimino 2d1ca05e67 Update the documentation of S-expressions
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-04 13:57:27 +01:00
Rudi Grinberg e1cc944a93 Add an entry for custom build directories to the manual
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-02 18:30:06 +07:00
Etienne Millon 4ab291d0b8 Fix sphinx warnings (#835)
* Fix markup
* Fix links
* Fix references
* Fix leading space
* Add missing code markup

Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-06-01 14:24:35 +01:00
Etienne Millon 98b3e07efa Add an example for jbuilder utop
This clarifies the use case. This replaces the emacs flag with something
more likely to be used in a shell session: implicit bindings.

Closes #727

Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-05-29 13:24:24 +02:00
Jérémie Dimino 1860438605
Add a jbuilder transition package (#796)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 18:19:30 +01:00
Tim Cuthbertson 9265ac87d9
Fix typo 2018-05-21 21:29:18 +10:00
Jeremie Dimino 9fbfc272eb Fix typo in doc 2018-05-16 17:05:14 +01:00
Jeremie Dimino ea9e1f94b6 Fix broken link 2018-05-14 12:56:47 +01:00
Jérémie Dimino bc19e14b35
Add ignored_subdirs stanza (#767) 2018-05-12 15:38:22 +02:00
Marc Lasson 0705a6647a Fix broken links in faq.rst (#768) 2018-05-12 11:25:28 +02:00
Jérémie Dimino 4d8ca489be
Add support for environment & build profiles (#419) 2018-05-04 16:49:25 +01:00
Jeremie Dimino dabb77eb09 Rename all jbuild.inc files 2018-05-04 12:26:26 +01:00
Jeremie Dimino dc0a6d4401 Rename all jbuild files 2018-05-04 12:26:26 +01:00
Tim McGilchrist 4505907ef3 Spelling (#742)
s/whish/wish
2018-05-03 11:08:33 +01:00
Jeremie Dimino db91543e3f Support version stanzas in dune-project files 2018-05-03 11:07:45 +01:00
Jérémie Dimino 325584adfc
Renaming to Dune (#721)
- install two identical binaries: jbuilder and dune
- rename the man pages to dune-*
- change the name in man pages
- change the name of libraries
- add support for dune-project files and add a dune-project file
- add support for dune-workspace files
- start updating the manual
- update the tests
2018-05-02 12:56:12 +01:00
Christophe Troestler 7e1b521d7b Add Configurator.V1.write_flags
See https://github.com/ocaml/dune/pull/696/files#r181721525
2018-04-17 16:07:38 +02:00
Rudi Grinberg 620bffd21b Add , for lists 2018-04-12 09:12:56 +07:00
Rudi Grinberg 0d9669f907 Add link to .mli as a stand in for the api docs 2018-04-12 00:05:44 +07:00
Rudi Grinberg 9673d4eaf9 Switch jbuilder in library names 2018-04-11 23:50:23 +07:00
Rudi Grinberg 320154ef87 italicize running 2018-04-11 23:50:16 +07:00
Rudi Grinberg fb0ac48af2 Documentation for new configurator 2018-04-11 22:14:53 +07:00
Matthieu Dubuget 9aba597f5f Update documentation.rst (#656)
Typo
2018-03-27 10:54:09 -04:00
Rudi Grinberg 10ff816faf
Merge pull request #641 from rgrinberg/move-readme-manual
Move FAQ & Known Issues to manual
2018-03-21 00:14:17 +08:00
Rudi Grinberg 95a617ec63 Remove old api-doc page
And incorporate it into the new documentation page
2018-03-20 23:25:24 +08:00
Rudi Grinberg 67d0c03a54 Move FAQ & Known Issues to manual
These sections are valid parts of the manual and just clutter up the current
README
2018-03-20 22:47:36 +08:00
Rudi Grinberg 86f918df71 Clarify about index.mld
This isn't odoc specific
2018-03-20 08:22:19 +08:00
Rudi Grinberg 24a0604249 Clarify hand written vs. additional pages 2018-03-20 08:16:30 +08:00
Jeremie Dimino 45fa214314 typo 2018-03-18 19:17:15 -04:00
Rudi Grinberg 0f2cf323df Fix the title of tests.rst 2018-03-19 03:32:55 +08:00
Jeremie Dimino f26615e5b3 doc 2018-03-19 01:24:27 +08:00
Rudi Grinberg 73231bf13e Add documentation documentation 2018-03-18 18:24:40 +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
Jérémie Dimino 1feab6b2a6
Allow to specify additional libraries for the test runner (#600) 2018-03-09 19:51:02 +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
Saswat Padhi af76ecb6a0
Fixed a small typo 2018-02-21 20:29:48 -08:00
Christophe Troestler 75ad9736f8 Move usexp in src/ as it diverged from parsexp 2018-02-15 00:43:08 +01: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
Jeremie Dimino 3347d4d59f Regenerate doc/jbuild 2018-02-07 12:11:27 +00:00
Jérémie Dimino 0570e09f9a
Add a configuration file and a quiet mode (#490) 2018-02-07 11:38:21 +00:00
Jérémie Dimino 437211f74f
Expose the promote mode (#437) 2018-01-25 19:07:46 +00:00
Louis Roché ecccd90196
doc: fix link to ocaml-cross organization on github 2018-01-25 05:40:05 +00:00
Rudi Grinberg 58f9e9840c Replace janestreet/jbuilder with ocaml/dune
Update all links where necessary
2018-01-23 17:52:44 +08:00
Jeremie Dimino 748da3433a Update urls for the opam-cross-x repositories 2018-01-22 09:45:43 +00:00
Jérémie Dimino 9dd5ab74e4
[WIP] Load rules lazily (#370)
* Change jbuilder to load rules lazily

Rules are now loaded on a per directory basis as needed. This speed up
the start up time on large workspaces.

Does various refactoring as well.

* Simplify the handling of META files

We no longer generate a META.foo.from-jbuilder file. Nobody is using
this feature and it's making the new code more complicated.
2018-01-19 08:50:06 +00: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 2b49123ae1 Update documentation to reflect cross compilation
Describes how to setup targets and toolchains and the changes to the workspace
syntax.
2018-01-01 22:34:41 +08:00
Rudi Grinberg a265889400
Mention ppxfind in docs (#357) 2017-12-11 19:40:54 +08:00
Ian Denhardt b5ba49d9b4 Clarify use of the .exe extension
.exe for executables is usually a windows-only convention; this threw me
for a moment and it seems worth calling out that this isn't platform
dependent.
2017-10-25 15:10:32 -04:00
Rudi Grinberg a63276f5b3 Merge pull request #268 from janestreet/new-alias-semantic
Sort out recursive/non-recursive aliases
2017-10-19 15:33:23 +08:00
Rudi Grinberg f9025a401a Document utop command 2017-10-14 18:50:37 +08:00
Jeremie Dimino 8466924a73 Update doc 2017-10-14 10:37:36 +08:00
Rudi Grinberg 97511eb77b fix header for "running tests" 2017-10-10 16:15:50 -04: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 8383a00e4c Generate man page for 'jbuilder utop' 2017-09-29 11:28:01 +01:00
Jeremie Dimino cc0bf2dfb7 Rephrase the doc for (merlin) in jbuild-workspace
Related to #257
2017-09-22 12:20:22 +01:00
Jeremie Dimino 157e4d6548 Print "Entering directory '...'" when necessary
When the root of the workspace is not the current directory, print:

  Entering directory '<absolute path to root>'

This way editors such as emacs or vim knows how to interpret filenames
reported by the compiler.

Fixes #138
2017-09-22 01:59:45 +01:00
Jeremie Dimino b2e7720b41 Interpret empty jbuild-workspace files as default configuration
If a workspace file is empty, interpret it the same as if it contained:

  (context default)

As discussed in #234
2017-09-22 01:59:45 +01:00
Jeremie Dimino 47d1f74ef0 Explain the difference between copy_files and copy_files# 2017-09-10 02:39:34 +01:00