Commit Graph

337 Commits (6ee0712423af746a4b9e9f6789ff16a970a89486)

Author SHA1 Message Date
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 ce6e8eeb1c PR#6349: ocamlbuild.cm{o,x} must not be included in ocamlbuild.cm{a,xa}
The bug, reported by Jacques-Pascal Deplaix, was only in trunk -- it
appeared in the bootstrap->Makefile transition.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14471 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 13:31:44 +00:00
Xavier Leroy f65785ae55 Un-bootstrapping of ocamlbuild: build it using a plain Makefile.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14347 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-12 17:38:43 +00:00
Xavier Leroy 33f242aaea Reverting the elimination of the ocamlcomp*.sh scripts, namely the following commits:
14278
14277
14276
14176
14175
14173
14172
14171
14169
14168
14167
These changes need to mature on their own branch.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14329 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-29 13:04:38 +00:00
Wojciech Meyer 241585bc83 build: replace ocamlcomp*.sh.
This script was built from ocamlcomp.sh.in through sed and is called
instead of "ocamlc" (for instance).
It makes it possible to switch from "ocamlc" to "ocamlc.opt" without
changing anything in the Makefiles, only calling sed.

I couldn't cleanly make it handle both a compiler for the target and for
the build. Instead I'm replacing it and doing as much as possible
directly in the Makefiles.
I hoped it would reduce the number of shell invocations, which would
speed things up quite a lot on Windows but I still had to have at least
one since it's not possible to update a make variable from inside a make
rule: i.e. it's not possible to do X=a, build a.opt and update X to be
a.opt.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-20 00:22:38 +00:00
Gabriel Scherer d9a035fa65 ocamlbuild: report location in Tags.acknowledge warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14151 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:58 +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 e69107143d ocamlbuild: rename 'mark_as_used' into 'mark_flag_used' and expose in PLUGIN
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14148 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:52 +00:00
Gabriel Scherer bb514ec5ca ocamlbuild: track location information of tags
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14147 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:50 +00:00
Gabriel Scherer d70b93a252 ocamlbuild: a short location printing implementation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14146 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:47 +00:00
Gabriel Scherer 75beffa385 ocamlbuild: mark ocaml_lib's tag as used
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14145 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:45 +00:00
Gabriel Scherer b9a17966ce ocamlbuild: detect tags in _tags not used by any flag declaration (typos?)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14144 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:43 +00:00
Gabriel Scherer 98227477ec minor typos in ocamlbuild/signatures.mli
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14143 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:41 +00:00
Gabriel Scherer 7629d96d21 ocamlbuild: deprecate warn_%c, warn_error_%c (replaced by parametrized tags) and strict-sequence (strict_sequence)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14142 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:39 +00:00
Gabriel Scherer 0f968f11b2 ocamlbuild: allow flag declarations to be marked as deprecated
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14141 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:37 +00:00
Gabriel Scherer 53d1c7c63d ocamlbuild: turn the flags.ml structure into a record to ease adding metadata
I plan to add at least documentation and deprecation information to
each flagset, so structuring it as a record is important.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14140 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:35 +00:00
Gabriel Scherer 9d89a6b2a5 ocamlbuild: move show_documentation's implementation in the respective modules to improve encapsulation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14139 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:33 +00:00
Gabriel Scherer 955877a316 ocamlbuild: add a warn_error(X) parametrized tag to fully deprecate warn_%c, warn_error_%c
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14138 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:31 +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 dfc06e175c ocamlbuild: document most of the ocaml_specific rules
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:06 +00:00
Gabriel Scherer c19689fc93 ocamlbuild: add a free-form documentation field to rules
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14124 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:02 +00:00
Xavier Clerc e82104a755 Remove labltk from the distribution (will be available as a third-party library).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14077 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-09 09:32:00 +00:00
Xavier Clerc 83ca86dd23 PR#6166: document -ocamldoc option of ocamlbuild
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14076 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-09 08:52:42 +00:00
Gabriel Scherer b57aca60ad ocamlbuild: make -plugin-tags and -use-ocamlfind interact better
When both those features are used together, we use ocamlfind packages
instead of hardlinking unix.cmxa and ocamlbuildlib.cmxa during the
ocamlbuild plugin compilation. This helps to avoid double-linking
errors (with unix.cmxa and "-package unix") when -plugin-tags request
ocamlfind packages depending on unix (or ocamlbuild).

This change was designed and implemented in collaboration with Jun Maillard.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14069 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-06 11:36:32 +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 93f0dd4dad ocamlbuild: fix plugin rebuild when no target is given
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14027 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-20 16:02:39 +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 6929678509 ocamlbuild: polish the interaction between Param_tags.init() and plugin execution
Before this path, [Param_tags.init()] was run before
[Plugin.execute_plugin_if_needed()]. It had the downside of making
plugin compilation warn about any unknown parametrized tag present in
a _tags file, even those that would be defined by the plugin
itself. The fix is to [really_acknowledge] only the tags used for the
plugin compilation, and delay the full [Param_tags.init()] call to
after plugin execution.

