Commit Graph

47 Commits (203c444fd469961a6cfc5ff923859f97e67ba394)

Author SHA1 Message Date
Xavier Leroy 688d5a5915 Changed OCamlbuild's license to LGPL with static linking exception.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16294 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-28 13:18:34 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Gabriel Scherer 65bb607cd7 PR#6733: ocamlbuild .{byte,native}.so targets and runtime_variant(X) flag
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16105 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-10 05:51:25 +00:00
Gabriel Scherer 1d8e590c54 PR#6475: accept -o in ocamlc when compiling C files
(Vincent Laporte, Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15734 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 12:18:07 +00:00
Gabriel Scherer f3ebb28d90 tell ocamlbuild about ocamldep's support of -open
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15469 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 20:31:36 +00:00
Damien Doligez a18bc7950b merge changes of version/4.02 from r15121 to r15155
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 17:14:00 +00:00
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Gabriel Scherer e331dacf29 PR#6482: ocamlbuild fails when _tags file in unhygienic directory
ocamlbuild lazily traverses directory to build a vision of the
filesystem tree in which the build happens. During that traversals, it
parses any configuration file `_tags` it encouters. PR#6482 was caused
by the fact that the configuration-parsing code used the relative path
of the _tags file, which was correct at the time of traversal, but
stale at the time the lazy thunk was in fact forced (a Sys.chdir had
occured in between).

The first fix is to detect when relative paths become stale, and use
the correct absolute path in that situation.

The reason why this lazy thunk was only forced after a Sys.chdir is
that, at hygiene time, only the subtrees that are selected for hygiene
checking are forced. It is an unexpected behavior that non-hygienic
subtrees could remain unforced for so long (in particular, the
semantics of parsing a configuration file only much later in the build
process is more than unclear); this commit also removes this behavior
by always forcing the whole traversed subtree just before hygiene.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15000 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-14 14:44:53 +00:00
Gabriel Scherer 5c90eefd88 PR#6184: ocamlbuild: `ocamlfind ocamldep` does not support -predicate
(patch by Jacques-Pascal Deplaix)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14476 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 16:05:23 +00:00
Gabriel Scherer 5f67d82896 PR#6187: Add a warning when using -plugin-tag(s) without myocamlbuild.ml
(Patch by Jacques-Pascal Deplaix)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14475 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 15:54:10 +00:00
Gabriel Scherer 4c57668e9a ocamlbuild: use Loc.print_loc for lexing errors
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14150 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:56 +00:00
Gabriel Scherer 23803c2515 ocamlbuild testsuite: test -no-plugin and -just-plugin
The second test currently fails, because the plugin is not build if no
target is passed. This will be fixed shortly.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14137 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:29 +00:00
Gabriel Scherer c01593d18e ocamlbuild testsuite: minor style change
I just got bitten by a weird issue where the test I expected to run
was ignored, and never appeared in test runs. I just forgot the final
`()` parameter to the `test` function, and `foo;;` was perfectly happy
to accept an input of non-unit type. Now using explicits `let () =` to
avoid that issue in the future.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14136 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:27 +00:00
Gabriel Scherer dad0226a8f ocamlbuild testsuite: fix typo
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14135 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:25 +00:00
Gabriel Scherer 2c71c6fad4 ocamlbuild testsuite: implement negation in Match
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14134 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:24 +00:00
Gabriel Scherer 9636eeec44 ocamlbuild testsuite: preliminary step for an implementation of negation in Match
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14133 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:22 +00:00
Gabriel Scherer 525dae500e ocamlbuild testsuite: clean Match implementation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14132 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:20 +00:00
Gabriel Scherer 0e4b8c1691 ocamlbuild testsuite: add -no-ocamlfind to some tests
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:18 +00:00
Gabriel Scherer da9d0495c8 ocamlbuild testsuite: test modular plugin compilation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14130 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:16 +00:00
Gabriel Scherer 38e0fba827 ocamlbuild testsuite: fix the PrincipalFlag test
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14129 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:14 +00:00
Gabriel Scherer 34186b97d2 ocamlbuild testsuite: split level0.ml into internal.ml, findlibonly.ml, external.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14128 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:12 +00:00
Gabriel Scherer 89fe1e121e ocamlbuild testsuite: factorize the color-code magic
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14127 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:10 +00:00
Gabriel Scherer 0c83a6f7fa ocamlbuild testsuite: add a "requirements" field to skip tests we cannot run
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14126 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:08 +00:00
Gabriel Scherer cb1d7a036d ocamlbuild: get myocamlbuild.ml tags from a new -plugin-tag(s) option instead of _tags
The previous approach to use _tags to get tags to compile
myocamlbuild.ml had one irritating downside: it would also take the
tags of the (true: foo) lines, which are certainly not intended by the
user to be applied to plugin compilation as well.

These additional tags looked mostly harmless. Of course, it turns out
that there is one case where they're not: as the plugin compilation
command already links "unix.cma" with the plugin, a user having
`true: use_unix` or `true: package(unix)` in its _tags file would get
a plugin compilation error due to double-linking of unix.cmxa. This
caused a regression breaking build in some projects, which is not
acceptable.

The current approach of using a specific command-line option is a bit
more annoying for end-users (you have to retype it each time, or script
ocamlbuild invocation from somewhere else), so we expect it to get
less widely used. It is still interesting for OASIS for example, or
people already using a convenience wrapper (eg. corebuild).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14035 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-24 20:46:05 +00:00
Gabriel Scherer 2fa50bab5f ocamlbuild testsuite: minor fixes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14026 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-20 16:02:37 +00:00
Gabriel Scherer e8bef60f8d ocamlbuild testsuite: test modular plugin compilation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14016 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-19 07:42:39 +00:00
Gabriel Scherer 70026195b6 ocamlbuild testsuite: teset terminal colors when leaving ocamlbuild_test
(Patch by Gabriel Kerneis)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14003 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-13 15:34:07 +00:00
Wojciech Meyer 0e608bf1b0 PR#5547: Enable the "-use-ocamlfind" option by default
ocamlfind library management has been around for while and is
considered to be installed by default on any OCaml system. Therefore
it's safe to assume that the default behavior of ocamlbuild should be
to use new ocamlfind support normally enabled explicitly by
-use-ocamlfind flag. The -use-ocamlfind flag has now a status of
depreceation and instead new flag -no-ocamlfind causes ocamlbuild to
not try to use new set of parametric tags for supporting ocamlfind.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13938 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-27 00:02:13 +00:00
Gabriel Scherer 848eb19f50 PR#6058: have ocamlbuild add -thread for all "link" tags
The -thread option is only needed when creating a compilation unit
("compile" tag handled separated), or linking libraries into a final
program ("link";"program"). However, ocamlfind will fail with an error
if neither of -thread or -vmthread is passed into the command-line of
any linking step, such as when creating a cm(x)a archive. The present
fix enables the -thread option for all linking steps, which should fix
any -use-ocamlfind issue and be harmless in other cases.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13934 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-26 19:40:12 +00:00
Wojciech Meyer c631c7a1dd PR#6060: Add some missing compiler options to ocamlbuild. (Patch by Anil Madhavapeddy!)
* -short-paths is activated via the "short_paths" tag
* -principal is activated via the "principal" tag
* -strict_sequence now has a "strict_sequence" tag to alias the
  "strict-sequence" tag that was already there, to follow the
  convention of command-line options having dashes replaced by
  underscores.  It's easy to mess this up since incorrect tags
  are silently ignored by ocamlbuild.

Add test cases that check if principal and strict-sequence have
been passed, and tweak the test suite slightly to make it easier
to match on failing_msg output.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13859 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 23:28:18 +00:00
Gabriel Scherer 4cedfd24c1 [PR#6059, patch by Anil Madhavapeddy] add -output-obj rules and targets to ocamlbuild for byte and native code
Three corresponding targets are added:
%.byte.o   : bytecode object file
%.byte.c   : bytecode source C file
%.native.o : native code object file


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13849 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 08:34:42 +00:00
Gabriel Scherer e7a503dc2a PR#4502: ocamlbuild now reliably excludes the build-dir from hygiene check
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13794 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-17 13:12:40 +00:00
Gabriel Scherer 122caaf20b ocamlbuild: when tag "native" is set, use ocamlopt instead of ocamlc for .mli->.cmi
This was requested (with a patch proposal) by "jessicah" in
PR#4613. Given that the effect of such changes are hard to test,
I commit this in trunk only, not version-4.01, to give more time to
detect eventual problems.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13787 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-16 19:07:45 +00:00
Wojciech Meyer b7c2d04ac9 [ocamlbuild] Real time update of the tests, by flushing the channel after each test result.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13273 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-23 23:57:14 +00:00
Wojciech Meyer 26d9127a1e [ocamlbuild] Add some more tests for PR#4592 and PR#5752.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13272 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-23 23:40:19 +00:00
Wojciech Meyer 6d36ae6831 Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13264 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-19 10:44:23 +00:00
Wojciech Meyer f9fcc6892a Add test for new ocamlbuild -syntax option
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13263 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-19 10:44:22 +00:00
Wojciech Meyer e82f05c3ef ocamlbuild_test: Make root directory of tests before running them.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13261 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-19 10:44:18 +00:00
Wojciech Meyer 4c62de5d42 Use absolute paths in ocamlbuild_test.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13259 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-19 10:44:15 +00:00
Wojciech Meyer 2cb5131384 PR#4592: Add test case.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13256 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-17 07:34:58 +00:00
Wojciech Meyer a0a8b4b04f PR#5686: Add testcase.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13255 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-17 07:06:41 +00:00
Wojciech Meyer 7ce7cece56 added ocamlbuild test (fix for PR#5763) .
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13232 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-14 00:08:13 +00:00
Wojciech Meyer 4bc9fa5359 PR#5212: Fix: ocamlbuild does not warn for bad input
Patch by Ygrek!

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13193 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 04:53:51 +00:00
Wojciech Meyer 40dc45cb77 Add some test for ocamlbuild. Make ocamlbuild_test test function handle optional parameters and support expected failures
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13191 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 01:37:26 +00:00
Wojciech Meyer c05b5ccea7 ocamlbuild_test, remove test directory tree only if exists
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13185 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 00:33:23 +00:00
Wojciech Meyer d2335da36f More work on ocamlbuild testsuite.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13177 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-30 03:25:35 +00:00
Wojciech Meyer 21735ad375 New testing infrastructure for ocamlbuild (PR#5755)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13170 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-29 04:34:30 +00:00