Commit Graph

14 Commits (bdd9ca391e3a56253d7480b07bb1a8aac361904c)

Author SHA1 Message Date
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
Gabriel Scherer fab58a938a makefiles: move the inclusion of Makefile.build_config in Makefile.common 2020-05-06 12:10:02 +02:00
David Allsopp e3c4ba9cb9 Fix win32unix Makefile
EXTRACFLAGS should in fact be EXTRACPPFLAGS, which is now introduced and
used.
2020-05-01 10:13:14 +01: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
Greta Yorsh 7271919a47 Check FLAMBDA in Makefile.common.in to update OPTCOMPFLAGS 2020-04-20 13:56:53 +01:00
Greta Yorsh 44af4aea7c Check FUNCTION_SECTIONS in Makefile.common.in to update OPTCOMPFLAGS 2020-04-20 13:56:53 +01:00
Greta Yorsh 7465e9f2c7 Define OPTCOMPFLAGS in Makefile.common.in 2020-04-20 13:56:53 +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 879ddff59a otherlibs Makefiles: use ocaml{c,opt}.opt when available
On my machine, the sequential build time goes from 30s to 10s.
2019-10-12 10:23:29 +02:00
Greta Yorsh 351edb49bb Add compile-time option -function-sections 2019-07-15 10:25:26 +01:00
Xavier Leroy c4f115cdae Be more explicit about the default values of parameters
This generic Makefile is parameterized by several "make" variables,
- two that must be set by the calling Makefile
- nine that can be set by the calling Makefile but have default values
  otherwise.

This commit sets explicitly the default values of the nine variables above,
using "VAR ?= default-value", even if the default value is the empty string.

This avoids spurious warnings by "make --warn-undefined-variables"
and is good documentation-in-code.
2019-05-02 19:43:17 +02:00
David Allsopp 7bd3162313 Support otherlibs with no COBJS 2019-02-26 11:13:44 +00:00
Gabriel Scherer 375dd4a79e rename otherlibs/Makefile into otherlibs/Makefile.otherlibs.common
This file is meant to be included by the per-directory makefiles
of otherlibs/*/Makefile; its target cannot be run directly from
otherlibs/. We would like to propose targets from otherlibs/,
in a new Makefile.
2018-11-12 16:28:01 +01:00