This was discussed in detail in PR#5680, comment 0010186.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14015 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-19 07:42:36 +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
Gabriel Scherer 29e3dca2eb ocamlbuild: use all the tags applying to "myocamlbuild.ml" to compile the plugin
The long-term goal is to allow composability of myocamlbuild.ml
plugins, as discussed in PR#5680 and PR#6093. The current attempt is
to give to the myocamlbuild.ml all the tags that apply to it according
to the _tags file and other configuration options passed to
ocamlbuild. For example, if -use-ocamlfind is used, any
(true: package(foo)) or ("myocamlbuild.ml": package(foo)) line would
have the ocamlfind package `foo` usable from myocamlbuild.ml.

The present implementation has two downsides:

(1) Relying on _tags is a bit unpleasant because people that write
    (true: foo) lines do not expect it to get also applied to the
    plugin compilation (though in fact the previous implementation
    used "profile" and "debug" tags passed in this way). There might
    be case of build breaking because the (true: tags) passed make
    myocamlbuild.ml compilation fail. A workaround would be to add
    ("myocamlbuild.ml": -foo) for any problematic tag `foo` -- I don't
    expect this situation to happen in practice, but you never know.

(2) The general tags passed to the myocamlbuild.ml compilation have
    been rather arbitrarily set to (ocaml,program,link,byte)
    (or native). OCamlbuild doesn't really have tags to describe going
    straight from a .ml (or several) to an executable, as its usual
    rules enforce separate compilation and linking steps. This means
    that some ocamlbuild rule might misbehave due to the absence of
    the "compile" step, but in practice most tag-driven compilation
    options are such that the link-options are a superset of the
    compile-options, so this will still work in many case
    (in particular for ocamlfind packages). Long-term, it may be
    better to split myocamlbuild.ml compilation in the usual compile
    then link steps.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13999 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-13 11:43:16 +00:00
Gabriel Scherer c068aac93b ocamlbuild: move plugin second-run to the end of the initialization phase
If in the future we want to be able to use information from _tags when
compiling the myocamlbuild.ml plugin, we should compile the plugin
*after* the OCaml-tags rules of Ocaml_specific have been loaded
(OCaml_specific.init()). This patch does not change the plugin
compilation, but it delays it to the end of the initialization phase
to allow such future changes.

This means that the parsing of configuration files
(including traversing directories to find _tags files in depth) will
be done twice (once during the first run to compile the plugin, and
then once when run from the plugin). Of these operations, the only
that has user-visible consequences (and the first candidate to
performance degradations) is the hygiene checking, which we therefore
disable during the first run. Note that checksumming files is not
duplicated (it is done after the initialization phase).

