summaryrefslogtreecommitdiffstats
path: root/ocamlbuild
AgeCommit message (Collapse)Author
2015-02-08debugger, ocamlbuild, ocamldoc: separate their build from the compiler's.HEADmasterAdrien Nader
In other words: "make world" doesn't build the aforementioned tools anymore and they need to be configured and built separately. They are still in the same source tree. At first sight this should lead to more work but there are _several_ reasons for such a split. * It dissociates the builds and therefore the breakage when doing changes in the build system. * It makes changing one of them simpler. * It simplifies the Makefile files and removes some needs for the UNIX_OR_WIN32 variable. * It removes the Makefile.nt files and enables the build of the manpages on Windows too. * It builds these tools using the .opt variants when possible. This doesn't save that much time but it's nice nonetheless. * It's simpler to package for distributions which already split these tools to their own packages. * It simplifies cross-compilation by reducing the scope of the changes needed (i.e. I hope there won't be a need for more changes in the build systems of these tools). * It refers less to boot/ and should make bootstrapping at least a bit simpler (I can't tell how much but in any case it's not negative). As for the negative aspects: * Possibly more steps for compiler hackers in the "hot path". * A hand-written "configure_tool" script which creates a "Makefile.local" file which is include'ed from the Makefile files and which defines the invocation of the compiler and of other tools. After these changes, there are two ways to build the tools: whether OCaml is installed system-wide or not (i.e. "uninstalled" [ I'm not to be blamed for this terminology ]). If the compiler has been installed (typical for packagers): ./configure_tool debugger make -C debugger all If the compiler has not been installed (probably typical for compiler devs even though I'm not sure most don't disable the build of the tools when doing their development): UNINSTALLED_OCAML_DESTDIR=$(pwd)/lapin UNINSTALLED_OCAML_PREFIX=/usr ./configure_tool debugger make -C debugger all In the example directly above, UNINSTALLED_OCAML_PREFIX defaults to "/usr/local" (the default for the compiler build too) and must match. UNINSTALLED_OCAML_DESTDIR has no default and must be the same as the value used for DESTDIR when running "make install DESTDIR=$(pwd)/lapin" for the compiler. Providing an absolute path, while not mandatory, is saner. Comments are welcome on how to make the whole process more handy for you (yes, "you", the reader, whoever you are).
2014-12-27PR#5887: move the byterun/*.h headers to byterun/caml/*.h to avoid header ↵Gabriel Scherer
name clashes (Jérôme Vouillon and Adrien Nader and Peter Zotov) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15757 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21PR#6475: accept -o in ocamlc when compiling C filesGabriel Scherer
(Vincent Laporte, Peter Zotov) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15734 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21PR6695: Make sure the compiler only uses ASCII string functions.Gabriel Scherer
This should cover all places involving filenames in the compiler. There are a few more paths still using Latin-1 in other ways, e.g. in ocamldoc. From: Peter Zotov <whitequark@whitequark.org> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15727 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21PR#6625: pass -linkpkg to files built with -output-obj.Gabriel Scherer
(Peter Zotov) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15719 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-20ocamlbuild: use sets rather than list for cycle-checkingGabriel Scherer
I'm worried the previous algorithmically-naive implementation may behave badly on larger-scale projects. We still keep a list around to return results in the exact same order as previously. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15694 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-20ocamlbuild: refine circular dependency errorsGabriel Scherer
When reporting a circular dependency, refine the printed filenames to those that are really part of the cycle -- instead of those that happened to be traversed during the DFS that found a cycle. This gives much more readable error messages. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15693 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-17PR#6720: pass -g to C compilers when tag 'debug' is setGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15680 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-14ocamlbuild: explicit 'linkpkg' and 'dontlink(foo)' flagsGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15670 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13PR6712: Ignore (-traverse) common VCS directories in ocamlbuild.Gabriel Scherer
From: Peter Zotov <whitequark@whitequark.org> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15668 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-23PR#6640: add 'precious' as a builtin-useful tagGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15606 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-18ocamlbuild: add an explicit "infer" tag for menhir (Patch by Hugo Heuzard)Gabriel Scherer
This allows to prevent the --infer option from being passed to Menhir by using the negative tag -infer. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15598 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-16fix for ocamlbuild on cygwin cannot find ocamlfindGabriel Scherer
ocamlbuild should append .exe extension to filename when looking for executables and Sys.cygiwn is set (not only Sys.win32). From: algoriddle <szilvasy@gmail.com> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15577 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15merge branch 4.02 from release 4.02.0 to release 4.02.1Damien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03tell ocamlbuild about ocamldep's support of -openGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15469 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29merge changes of version/4.02 from r15121 to r15155Damien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev ↵Damien Doligez
15121) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06ocamlbuild: add no_alias_deps tag (patch by Daniel Bünzli)Gabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15055 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06PR#6495: also add unsafe_string tag to ocamlbuildGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15054 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06PR#6495: add a safe_string tag to ocamlbuild (patch by Anil Madhavapeddy)Gabriel Scherer
It kicks in for interface inference and compiler invocations. safe_string does also alter the output of inferred types if short_paths is used (since "bytes" is shorter than "string"), but this requires a change to the ocamldoc driver and isn't addressed in this PR. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15053 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06PR#6502: spurious warning on "use_menhir" tagGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15044 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-14PR#6482: ocamlbuild fails when _tags file in unhygienic directoryGabriel Scherer
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-06-05Reflecting commit 14958 on version/4.02:Xavier Leroy
Missing dependencies on the pack, causing parallel make to fail. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14959 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-04PR#5547: ocamlbuild reverts to using -no-ocamlfind by defaultGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14952 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-18PR#5371: a partial patch by Edwin Török to fix the FreeBSD failureGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14891 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-03ocamlbuild: only show backtrace in verbose modeGabriel Scherer
Building foo.cmo in an empty directory (so with in particular no foo.ml) currently returns the following output: > Solver failed: > Ocamlbuild cannot find or build foo.ml. A file with such a name > would usually be a source file. I suspect you have given a wrong > target name to Ocamlbuild. > Backtrace: > - Failed to build the target foo.cmo > - Building foo.cmo: > - Failed to build all of these: > - Building foo.ml: > - Failed to build all of these: > - Building foo.mly > - Building foo.mll > - Building foo.mli: > - Building foo.mly > - Building foo.mlpack > - Building foo.mli: > - Building foo.mly > Compilation unsuccessful after building 0 targets (0 cached) in 00:00:00. While the "Solver failed" part is nice and reasonably easy to understand, users report that the "Backtrace" part is confusing (it talks about files they don't know about) -- and it can be so large that the explanation above is completely hidden. This patch disables backtrace-printing by default; it is now only shown when some "-verbose N" (N starting at 1) argument is passed. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14732 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01Ocamlbuild: make log printing code tail-recursiveGabriel Scherer
Patch by Frédéric Bour git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14716 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29merge branch "safe-string"Damien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12fix some of the whitespace problems in the sourceDamien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12refine ocamlbuild/.depend for `make -jN` to work againGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14576 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-09Fix ocamlbuild installation directoryJacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14564 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07PR#6358: obey DESTDIR in install targetsGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14536 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-02Get rid of ocamlcomp.sh. The next step is to share all those common ↵Alain Frisch
declarations for calling the compilers from various places. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14521 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20PR#6184: ocamlbuild: `ocamlfind ocamldep` does not support -predicateGabriel Scherer
(patch by Jacques-Pascal Deplaix) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14476 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20PR#6187: Add a warning when using -plugin-tag(s) without myocamlbuild.mlGabriel Scherer
(Patch by Jacques-Pascal Deplaix) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14475 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20PR#6349: ocamlbuild.cm{o,x} must not be included in ocamlbuild.cm{a,xa}Gabriel Scherer
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
2013-12-12Un-bootstrapping of ocamlbuild: build it using a plain Makefile.Xavier Leroy
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14347 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-29Reverting the elimination of the ocamlcomp*.sh scripts, namely the following ↵Xavier Leroy
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-09-20build: replace ocamlcomp*.sh.Wojciech Meyer
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-15ocamlbuild: report location in Tags.acknowledge warningsGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14151 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15ocamlbuild: use Loc.print_loc for lexing errorsGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14150 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15ocamlbuild: rename 'mark_as_used' into 'mark_flag_used' and expose in PLUGINGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14148 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15ocamlbuild: track location information of tagsGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14147 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15ocamlbuild: a short location printing implementationGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14146 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15ocamlbuild: mark ocaml_lib's tag as usedGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14145 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15ocamlbuild: detect tags in _tags not used by any flag declaration (typos?)Gabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14144 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15minor typos in ocamlbuild/signatures.mliGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14143 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15ocamlbuild: deprecate warn_%c, warn_error_%c (replaced by parametrized tags) ↵Gabriel Scherer
and strict-sequence (strict_sequence) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14142 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15ocamlbuild: allow flag declarations to be marked as deprecatedGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14141 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15ocamlbuild: turn the flags.ml structure into a record to ease adding metadataGabriel Scherer
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