Commit Graph

612 Commits (295684568142aa3df72075346d8c9b306e43a1e0)

Author SHA1 Message Date
Nicolás Ojeda Bär 9eda39597a Remove explicit dependencies 2019-01-12 20:50:36 +01:00
Nicolás Ojeda Bär 0998b3ac4e Remove unnecessary compilation rules 2019-01-12 08:59:34 +01:00
Nicolás Ojeda Bär fe617f638f Remove unnecessary ocamldep call 2019-01-12 08:57:12 +01:00
Nicolás Ojeda Bär 8cc9013688 Do not call ocamldep on non-existing files 2019-01-12 08:57:12 +01:00
Gabriel Scherer 46ef054330 Makefiles: restructure CAMLDEP usage to easily add flags
This change should be a refactoring no-op.

Before, a DEPFLAGS variable existed in some makefiles to contain
include directories to be passed to ocamldep invocations, but no
support for easily adding command-line flags to ocamldep was available
(invocations would systematically use -slash, which was duplicated
across callsites).

With this PR, a new DEPINCLUDES variable contains the include
directories, and DEPFLAGS is repurposed to contain other command-line
flags for the tool -- currently "slash".
2018-12-12 09:30:55 +01:00
David Allsopp a875e64571 Missing clean items from GPR#1063 2018-12-06 18:14:38 +00:00
Thomas Refis af328e176b
remove typedtreeMap (#2173) 2018-11-29 15:51:45 +01:00
Rodolphe Lepigre ca227428f4 Typedecl: split immediacy to a separate unit Typedecl_variance
get_unboxed_type_representation is used in several other modules, and
split into its own Typedecl_unboxed unit.

(pair-programming with Gabriel Scherer)
2018-11-23 12:05:33 +01:00
Gabriel Scherer 24ea989c02 Typedecl: split variance to a separate unit Typedecl_variance
(pair-programming with Rodolphe Lepigre)
2018-11-23 12:05:33 +01:00
Gabriel Scherer 0e0b10fd75 Typedecl: split abstract properties to a separate unit Typedecl_properties
(pair-programming with Rodolphe Lepigre)
2018-11-23 12:03:11 +01:00
Gabriel Scherer f6837be875
Merge pull request #2151 from fpottier/improvements
Parser improvements, with a possible bug fix along the way.
2018-11-22 08:23:58 +01:00
Thomas Refis 5daea80728 fix partialclean for compdynlink_common (review and approved by mshinwell) 2018-11-20 15:46:48 +00:00
Thomas Refis aa77d3b93d
fix dune build following natdynlink modifications (#2154)
- silence some principality warning in otherlibs/dynlink
- shared some script between the makefile and the dune files
2018-11-20 15:06:47 +01:00
François Pottier de8df5dbb0 Exclude `boot/menhir/parser.{ml,mli}` from the list of source files
used by `make build-all-asts` and related commands.

Indeed, the idea is to check that the ASTs do not change when the parser is
modified -- the parser's source itself, if included, would always produce a
false positive.
2018-11-20 11:52:47 +01:00
Mark Shinwell 690116890e Various Makefile / dependency fixes 2018-11-15 10:42:49 +00:00
Mark Shinwell 960cef2e7d Fix makefile problems 2018-11-14 16:20:06 +00:00
Mark Shinwell a4c88eab27 Fixing dynlink makefiles 2018-11-14 13:10:08 +00:00
Mark Shinwell 6526a0c3d9 Make (nat)dynlink sound 2018-11-12 17:44:26 +00:00
Gabriel Scherer d4959ae5ff Makefile: reuse new rules of otherlibs/Makefile 2018-11-12 16:28:01 +01:00
Gabriel Scherer cbefaee438 minor typo fix 2018-11-09 20:37:03 +01:00
Alain Frisch 7baf33d6ad
Fix PR6638: add dedicated wrning for "unused open!" (#1110) 2018-11-09 13:41:34 +01:00
alainfrisch 0d968e357b Move variable printer to Pprintast
- The code responsible for printing Syntaxerr errors is moved to the
  Parse module (so that it can depend on the variable printer in
  Pprintast).

- Pprintast becomes a dependency for a few tools that link some
  compiler modules in an ad hoc way (they would better be implemented
  in terms of compiler-libs).
2018-11-06 13:12:54 +01:00
Thomas Refis e292cb97c5 correctly register dependencies 2018-10-11 17:13:22 +01:00
Thomas Refis d68e0e2077
Provide a way to build the bytecode compiler using Dune (#2093) 2018-10-10 16:16:00 +01:00
Mark Shinwell 2b5f13c913 GPR#2056 (Backend_var) 2018-09-28 17:59:01 +02:00
Sébastien Hinderer 132b3a151d
Get rid of the standard_runtime configuration variable (#2066)
This configuration variable was formerly used by the -make_runtime and
-use_runtime option but this is no longer the case.
2018-09-25 15:29:18 +02:00
Sébastien Hinderer ba6362a07d Move config/Makefile to Makefile.config
In order to prepare the transition to autoconf, this commit moves the
configuration Makefile out of the config directory which will disappear
and gives it the name it will have once intstalled, namely Makefile.config.
2018-09-17 14:23:35 +02:00
David Allsopp 6fab940f38 Export SUPPORTS_SHARED_LIBRARIES in ocamlc -config 2018-09-13 13:40:17 +01:00
Gabriel Scherer ef00dc7317 remove experimental/
This subdirectory was used to store experimental patches on some older
version-control system where branching (or discussing branches?) was
inconvenient. It doesn't make much sense anymore now, and getting rid
of it simplifies a couple places that had to grow around it.

Suggested-by: Nicolás Ojeda Bär

(no change entry needed)
2018-09-08 16:53:08 +02:00
Gabriel Scherer e024eeecd8 Makefile rules to test parser changes by comparing -dparsetree output 2018-09-08 12:24:29 +02:00
David Allsopp b069f692b4 Remove space from end of FLEXLINK_ENV 2018-09-07 08:34:53 +02:00
David Allsopp ad07b6d9b5 Use $(addprefix ...) and spacing adjustments 2018-09-07 08:34:53 +02:00
David Allsopp 4756a576f0 Move FLEXLINK_ENV definition to Makefile.common 2018-09-07 08:34:53 +02:00
David Allsopp 171a97407d Harden flexlink.opt target
If an error occurs while making flexlink.opt, the bytecode image was not
restored. It's now restored even if an error occurs while building the
native code image.
2018-09-07 08:34:53 +02:00
David Allsopp c13c200f87 Standardise setting and use of OCAML_FLEXLINK
Some Makefiles were using export to set OCAML_FLEXLINK "globally" while
others set a variable FLEXLINK_ENV and set the environment explicitly.

All Makefiles now use FLEXLINK_ENV and also only invoke it on linking
commands (rather than, for example, all invocations of ocamlopt).
2018-09-07 08:34:53 +02:00
Gabriel Scherer 9e84a038cb Makefile: make the parser.mly timestamp heuristic more robust
Reviewed by Sébastien Hinderer.

(no change entry needed)
2018-09-06 12:17:17 +02:00
Gabriel Scherer 51912516fa [minor] documentation improvements for Makefile.menhir 2018-09-06 11:10:48 +02:00
octachron 075bf9bed6 doc: remove unprefix trick 2018-09-03 13:59:32 +01:00
Gabriel Scherer a0d2aeb7e1 Menhir update test: use POSIX (find .. -prune -newer) instead of bash's -nt 2018-09-02 12:04:05 +02:00
Gabriel Scherer cbb92d2817 remove unused ocamlyacc dependencies, never put it in boot/ 2018-09-01 23:17:06 +02:00
Gabriel Scherer ac265e9ea3 (minor) remove unused CAMLYACC variables 2018-09-01 23:17:06 +02:00
Gabriel Scherer d09349f631 rename parsing/parser_menhir into parsing/parser 2018-09-01 23:17:06 +02:00
Gabriel Scherer e6ecea4008 remove the yacc parser
The large diff in boot/menhir/parser_menhir.ml comes from the fact
that the token list is now included in it, instead of being merely
a reference to the yacc parsers' Parser.token type.
2018-09-01 23:17:06 +02:00
Gabriel Scherer f571282d7d menhir parser: rename MenhirLib into CamlinternalMenhirLib
The goal of this change is to avoid conflicts encountered by
compiler-libs users that would also use their own MenhirLib runtime
for their own parsers.

I first tried to implement a solution to this module-name-conflict
issue using module aliases and -open, but this proven too fragile and
too difficult to get right.
2018-09-01 23:17:04 +02:00
Gabriel Scherer cbea1b6b69 menhir parser: move .mlyp to .mly, no cpp step anymore 2018-09-01 23:17:04 +02:00
Gabriel Scherer fc89685a17 Makefile: emit a warning if parser_menhir.mlyp is more recent 2018-09-01 23:17:03 +02:00
Gabriel Scherer 9a38c848fc Setup and use a Menhir parser for the OCaml grammar (REBASE POINT)
Uses the new $symbolstartpos feature of Menhir
to get locations identical to the OCamlYacc ones.

REBASE POINT: at the point of this commit, using a diff program
on parser.mly and parser_menhir.mlyp should give identical results
after the header code. If you rebase the Menhir-parser patchset
against a newer ocamlyacc parser (parser.mly), those two files
will have diverged, and you need to merge the parser.mly change
back into parser_menhir.mlyp -- and then deal with them in the
rest of the patch series.
2018-09-01 23:17:03 +02:00
Drup abc0b7e3ed Add compile_common.ml which contains the basic compilation pipeline.
Factorize the part from compile.ml and optcompile.ml.
2018-07-27 15:07:43 +02:00
Xavier Clerc 7e29162582 Pass the elements from `BUILD_PATH_PREFIX_MAP` to the assembler (#1930) 2018-07-27 12:25:23 +02:00
Gabriel Radanne 1be47bf7ab Just some tbl things. (#1699) 2018-07-23 13:19:41 +01:00