Note that the semantics of _tags files in subdirectories is that they
are only ranging over files in that subhierarchy (even "true: foo"
lines do not apply to the files in ancestor or
sibling directories). This means that no _tags file in a subdirectory
can add tags to "myocamlbuild.ml". If performance of file traversing
ever was to become an issue, we could therefore skip it and read only
the root _tags file if present.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13998 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-13 11:43:14 +00:00
Gabriel Scherer c944d63422 ocamlbuild: really stop compilation after plugin compilation when -just-plugin is called
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13997 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-13 11:43:12 +00:00
Gabriel Scherer 9c568f1c4b ocamlbuild: portable -output-obj target names (e.g. foo.byte.obj is accepted if configured as so)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13988 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-06 18:55:21 +00:00
Gabriel Scherer 53d32510db ocamlbuild: remove the deprecated ~tags from ocaml_specific.ml, and warn on use
The parameter ~tags of Rule.rule has been ignored and deprecated for
a while, but our own code in ocaml_specific.ml was still using it --
confusing several plugin writers. This patch, inspired by a patch
proposal by Anil Madhavapeddy on PR#6059, also makes Rule.rule emit
a warning when this parameter is used. Anil originally removed it
completely from the interface, but I would like to avoid breaking the
compilation of plugin code.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13987 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-06 16:46:00 +00:00
Gabriel Scherer 8564a6e8c4 PR#5201: ocamlbuild: add --norc to the bash invocation to help Windows performances
This change was recommend by daweil on the bugtracker. According to
the Bash documentation, the option -c that is already passed by
ocamlbuild should already imply --norc, but daweil reported a 30%
performance speedup with this change anyway. I'm a bit surprised, but
this cannot hurt...

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13969 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-04 19:58:01 +00:00
Wojciech Meyer 747ece3fd6 PR#6109: Fix typos in ocamlbuild error messages
(Patch by Gabriel Kerneis!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13951 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-30 21:53:00 +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
Gabriel Scherer e94ecc00a4 ocamlbuild: fix typo for short_paths+infer_interface
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13873 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-04 14:00:57 +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
Wojciech Meyer fdf9cde11d build: select win32 variants of unix and graph for mingw.
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13856 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 12:58:34 +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
Gabriel Scherer f79d1a4e2d improve ocamlbuild API documentation (patch by Cristophe Troestler)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13786 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-16 17:04:29 +00:00
Gabriel Scherer 3ccc745b75 turn more (or) into (||) to please the new warning
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13708 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-28 12:16:10 +00:00
Gabriel Scherer 75b8c0184f PR#5933 type-specialize 'let compare = compare' on ints and strings
According to the reporter 'sliquister', type-specialized comparison
can nearly halve compilation time in some cases. This patch applies
type-specialization throughout the OCaml distribution sources, so not
all changes will have performance utility, but in this case I think
it's best to be consistent, as I see no downside to the change.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13410 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-19 07:22:12 +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 de1bc665c4 PR#5652: Fix duplicate tags
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13266 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-21 23:19: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 37bbb9bb16 Implement -syntax ocamlfind flag for ocamlbuild
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13262 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-19 10:44:19 +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 67101c77f3 PR#5652: Add support for camlp4 native plugin.
Patch by Hongbo Zhang!

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13260 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-19 10:44:17 +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
Xavier Clerc 75df311d02 PR#5891: support rectypes tag for mlpack (ocamlbuild)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13243 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-16 12:17:19 +00:00
Wojciech Meyer 5cb2518dd7 Implement memoization for expand_module to improve performance
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13240 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-16 07:36:07 +00:00
Wojciech Meyer d9fec1107d small renaming in the option doc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13239 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-16 07:36:06 +00:00
Wojciech Meyer 01e27644ba -which option for ocamlbuild
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13238 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-15 21:32:52 +00:00
Wojciech Meyer 9d51dccfae ocamlbuild should look for ocamlfind on the path not in the root directory
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13237 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-15 21:10:04 +00:00
Wojciech Meyer c133e90cf1 PR#5885: Fix: Incorrect rule for compiling C stubs when shared libraries are not supported.
Patch by Jérôme Vouillon!

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13233 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-14 07:43:49 +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
Alain Frisch 706f815450 #5864: add a find operation to Set.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13211 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-08 09:01:02 +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 cb09743fc5 Commit also .depend file for ocamlbuild Makefile.noboot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13190 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 00:33:29 +00:00
Wojciech Meyer 2a415d5ec0 Initial version of Makefile.noboot that does not depend on ocamlbuild being booted
Still requires some work, in particular:
* native build of ocamlbuild
* building Camlp4 still is not working
* not vpath leftover files break the further build

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13188 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 00:33:27 +00:00
Wojciech Meyer 51e74fff88 Remove old module from ocamlbuild bootstrap Std_signatures to tide up
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13187 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 00:33:26 +00:00
Wojciech Meyer 293bf33f1d Add 'K' class of warning tag to ocamlbuild
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13186 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 00:33:25 +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 7ce9e125d3 Removed sporious modules from .odocl
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13178 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-31 01:04:22 +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
Wojciech Meyer 655cf17e4e Revert "PR#5652: Try to use camlp4.opt if it's possible"
camlp4.opt works only with native plugins therefore the fix will break bytecode camlp4 plugins.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13167 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-28 18:19:27 +00:00
Wojciech Meyer 2ebc2c2790 Update reference file for the ocamlbuild tests - still need some more work
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13155 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-22 01:34:23 +00:00
Wojciech Meyer a3c8cd0170 Fix PR#5752.
Patch by Grégoire Sutre!

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13154 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-22 01:34:21 +00:00
Wojciech Meyer 1cfa222553 Fix test
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-22 01:34:20 +00:00
Wojciech Meyer 38dc96e0be Always store full path to ocamlbuild in a variable that is available to the sub-tests
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13152 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-22 01:34:19 +00:00
Wojciech Meyer 469ae8ae60 Use name of the the tools in high detail level logs, this helps comparing logs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13151 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-22 01:34:16 +00:00
Jonathan Protzenko e41b5df033 Add a strict_sequence flag to OCamlbuild.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13089 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-10 15:06:53 +00:00
Jonathan Protzenko 76f3646b12 Add a new bin_annot tag to OCamlbuild.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13088 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-10 15:02:56 +00:00
Damien Doligez 2f2f6b7a07 add missing copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13033 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-17 21:03:40 +00:00
Damien Doligez ca58e9f276 remove non-ascii chars
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13032 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-17 21:03:19 +00:00
Damien Doligez d2b0f14516 remove non-ascii chars
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13031 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-17 21:02:29 +00:00