Commit Graph

177 Commits (55973d1203e290709f30dcda443311fac0e371e1)

Author SHA1 Message Date
Sébastien Hinderer 8087f7f1c5 Build system: simplify installation rules
Now that programs are built with their $(EXE) suffix, their installation
rules can be simplified a bit because most of the programs get installed
under the name they have been built with.
2020-06-18 11:16:58 +02:00
Sébastien Hinderer bdd9ca391e Add the $(EXE) suffix to all programs at build rather than install time
This commit touches neither boot/ocamlc nor boot/ocamllex

It has the side-effect of fixing the cleanup rules which did not use the
$(EXE) extension when removing a file although it was produced with the
$(EXE) extension.
2020-06-18 11:16:55 +02:00
Sébastien Hinderer 433485b8b5 ocamldoc: remove debugging facility 2020-06-09 12:30:44 +02:00
Gabriel Scherer fab58a938a makefiles: move the inclusion of Makefile.build_config in Makefile.common 2020-05-06 12:10:02 +02:00
David Allsopp ac2a9dd188 Cease committing C dependendency information
When building for the first time, the only requirement is that generated
header files have been built (jumptbl.h, version.h and opnames.h).
Detailed dependency information is only required when headers have been
edited.

COMPUTE_DEPS in Makefile.config controls whether C dependency
information should be generated on a per-file basis. This variable is
controlled by a new --disable-dependency-generation in configure which
is enabled for Git checkouts and disabled for tarballs (i.e. releases).

The Microsoft C compiler (cl) cannot generate dependencies in a
consistent way which we can consume, so for a Git checkout configure
searches for an additional C compiler in order to compute dependencies.
This is obviously not required for a user-build.

As a result, the MSVC port can now safely run make alldepend, since only
OCaml dependency information is committed to the repo after this change.

CI does not need to waste time testing the dependency information,
because it only tests a single build. A single Travis job has been added
which tests the build system code to generate the dependency information
(and provides a single `make -j` run in CI, although Inria's CI also
tests parallel building continuously).
2020-04-17 14:11:22 +01:00
David Allsopp 3a40b2fd94 Introduce Makefile.build_config.in
This moves the configure-generated parts of Makefile.common to a
separate (generated) Makefile, allowing Makefile.common to be a normal
Makefile.

