Commit Graph

105 Commits

Author SHA1 Message Date
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 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
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
Jeremie Dimino 6e64156913 Add target support
* Create targets from findlib toolchains by reading findlib configs
* Define targets inside workspace files
* Set cross compilation targets with -x argument
2018-01-01 22:34:41 +08:00
Rudi Grinberg 058643608c
Jbuilder exec rebuilt if possible option (#345)
Make jbuilder exec build its target

Jbuilder will now attempt to rebuild the target before executing it. This option can be turned off by passing in --no-build
2017-12-11 18:23:07 +08:00
François Bobot 13fed1f1ce
Merge pull request #339 from rgrinberg/fix-jbuilder-exec-utop
Fix jbuilder exec from sub dirs & utop
2017-12-01 13:41:21 +01:00
Rudi Grinberg 785beeafac
Add option to force running tests (#320)
Option to force running tests

The mechanism allows for forcing any alias, but only forcing tests is exposed to the user. Aliases are forced by deleting all the alias files that belong to a particular alias. The option for forcing tests is called --force.
2017-11-28 19:03:22 +08:00
Jeremie Dimino ce0ecaf9e0 Restore cwd before execve 2017-11-25 23:25:13 +08:00
Rudi Grinberg 0c2228e7bc
Refactor jbuilder exec path handling (#327)
There's no need for runcwd as initial_cwd is already defined somewhere. Add
Filename.analyze_program_name function to make the clearer.
2017-11-14 15:19:58 +08:00
Rudi Grinberg 9c8ecc9fbc
Improve jbuilder exec (#286)
* Improve jbuilder exec

When the path passed contianed to exec contains a '/', it will be interpreted
relative to the path of a build context (default context when absent)

* Update man page of jbuilder exec

* Add String.drop_prefix

* Make jbuilder exec understand relative/absolute paths

jbuilder exec will now interpret absolute paths as relative to the specified
build context. While relative paths will now be intepreted relative to the cwd
appended to the specified build context.

* Fix jbuilder exec /absolute/path

When the path provided to jbuilder exec is absolute, we should ignore the build
context for looking up the binary.

* Fix exec when ran outside of root

Previously, a call like $ jbuilder exec ./xxx --root=p would raise
an exception. Now ./xxx will be intepreterd relative to --root.

* Fix relative paths when jbuilder is ran outside of --root

* Simplify documentation for jbuilder exec
2017-11-07 21:41:09 +08:00
Rudi Grinberg e23f6fe8bb Use Alias.of_path over Path operations and Alias.make 2017-10-19 08:35:08 +08:00
Jeremie Dimino 30a914278e All aliases on the command line are recursive
Calling 'jbuilder build @path/x' always request the alias `x` in
`path` and all its descendant.

To implement that, change the build system interface to take an
arbitrary request as argument.
2017-10-14 10:37:36 +08:00
David Allsopp 0e46cdd4e3 Clflags.workspace_root needs to be absolute
Since the fix for #262 in 3fb19150 it is necessary for workspace_root to
be absolute. In particular, `jbuilder build -p foo` (which implies
`--root=.`) needs to evaluate what that root is.
2017-09-29 14:14:21 +01:00
Daniel Hillerström 267ea46c4d Fixed a typo in the documentation. 2017-08-06 11:04:57 +01:00
Rudi Grinberg b668d9189f Add a utop subcommand (#183)
Add a utop subcommand that build and execute a utop where all the libraries defined in the current directory are immediately available for interactive use.
2017-08-04 08:59:35 +01:00
Jeremie Dimino 2f801cf17f typo 2017-07-27 12:08:19 +01:00
Jeremie Dimino b1e140eef3 Add --destdir + document --destdir, --prefix and --libdir
Should help #202
2017-07-27 12:06:14 +01:00
Jeremie Dimino cfd43d5282 Simplify a bit the rules for installation of library files 2017-07-25 17:07:24 +01:00
François Bobot 747cf220c6 Install by specifying libdir for opam-installer
- change default findlib directory (ocamlc -where)
2017-07-25 16:44:14 +01:00
Jeremie Dimino 241f1204cb Really fix #137 2017-06-09 15:18:27 +01:00
Jeremie Dimino fff5763a53 Fix #137: fix hint when all missing libs are optional 2017-06-09 14:49:08 +01:00
Jeremie Dimino b74544919a jbuild_types.ml --> jbuild.ml 2017-06-02 14:32:05 +01:00
Anton Bachin e3d879dbd8 Fix some typos in command option docs (#117) 2017-06-02 10:51:32 +01:00
Jeremie Dimino 543354c070 Fix #115 2017-06-01 16:34:04 +01:00
Jeremie Dimino f210b32fd0 Improve the behavior of "jbuilder exec" on Windows 2017-05-31 14:41:45 +01:00
Jeremie Dimino f18afbf8aa Fix jbuilder exec for windows 2017-05-31 11:28:39 +01:00
Jeremie Dimino 65150b4166 Add -debug-backtrace 2017-05-29 14:18:07 +01:00
Jeremie Dimino c73b1f1fe3 Add a --no-buffer option
Following #107
2017-05-29 10:57:04 +01:00
Jérémie Dimino 73a4cef9f8 Move the context out of Action.t
And add it to the rule. It is never dynamic, so it is simpler this
way, we just set it in Super_context.add_rule.
2017-05-29 07:51:52 +01:00
Jeremie Dimino 35ba1bc0f1 Remove the dir field in Action.t
Simplify things for Build.progn
2017-05-26 18:34:49 +01:00
Jeremie Dimino f1f95cda37 Clarify --only-packages 2017-05-26 12:33:55 +01:00
Richard Davison 91d03de221 Add clean subcommand (#89) 2017-05-26 11:32:32 +01:00
Jeremie Dimino 4dd0de1723 Fix #72 2017-05-19 14:16:00 +01:00
Jérémie Dimino 0a2157919c Split more long lines in makefiles 2017-05-19 08:27:21 +01:00
Jérémie Dimino 42cb733c6a Remove --debug-{actions,rules}
They are superseeded by 'jbuilder rules'
2017-05-19 08:27:21 +01:00
Jérémie Dimino 00ddd7f7a2 Improve formatting 2017-05-19 08:27:21 +01:00
Jérémie Dimino fe30935fa2 Rename 'extract-makefile' to 'rules' 2017-05-19 08:27:21 +01:00
Jeremie Dimino d219020b2f added jbuilder extract-makefile 2017-05-18 19:05:01 +01:00
Jeremie Dimino 6f20a3d938 external-lib-deps now suggest an opam command 2017-05-18 14:31:31 +01:00
Jeremie Dimino b2a9d6dc51 Add: jbuilder installed-libraries --not-available 2017-05-17 14:56:53 +01:00
Jeremie Dimino b514644f9b Revert "Add support for hooks"
This reverts commit c937dc9183.
2017-05-09 15:11:09 +01:00
Jérémie Dimino c937dc9183 Add support for hooks 2017-05-09 08:18:10 +01:00
Jeremie Dimino cbc890dc5c Add the version to the exe 2017-05-08 17:19:27 +01:00
Jeremie Dimino add2a063c0 Detect the package name as topkg-jbuilder does 2017-05-08 16:56:21 +01:00
Jeremie Dimino 6d0c8198eb Substitute watermarks for jbuilder itself 2017-05-08 16:56:21 +01:00
Jeremie Dimino dce491e661 Add a subst command for watermarking files 2017-05-08 16:56:21 +01:00
Jeremie Dimino ef6be544a3 Keep the package context after parsing 2017-05-05 11:21:46 +01:00
Jeremie Dimino 83f686a821 Hint for mistyped targets 2017-04-25 16:22:17 +01:00