Commit Graph

43 Commits

Author SHA1 Message Date
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
Jeremie Dimino 16d34f4a07 Add Which_program to know whether we are dune or jbuilder
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-28 11:23:10 +01:00
Jérémie Dimino f70b137640
Fix 'make install' (#839)
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-01 16:56:49 +01:00
Jeremie Dimino 39e74826f4 Simplify the parser
Replace the current generated parser by an ocamllex lexer + a simple
parser.

The new code is:
- much simpler and smaller
- shouldn't cause ocamlopt to stack overflow anymore on BSD systems
- slightly slower but not that much

Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-01 08:42: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
Rudi Grinberg 74a98b9caa Fix typo in opam-release target 2018-03-14 23:12:19 +08:00
Rudi Grinberg 5c80f85346 Add Makefile helper for making releases 2018-03-14 23:02:45 +08:00
Jérémie Dimino 8e4c9fce4c
Import the Sexp parser generator (#608) 2018-03-13 19:06:34 +00:00
Jérémie Dimino dfdb6c09f4
Allow to set the library path at configure time (#575)
This allow to drop the dependency on ocamlfind
2018-03-06 14:56:24 +00:00
Jeremie Dimino ebce85137d Update livedoc target 2018-02-27 11:06:45 +00:00
Jeremie Dimino 5e1a806846 Add a livedoc target in the Makefile 2018-02-27 10:25:04 +00:00
Jérémie Dimino 9e4cc84370
Refactor library management (#516)
Lib module
----------

We have a new module Lib that replaces Lib, parts of Lib_db and parts
of Findlib. It is used to manage all libraries (internal and
extrernal). Lib.t represent a completely resolved library, i.e. where
all the dependencies have been resolved. Lib.Compile is used to
provide what is necessary to build the library itself. Lib.Meta
provides what is necessary to generate the META file for the library.

We also have library databases represented as Lib.DB.t. A library
database is simply a mapping from names to Lib.t values and and
created from a resolve function that looks up a name and return a
Lib.Info.t. A Lib.Info.t is the same as a Lib.t except that
dependencies are not resolved.

A library database can have a parent database that is used to lookup
names that are not found in the current database. In practice we have
the following hierarchy:

1. For every scope, we have a library database that holds all the
   libraries of this scope. In this DB, a library can be referred by
   either it's name or public name

2. the parent of each of these databases is a database that holds all
   the public libraries of the workspace. In this DB libraries must be
   referred by their public name

3. the parent of this DB is for installed libraries

(1) databases are accessible via Scope.libs
    (Super_context.find_scope_by_{name,dir} sctx xxx)
(2) is accessible via Super_context.public_libs sctx
(3) is accessible via Super_context.installed_libs sctx

The dependencies of a library are always resolved inside the DB it is
part of. When we compute a transitive closure, we check that we don't
have two libraries from two different DB with the same name. So for
instance linting Base should now supported.

Jbuild.Scope_info
-----------------

Jbuild.Scope was renamed Jbuild.Scope_info

Scope module
------------

This replaces Lib_db. A Scope.t is now just a pair of a
Jbuild.Scope_info.t and a Lib.DB.t. Scope.DB.t is an object used to
lookup scopes by either name or directory.

We no longer have an external scope or special anonymous
scope. Instead one should use Super_context.installed_libs or
Super_context.public_libs depending on the context.
2018-02-20 11:46:10 +00:00
Jeremie Dimino 1588ce90f2 Update js_of_ocaml tests 2018-02-07 14:20:56 +00:00
Jeremie Dimino fae08c79be Allow to set the concurrency level from the config file 2018-02-07 12:11:27 +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
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
Jeremie Dimino 18d8cb847d Fix the test added in the previous commit 2017-12-18 13:30:49 +00:00
Rudi Grinberg d45db83387 Set default goal explicitly in Makefile
In case new rules are introduced in Makefile.dev
2017-10-29 17:40:48 +08:00
Jeremie Dimino 059e0dab66 Add an 'accept-corrections' target
To copy over all the .corrected files
2017-09-22 01:51:16 +01:00
Jeremie Dimino aca4cd47d2 Include Makefile.dev in Makefile
So that we can define a different default target while developping.
2017-09-22 01:50:59 +01:00
David Allsopp 7d1e0c47e2 Allow bootstrap.ml to be compiled (#221)
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
2017-08-16 16:08:03 +01:00
Jeremie Dimino edb4b8f73c Add a `make release` target
Should help with #192
2017-07-18 10:17:53 +01:00
Jeremie Dimino c1f00c95ad Use --dev for running tests
Otherwise we always have to recompile jbuilder for running tests.
2017-06-09 12:45:05 +01:00
Jeremie Dimino 9eb215055e Remove the use of (foreach ...) in doc/jbuild 2017-06-02 18:25:20 +01:00
Richard Davison 91d03de221 Add clean subcommand (#89) 2017-05-26 11:32:32 +01:00
Jérémie Dimino fe30935fa2 Rename 'extract-makefile' to 'rules' 2017-05-19 08:27:21 +01:00
Rudi Grinberg c0e0dfc107 Add doc target to test docs locally
Requires a local sphinx
2017-05-19 08:25:46 +01:00
Jeremie Dimino d219020b2f added jbuilder extract-makefile 2017-05-18 19:05:01 +01:00
Jérémie Dimino ba08f27678 Add a few more redirections
- with-{stdout,stderr,outputs}-to
- ignore-{stdout,stderr,outputs}
- variable ${null} for /dev/null or NUL on Win32
2017-03-13 08:10:59 +00:00
Jeremie Dimino 3aef1d6f3c Revert "Rename _build to _jbuild (#13)"
This reverts commit 89c15ca2c5.

Keep _build as the build directory until we get a better consensus.
2017-03-01 16:09:02 +00:00
Rudi Grinberg 89c15ca2c5 Rename _build to _jbuild (#13)
_build is already quite overloaded.
2017-03-01 13:37:05 +00:00
Jérémie Dimino e0a8e77614 Implement root lookup 2017-02-28 07:32:15 +00:00
Jeremie Dimino bad68218b9 Add a --workspace option 2017-02-27 15:07:37 +00:00
Jeremie Dimino 16c7f02375 Improve make install/uninstall targets 2017-02-27 12:06:59 +00:00
Jérémie Dimino 8d52cba130 Add support for a meta language in jbuild files 2017-02-26 12:38:36 +00:00
Jérémie Dimino a326842161 Update Makefile 2017-02-25 14:06:03 +00:00
Jeremie Dimino a0ce6a68aa Install all manual pages 2017-02-24 17:36:39 +00:00
Jeremie Dimino 9c6e367089 Add a development mode and cleanup the code 2017-02-24 12:19:02 +00:00
Jeremie Dimino bb996f696b Split bulding boot.exe and running it
This is to make development on jbuilder itself easier.
2017-02-23 10:04:16 +00:00
Thomas Refis f00fd49f0b 114.33+05 2017-02-21 17:13:30 +00:00
Jeremie Dimino 405971694c 114.20+69 2016-12-15 16:54:46 +00:00
Jeremie Dimino cdcd7e907f 114.20+69 2016-12-02 13:54:32 +00:00
Jeremie Dimino 583b55f527 findlib support 2016-11-13 11:13:47 +00:00