OCaml's build system Makefile's now include Makefile.build_config (which
itself includes Makefile.config) but Makefile.config is still installed
as before. This allows configure to generate variables which are
specific to the build process and are not intended to be exported to the
installation.
2020-04-17 13:53:49 +01:00
David Allsopp 9c5d7c1112 Correct implementation of --disable-stdlib-manpages 2020-02-26 15:07:17 +00:00
David Allsopp 13786d7d12 Ensure make distclean works on an unconfigured tree 2019-10-15 11:46:36 +01:00
David Allsopp d4a566573f Allow make to be invoked before configure
This should be improved to give better warnings for when Makefile.config
and Makefile.common are required.
2018-12-04 10:28:36 +00:00
Gabriel Scherer a06a8c0012 ocamldoc Makefile: use .opt versions of the build tools when available
On my machine, a sequential build of (make all allopt) goes from 31s
to 11s, and a parallel build (-j5) goes from 16s to 6s.
2019-10-12 10:23:29 +02:00
Gabriel Scherer e232369580
Merge pull request #8835 from dra27/save-the-planet
New configure option to disable building and installing library manpages
2019-10-05 16:52:16 +02:00
Jacques Garrigue 1e895dbaee
Allow compiling ocamldoc with -principal (#8955)
Also solves issue #6922
2019-09-30 21:14:06 +02:00
David Allsopp 0912745754 Make STDLIB_MANPAGES a boolean, not a target 2019-09-27 17:13:42 +01:00
David Allsopp 2d717cb71a Add --disable-stdlib-manpages to configure 2019-09-27 17:13:24 +01:00
Gabriel Scherer 9067d0e3b9 explanatory comment on when 'ocamlrun ocamldoc' fails 2019-08-30 10:20:09 +02:00
Gabriel Scherer 4cde3f72e2 ocamldoc: remove an obsolete test
The odoc_fhtml file required by this test seems to have been part of
the ocamldoc distribution sometime in the distant past (see
27934ab79a from 2002) but I can't find
traces of it in the git history of the compiler distribution.
2019-08-30 09:59:27 +02:00
Gabriel Scherer bb1be5dd17 ocamldoc/Makefile: use ocamldoc.opt when available 2019-08-30 09:59:27 +02:00
Gabriel Scherer 2bbf7caa72 ocamldoc: build manpages explicitly in root Makefile 2019-08-30 09:57:18 +02:00
Gabriel Scherer 5e53c93489 ocamldoc/Makefile: manpages don't need generators anymore, odoc_man is builtin 2019-08-30 09:57:18 +02:00
Sébastien Hinderer a201ade7f3 Build system: make ocamllex silent by default (#8664)
This commit makes e.g. make -s world.opt completely
silent when everything works, in order to increase the visibility of
any unexpected message occurring during the build.
This will be useful for instance during CI, in particular it should
make it easier to catch undefined build variables.

The implementation is straightforward. The OCAMLLEX_FLAGS variable is
defined in Makefile.common.in and then used consistently by all
lexing recipes.

In addition, in tools/Makefile, the two rules producing the lexers
from cvt_emit.mll and make_opcodes.mll have been replaced by a
pattern-rule and the useless .SUFFIXES target has been removed.
2019-05-07 11:32:05 +02:00
Nicolás Ojeda Bär 8897fe60cc make clean: do not remove emacs backups 2019-04-10 14:18:04 +02:00
Mark Shinwell dbede46c2e
Improve the packing mechanism used to build Dynlink (#2268) 2019-03-19 10:26:35 +00:00
Jérémie Dimino c413136fa3 Delete otherlib/{graph,win32graph} (#2318)
The Graphics library is now distributed as a separate package.
The sources are at https://github.com/ocaml/graphics .

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-03-18 15:05:57 +01:00
Gabriel Scherer 93f0ce31bb env refactoring: separate the cmi/crc handling into a persistent_env module
Persistent_env is a new module that handles the relation between the
type-checking state and the "persistent" typing information laying in
.cmi files on the filesystem. In particular, it handles the collection
and production of CRC information for the .cmi files being read and
written to the filesystem; the using modules (in our case, only Env)
are in charge of turning the cmi files into higher-level information
(components and signatures).

Persistent_env exposes a type `'a t` of a persistent environment,
which acts as a mutable store of `'a` values. There is no global state
in the module itself: while Env (and thus the OCaml type-checker) uses
a single global persistent environment, it should be possible to
create several independent environments to represent, for example,
several independent type-checking sessions.
2019-02-18 17:02:47 +01:00
Sébastien Hinderer d258bb78ac Build system: use ocamlc -depend rather than ocamldep 2019-01-03 16:43:23 +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
Florian Angeletti cc76bb2396 ocamldoc makefile: clean pdf and texi docs 2018-11-06 13:45:25 +01:00
Florian Angeletti cbd4f71a39 documentation: move operator table to a new page 2018-11-04 17:49:22 +01:00
Florian Angeletti feaf2c4b1b add makefile target for stdlib pdf 2018-10-25 18:29:32 +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
Florian Angeletti 558530a8b4 manual: compiler-libs.mld -> compiler_libs.mld 2018-09-12 16:32:37 +02:00
Florian Angeletti ef135a71ae
MPR7546, manual: preambles and warnings for compiler-libs modules (#2020)
* preambles for compiler-libs modules

* Compilerlibs intro and warning link
2018-09-12 09:51:47 +02:00
David Allsopp b069f692b4 Remove space from end of FLEXLINK_ENV 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 7676807940 Always use ROOTDIR in lex and ocamldoc Makefiles 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
Florian Angeletti 65ab4200d6 html manual: split compilerlibs from stdlib 2018-09-05 18:59:31 +02:00
Florian Angeletti 284c8f8bb8 replace awk by $(AWK) in doc makefiles 2018-09-04 09:16:47 +02:00
octachron 075bf9bed6 doc: remove unprefix trick 2018-09-03 13:59:32 +01:00
Gabriel Scherer cbb92d2817 remove unused ocamlyacc dependencies, never put it in boot/ 2018-09-01 23:17:06 +02:00
Jérémie Dimino 9124ab82d1
Deprecate Pervasives (#1605)
- inline Pervasives in Stdlib and re-add Pervasives as a deprecated
module that aliases all elements of Stdlib except the stdlib modules.

- remove special case for Stdlib.Pervasives in printtyp.ml
2018-08-27 12:42:14 +01:00
Gabriel Scherer dfc8bd0d67 fix an unintended change of library installation directory for ocamldoc
The error comes from #1680, which changed the install scripts for
ocamldoc, and was caught and reported by Valentin "sliquister"
Gatien-Baron, presumably as part of his own work on #1569.

This is the trunk counterpart of #1877 in 4.07, commit
  9c9be40f9b6c55646e8f60ee7b5448c80eaa206f
2018-07-03 14:04:16 +02:00
Gabriel Scherer a1bc562d8a makefiles: consistently offer *both* 'allopt' and 'opt.opt' targets
Some makefiles (lex, stdlib, otherlibs) would only offer allopt, while
others (ocamldoc, tools) only offered opt.opt. It is inconvenient to
have to remember which target name to use while going through various
repositories.
2018-06-07 09:54:13 +02:00
Mark Shinwell ea2d6a1e31
Add configure options to control installation of source artifacts (#1777) 2018-05-14 08:15:44 +01:00
Damien Doligez dc649712b6 fix grammar conflicts in ocamldoc 2018-04-20 15:42:59 +02:00
Florian Angeletti c5b3dada13 cleanup stdlib documentation makefiles (#1700) 2018-04-12 11:02:16 +01:00
Gabriel Scherer b5391c911c ocamldoc Makefile: change target names to avoid useless recompilation
The target names for the 'man' and 'html' files are
  stdlib_{html,man}/Stdlib.{3o,html}
but these files are never produced by the corresponding rules,
so the rule is re-run on each "make world.opt".

This patch changes these target names to Pervasives.{3o,html}, which
is an actual file produced by the build. It is not fully clear to me
whether the authors of the original rule intended to also produced
documentation for a joint Stdlib module.

Before this patch, running "make world.opt" in an already-built directory
would take 10s on my machine. Now it takes 2s.

(no change entry needed)
2018-04-11 13:30:48 +02:00
Gabriel Scherer 3702f53692 factorize common makefile definitions in Makefile.common 2018-03-29 17:04:05 +02:00
Gabriel Scherer afcd29eb0c makefiles: turn the 'install' command into a variable
(Suggestion made by Sébastien Hinderer during review.)
2018-03-29 14:40:23 +02:00
Gabriel Scherer e08bb1057a ocamldoc/Makefile: rename variables for consistency 2018-03-29 14:40:23 +02:00