Commit Graph

20 Commits (9e181ca8f446d238ba279bc22fef9d166d4f38b0)

Author SHA1 Message Date
David Allsopp 46c7122888 Merge pull request #9840 from dra27/fix-9839
Partial revert of 9165: don't build the compiler with -O3 in flambda

(cherry picked from commit 6ce1c60ca97ee962ebf5d5218628bc388536325e)
2020-10-30 11:29:17 +01:00
Sébastien Hinderer f3ff1337a1 Build system: honour the CFLAGS and CPPFLAGS build variables
With this commit, it becomes possible to provide C compiler and preprocessor
flags to use in addition to those defined by the build system.

As required by the GNU coding standards, the flags can be provided
either at configure or at make invocation.

The provided CFLAGS and CPPFLAGS will also be taken into account
when C code is compiled by ocamlc/ocamlopt.

This commit removes the explicit reference to CFLAGS in the
configuration for the xlc compiler, since it is not necessary any longer.
2020-08-06 14:30:50 +02:00
David Allsopp 6fc8e07d62
Merge pull request #9692 from nojb/shellquote
Simplify Makefile
2020-06-23 14:39:39 +01: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
Nicolás Ojeda Bär afcac60650 Get rid of shellquote macro 2020-06-17 19:34:27 +02:00
David Allsopp da943eac54 Share generation code between ocamltest and utils
ocamltest/ocamltest_config.ml now generated using same make macros as
utils/config.ml.
2020-06-06 13:36:00 +01:00
Gabriel Scherer e34e62253f move the REQUIRES_CONFIGURATION logic in Makefile.config_if_required
This lets us share the logic between Makefile.common and Makefile.tools.
2020-05-06 12:10:02 +02:00
Gabriel Scherer 21f5ad3b4a build system: skip Makefile.build_config when REQUIRES_CONFIGURATION is empty
Before we would include it if present, but support building without
it. Unless I misunderstand something, this is unnecessarily complex:

- If we want to support building without it, we may as well
  do without it all the time (in particular it makes it easier
  to spot bugs which occurs when it is missing).

- Certain makefile rules (see config.status) work by being added
  as dependencies to Makefile.build_config, and requiring this file
  only when actually needed makes it possible to simplify those.
  (simplifications not included in this commit)

I reviewed all 'clean' rules to check that they do not depend on
variables defined in the configure. On the other hand, the main
makefiles do a lot of conditional tests on those variables,
so --warn-undefined-variables warns quite a bit. (This could be solved
by a Makefile.no_config rule that mirrors Makefile.config with dummy
definitions.)
2020-05-06 12:10:02 +02:00
Gabriel Scherer 472a20d735 [minor] rename CAN_BE_UNCONFIGURED into REQUIRES_CONFIGURATION 2020-05-06 12:10:02 +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 b3af8ca2a9 Tighten dependencies for C files
The $(wildcard *.h) should only be there with
--disable-dependency-generation, since otherwise gcc -MM will be
determining exactly which header files should be checked.
2020-05-03 15:27:14 +01:00
David Allsopp e3dffa8a7f Silence CI warning for undefined variable 2020-05-03 15:26:53 +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
Sébastien Hinderer cc3f70b705 Use autoconf to generate the compiler's configuration script 2018-12-21 16:02:47 +01: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 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
Gabriel Scherer bfd3fb17ae Makefile.common: use = instead of + in modes for clarity
(suggestion from Sébastien Hinderer)
2018-03-29 17:04:20 +02:00
Gabriel Scherer 3702f53692 factorize common makefile definitions in Makefile.common 2018-03-29 17:04:05 +02:00