Commit Graph

37 Commits (98227477ec4fc30ae76b1dfd5abb254684dd1a9b)

Author SHA1 Message Date
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 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 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 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 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
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 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
Damien Doligez 3dd2fee2ee fix formatting of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12808 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-08-01 14:47:00 +00:00
Jonathan Protzenko bae01ace03 Only display the disclaimer about tags if the user specified a -show-tags switch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12456 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-15 11:28:52 +00:00
Jonathan Protzenko d2e4349855 Properly add the -for-pack flag when calling ocamlopt during the pack phase and fix #5084
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12438 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-07 13:11:36 +00:00
Damien Doligez c91db736b1 merge changes from 3.12.0 to 3.12.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 09:17:07 +00:00
Xavier Clerc ae90f26025 Support for findlib (N. Pouillard et al.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9549 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-22 14:46:27 +00:00
Xavier Clerc bcdf4082cf Support for parametrized tags (N. Pouillard et al.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9548 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-22 14:36:57 +00:00
Damien Doligez 1b8095f404 PR#4940: get rid of naked end-of-lines in string constants + add warning 29
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9512 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-07 15:15:07 +00:00
Nicolas Pouillard 5da04f8b51 ocamlbuild: Kill $Id$'s
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9173 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-03-03 16:54:58 +00:00
Damien Doligez 1f95b17570 merge changes from 3.10.2merged to 3.11.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-12-03 18:09:09 +00:00
Nicolas Pouillard 901e3bfa82 ocamlbuild: close the log file when cleanning and lauching the plugin.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9118 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-11-06 15:40:39 +00:00
Nicolas Pouillard 653f2273b8 ocamlbuild: normalize pathname and authorize absolute pathnames as dependencies.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8717 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-12-18 08:58:32 +00:00
Nicolas Pouillard 515851721f [ocamlbuild] Add statistics about parallelism.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8712 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-12-18 08:55:04 +00:00
Nicolas Pouillard c32b7dbb0e [ocamlbuild] ocamlbuild is no longer recursive by default.
You can still have a fine grained control using your _tags
file and the "traverse" tag.
There is no longer the "true: traverse" tag declaration by default.
To make ocamlbuild recursive use one of these:
  1) Give the -r flag to ocamlbuild.
  2) Have a _tags or myocamlbuild.ml file in your top directory.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8669 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-28 16:10:13 +00:00
Nicolas Pouillard 3a4356befd [ocamlbuild] Move some functions from Pathname to Resource and use Digest_cache.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8668 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-28 16:08:18 +00:00
Nicolas Pouillard 68072dfe87 [ocamlbuild] Implement default tags in a simpler way.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8666 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-28 16:06:13 +00:00
Nicolas Pouillard d0f6c03046 [ocamlbuild] Neither traverse the build dir (even if it does not starts with _) (PR#4410).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8624 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-26 13:27:03 +00:00
Nicolas Pouillard aeaed191ed [ocamlbuild] Don't try to remove link to build when the feature is off.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8612 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-22 18:58:20 +00:00
Nicolas Pouillard a4154feec7 [ocamlbuild] Make the log file live in the build directory (PR#4313).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8610 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-22 18:53:38 +00:00
Nicolas Pouillard 4be12009bf [ocamlbuild] Give Main.Exit_codes its own file.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8599 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-22 18:31:22 +00:00
Nicolas Pouillard 5bc8725446 [ocamlbuild] Better understand and revamp .depends generation and usage.
.depends  file  was  generated  by  an  ugly  rule  that executed the ocamldep
command  instead  of returning it for later execution. Moreover this execution
was  in  order to read the output and store as a side effect. By doing this it
was  more complicated to work with this command. Now the rule just returns the
command  to  execute  as  for  other  rules.  And  that's  clients  that wants
dependencies of a file that trigger the reading of this file.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8566 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-21 18:32:32 +00:00
Nicolas Pouillard 1e52ab65d7 [ocamlbuild] [ADDED] Add a clear distinction between resources ("a.byte", "a.ml"...) and resource_patterns ("%.byte", "%.ml"...).
There  is  now an abstract type to ensure that resource_patterns are not mixed
with  resources. Rules are now 'a gen_rules where 'a is the type of production
resources (either a resource or a resource_pattern).


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-21 16:40:28 +00:00
Damien Doligez 4167841b16 fusion de la version 3.10.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8416 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-10-08 14:19:34 +00:00
Nicolas Pouillard 8a8e9657e4 [ocamlbuild] See ChangeLog
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7951 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-03-01 14:40:11 +00:00
Nicolas Pouillard a3797d4d4a [ocamlbuild] Add the -documentation option
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7933 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-26 17:05:30 +00:00
Nicolas Pouillard 0105c80c6a [ocamlbuild] use_lib improvments. See the ChangeLog for more details
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7928 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-26 16:27:45 +00:00
Nicolas Pouillard ba936a66f5 [ocamlbuild] Add the -dont-catch-errors option
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7924 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-26 13:16:22 +00:00
Nicolas Pouillard fefcce073e [ocamlbuild] Use sanitize instead of sterilize. For details see the ChangeLog
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7895 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-22 15:56:23 +00:00
Nicolas Pouillard 824dc3994e [ocamlbuild] ocamlmktop, and thread tag in native code (see ChangeLog for more details)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7858 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-12 10:26:08 +00:00
Nicolas Pouillard 0368536e72 [ocamlbuild] some changes see ocamlbuild/ChangeLog
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7842 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-08 16:53:39 +00:00
Nicolas Pouillard 381e325c0f Add the ocamlbuild directory
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7823 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-07 08:59:16 +00:00