Commit Graph

698 Commits (master)

Author SHA1 Message Date
Sébastien Hinderer 376435be98 Make 'make depend' fail as soon as a sub-command it invokes fails.
With this commit, 'make alldepend' will stop and report an error as
soon as one of the invoked command fails, which was not the case before.

This commit thus makes it possible to test that 'make alldepend' works
in an automated way.
2017-04-26 18:23:22 +02:00
David Allsopp 0301576685 Fix \r problems on recent Cygwins
The Cygwin packages for awk, grep and sed were updated on 20 February
2017 so that they no longer automatically strip \r characters on binary
mounts. This affects the OCaml build system in a few places, requiring
the addition of a few tr calls.

References:
  * https://cygwin.com/ml/cygwin/2017-02/msg00152.html
  * https://cygwin.com/ml/cygwin/2017-02/msg00189.html
  * https://cygwin.com/ml/cygwin/2017-02/msg00188.html
2017-04-13 14:17:28 +02:00
Mark Shinwell 3efe66e043 Remove SPARC backend 2017-04-10 09:18:13 +01:00
David Allsopp 80e7529be5 Fix installation of bytecode flexlink.exe
The bytecode version of flexlink.exe is compiled before camlheader is
available, so it needs to have that prepended when it's installed.
2017-04-09 19:00:06 +02:00
David Allsopp 7ef4018bd7 Don't build flexlink.opt in opt.opt
Require flexlink.opt to be specified. Old behaviour:

make flexdll world.opt install

now becomes:

make flexdll world.opt flexlink.opt install

Without flexlink.opt, a bytecode version of flexlink.exe is installed.
2017-04-09 19:00:06 +02:00
David Allsopp 5a29efa469 Split FlexDLL bootstrap into flexdll and flexlink
Allows the C object files to be provided separately and just the
flexlink binary itself to be bootstrapped.
2017-04-09 19:00:06 +02:00
David Allsopp 65fd726329 Install bootstrapped FlexDLL objects to flexdll/
The install-flexdll target now puts the object files for FlexDLL in a
subdirectory flexdll of the Standard Library instead of in the Standard
Library itself.

A configuration tweak means that -I +flexdll is effectively added to all
compiler invocations and also a pseudo-option -L+flexdll to ocamlmklib
calls to Config.mkdll which fixes PR#7373.
2017-04-09 19:00:06 +02:00
David Allsopp 614dd0b756 Allow backslashes in FLEXLINK_FLAGS
Also in MKEXE, MKDLL and MKMAINDDLL as a result.
2017-04-09 19:00:06 +02:00
Sébastien Hinderer eef958007e Build system: rename variables related to manual pages
Rename MANEXT (resp. LIB_MANEXT) to PROGRAMS_MAN_SECTION (resp.
LIBRARIES_MAN_SECTION).

Also get rid of a useless variable assignment in configure.
2017-03-29 11:10:06 +02:00
Sébastien Hinderer 3564aade19 Introduce and use the OUTPUTEXE and OUTPUTOBJ build variables 2017-03-29 11:10:06 +02:00
Sébastien Hinderer f2d5d60376 Define new build variables for C compiler and preprocessor flags 2017-03-29 11:10:06 +02:00
Sébastien Hinderer 8868a7c023 Rename the BYTECCLINKOPTS build variable to LDFLAGS 2017-03-29 11:10:05 +02:00
Pierre Chambart cb81cc6fe2 Declare record type for flambda function parameters (#1028) 2017-03-16 10:40:47 +00:00
Sébastien Hinderer d05d521d6e Fix dependencies generation for otherlibs
Generate dependencies for all of them, not just those that will
actually be built.
2017-03-09 17:12:02 +01:00
Sébastien Hinderer a85b39654a Clearly report that dependencies cannot be regenerated for the MSVC ports 2017-03-09 17:12:02 +01:00
Sébastien Hinderer ccf22c8471 Make .depend files generated for C sources more portable
This implements a suggestion provided by @xavierleroy in
https://github.com/ocaml/ocaml/pull/941#issuecomment-266047690

Before this commit, the dependencies of the win32unix C files were not
taken into account at all. This commit fixes this, too.
2017-03-09 17:12:02 +01:00
Christopher Zimmermann feaab3e40e use $(MAKE) variable 2017-03-05 21:36:13 +01:00
Gabriel Scherer 838b6f8fd2 Merge pull request #1074 from stedolan/parallel-make-fix
Fix for parallel make
2017-03-02 17:00:01 -05:00
Stephen Dolan fa576384b2 Fix for parallel make 2017-03-02 10:15:40 +00:00
Nicolas Ojeda Bar e75c87dc48 Initial import of linear-scan-register-allocator
The code in this commit was written by Marcell Fischbach & Benedikt Meurer.
See [Mantis#5324](http://caml.inria.fr/mantis/view.php?id=5324) for some
context.

The code (which was originally written against 3.12) was ported to trunk by
doing

```bash
git clone https://github.com/bmeurer/ocaml-experimental/
cd ocaml-experimental
git diff master...linear-scan-register-allocator > t.diff
```

and then applying the diff by hand.
2017-02-22 17:09:18 +01:00
Török Edwin d1cd849d3f Documentation tool: add tools/lintapidiff.ml
Run 'make lintapidiff' in the root of a git checkout to get a list of
potentially missing or wrong @since annotations.

The tool is not built by default, you have to first run 'make
world.opt', and then run 'make lintapidiff'.

lintapidiff doesn't support stop comments: add explicit list of changes to ignore.

see copyright header for license.
2017-02-21 17:13:38 +02:00
fdopen 9174a1d1ec also install ocamlyacc 2017-02-17 16:38:26 +01:00
Sébastien Hinderer 42ae45f5b4 Makefile: declare the distclean and coreboot targets as PHONY
Makefile: declare the coreboot target as PHONY
2017-02-15 16:06:23 +01:00
Sébastien Hinderer 14614a5c2e Makefile: reorder a few phony and variable declarations 2017-02-15 11:19:08 +01:00
Sébastien Hinderer 05005bd7d3 Makefile: get rid of commented rule 2017-02-15 11:19:08 +01:00
Sébastien Hinderer 460019eb69 Makefile: minor improvement of a rule related to the native dynlink library 2017-02-15 11:19:08 +01:00
Sébastien Hinderer a23bec29ec Makefile: minor fix of the clean rule
Move the phony declaration above the first definition of the clean rule.
2017-02-15 11:19:08 +01:00
Sébastien Hinderer 73179f8972 Makefile: slightly improve the flexdll rule 2017-02-15 11:19:07 +01:00
Sébastien Hinderer 4c9ac6d2bf Makefile: slightly improve the opt-core rule 2017-02-15 11:19:07 +01:00
Sébastien Hinderer 7c988144bc Makefile: define the INCLUDES variable earlier to improve readability 2017-02-15 11:19:07 +01:00
Sébastien Hinderer 294e0a73a1 Makefile: get rid of variables related to ocamlbuild
They have become useless
2017-02-15 11:19:07 +01:00
Sébastien Hinderer f8dc9e4c85 Move the content of Makefile.shared to Makefile
Also update Makefile.nt so as to include Makefile
2017-02-15 11:19:05 +01:00
Sébastien Hinderer 7e034f20fa Get rid of the MAKEREC and MAKECMD make variables
Now that the Unix and Windows build systems have been merged, thiese
variables are no longer useful.
2017-02-15 11:18:10 +01:00
Sébastien Hinderer 4865cbac4f Makefiles: deduplicate the inclusion of the .depend file 2017-02-15 11:18:10 +01:00
Sébastien Hinderer fbead55c66 Makefiles: deduplicate the world.opt rule 2017-02-15 11:18:10 +01:00
Sébastien Hinderer ae4eb8ba9a Makefiles: deduplicate the natruntop rule 2017-02-15 11:18:10 +01:00
Sébastien Hinderer 11fd71c6ff Makefiles: deduplicate the opt and opt.opt rules
The recipes work differently on Unix and Windows. This commit
preserves this situation but this will probably need to be clarified.
2017-02-15 11:18:10 +01:00
Sébastien Hinderer 5eb5cdfd04 Move the base.opt recipe from Makefile to Makefile.shared
This target thus becomes available under Windows (Makefile.nt did not
define it).

Since no other rule makes use of this target, its usefulness needs to be
confirmed.
2017-02-15 11:18:10 +01:00
Sébastien Hinderer d7fdcd6a93 Makefiles: deduplicate the opt-core rule 2017-02-15 11:18:10 +01:00
Sébastien Hinderer b7845ece69 Move the reconfigure rule from Makefile to Makefile.shared
Make sure it can be used only on Unix, though, since ./configure does
not work on Windows yet.
2017-02-15 11:18:10 +01:00
Sébastien Hinderer fca37bb47b Makefiles: deduplicate the world rule 2017-02-15 11:18:10 +01:00
Sébastien Hinderer a000862dd3 Makefiles: deduplicate the runtop rule
The recipes for the Unix and Windows build systems are different. This
difference has been preserved for the moment but the rules should be
unified.
2017-02-15 11:18:10 +01:00
Sébastien Hinderer 44097e323a Deduplicate the bootstrap rule 2017-02-15 11:18:10 +01:00
Sébastien Hinderer 2bd60155ef Makefiles: deduplicate the all rule
Before this commit, the rule was more sequential on the Unix build system
than on the Windows one. The more sequential version has been kept
so as not to break parallel builds.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer 6d5914f4d1 Makefiles: deduplicate the coreboot rule
Note: since commit dd74659c68, the
coreboot target on the Unix build system calls make promote with
CAMLRUN=byterun/ocamlrun, which the equivalent target on the Windows
system did not use before the present commit.

The present commit uses CAMLRUN=byterun/ocamlrun on both build systems.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer 50071de8ff Makefiles: deduplicate .PHONY declarations of tools-related rules
The ocamltools, ocamltoolsopt and ocamltoolsopt.opt rules were already
shared but their .PHONY declarations were duplicated.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer 749eb08256 Makefiles: deduplicate the promote-cross, promote and cleanboot rules 2017-02-15 11:18:09 +01:00
Sébastien Hinderer 21cd9de7ad Makefiles: deduplicate the backup, restore and compare rules 2017-02-15 11:18:09 +01:00
Sébastien Hinderer 91e353acc8 Makefiles: deduplicate the coreall and core rules
On Unix core builds coldstart and coreall while on Windows core builds runtime
and coreall. This behaviour has been preserved but needs to be
clarified.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer 731766c3b2 Makefiles: deduplicate the coldstart rule
On the Unix build system, this recipe was creating stdlib/caml as a symlink
to byterun/caml. This is no longer done because it is not done on
Windows either and seems not useful.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer 7a24ff49e5 Makefiles: deduplicate the default rules
After this commit, ocamldep is called with the -shash option under
Unix, which was not the case before but should not change anything
in practice.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer 83aff485b3 Move the rules related to MacOS X pakcaging from Makefile to Makefile.shared
Make sure they can be used only under Unix, though.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer e5cb725761 Move the checkstack rule from Makefile to Makefile.shared
It will however be available only on Unix because checkstack does not
yet work on Windows.

This commit removes the '@' character in front of the commands of
the checkstack rule to make debugging easier.

It also fixes the target by ensuiring that the $(EXE) extension
is used everywhere.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer df392ade71 Makefiles: deduplicate the rules that clean the testsuite 2017-02-15 11:18:09 +01:00
Sébastien Hinderer 842ca03fde Makefiles: deduplicate the rules related to the OCaml debugger
Under Unix the debugger depends on the otherlibraries target, which was
not the case on Windows before this commit.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer 2cbefd684c Makefiles: deduplicate the rules related to the other libraries
On Unix the otherlibraries target depends on ocamltools, which was not
the case under Windows before this commit. This commit keeps the Unix
version to make sure no constraint is lost.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer 36f8a959eb Makefiles: deduplicate the rules related to ocamldoc
This commiit makes the html_doc target available under Windows.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer 921379d24e Makefiles: deduplicate rules related to ocamllex and ocamlyacc
On Windows the ocamllex and ocamllex.opt target did not depend on
anything, whereas they did on Unix. The dependencies have been kept as
they were under Unix to make sure no constraint is lost.

However the dependencies between ocamllex and ocamllex.opt do not seem
very coherent either.
2017-02-15 11:18:09 +01:00
Sébastien Hinderer e3ec33d4d7 Makefiles: deduplicate the rules related to the standard library 2017-02-15 11:18:09 +01:00
Sébastien Hinderer bca810108f Makefiles: deduplicate the rules related to the runtime systems 2017-02-15 11:18:09 +01:00
Sébastien Hinderer ab518b545d Makefiles: deduplicate the rules related to the expunge utility 2017-02-15 11:18:09 +01:00
Sébastien Hinderer 0d29ef1410 Makefiles: deduplicate the rules choosing the right machine-dependent files 2017-02-15 11:18:08 +01:00
Sébastien Hinderer 04a50de5f9 Makefiles: deduplicate the rules related to the preprocessing of code emiters 2017-02-15 11:18:08 +01:00
Sébastien Hinderer 126db6d129 Makefiles: get rid of the ARCH_OCAMLOPT make variable
It is a synonymous of the ARCH variable and is not exported so get rid
of it.
2017-02-15 11:18:08 +01:00
Sébastien Hinderer a458358db6 Makefiles: deduplicate the rules related to the predefined exceptions and primitives 2017-02-15 11:18:08 +01:00
Sébastien Hinderer c2e5587002 Makefiles: deduplicate the rules building compilers and compilerlibs 2017-02-15 11:18:08 +01:00
Sébastien Hinderer c61cf64314 Makefiles: deduplicate the rules building the OCaml parser and lexer 2017-02-15 11:18:08 +01:00
Sébastien Hinderer bb4736be2c Makefiles: deduplicate the rule building otherlibs/dynlink/dynlink.cmxa 2017-02-15 11:18:08 +01:00
Sébastien Hinderer 082aec0731 Makefiles: deduplicate rules to build ocaml, ocamlc, ocamlopt and compilerlibs 2017-02-15 11:18:08 +01:00
Sébastien Hinderer 652792f537 Makefiles: deduplicate the clean rule 2017-02-15 11:18:08 +01:00
Sébastien Hinderer c682f152e7 Move the manual-pregen rule from Makefile to Makefile.shared
This target thus becomes available under Windows
2017-02-15 11:18:08 +01:00
Sébastien Hinderer 597b2cd76d Makefiles: deduplicate the install rule 2017-02-15 11:18:08 +01:00
Sébastien Hinderer 630f55b599 Makefile: improve the way ocamlyacc is installed
Before this commit, ocamlyacc.byte was installed as ocamlyacc
unconditionally and then overwritten by ocamlyacc.opt, if available.
After this commit, ocamlyacc is provided as a symlink to (or copy of)
ocamlyacc.byte only if the native code version is not available.
2017-02-15 11:18:08 +01:00
Sébastien Hinderer 31ff24eb69 Makefile: re-order commands in the install rule
This is to match the (alphabetical) ordering of the Windows build system.
2017-02-15 11:18:08 +01:00
Sébastien Hinderer 1a46ea3c68 Makefile: install flexdll
This makes the install rule of the Unix build system closer to its
Windows counterpart but has no other effect.
2017-02-15 11:18:08 +01:00
Sébastien Hinderer f3466c08ea Makefile: continue tidying up the install rule
* Use make -C instead of cd-ing into subdirectories
 * Quote directory names
 * Shorten long lines
 * Use the LN variable rather than the "ln -s" string
2017-02-15 11:18:07 +01:00
Sébastien Hinderer 34ef720b5f Makefile: stop removing shared libraries while installing
This had been introduced in commit a49cf7b0 but does not seem useful any
longer.
2017-02-15 11:18:07 +01:00
Sébastien Hinderer 11c4fa62a7 Makefile: gather commands related to the installation of manual pages
This commit also makes sure the man pages get installed only on Unix
systems. This is useless at the moment but will become useful once the
install rule will be shared.
2017-02-15 11:18:07 +01:00
Sébastien Hinderer c001d0dad9 Makefile: simplify the way make install creates directories
Also remove a superfluous / and make sure directory names are quoted.
2017-02-15 11:18:07 +01:00
Sébastien Hinderer 0e3a34b315 Makefiles: deduplicate the installopt rule 2017-02-15 11:18:07 +01:00
Sébastien Hinderer 40b98b0d01 Makefile: installopt enhancement
If appropriate, install flexdll/flexlink.opt as
$(INSTALL_BINDIR)/flexlink$(EXE). This will not happen under Unix where
flexlink is not compiled but makes this target identical to its Windows
counterpart.
2017-02-15 11:18:07 +01:00
Sébastien Hinderer f556f3e007 Makefiles: bring the two variants of installopt closer to each other
This contains only cosmetic modifications
2017-02-15 11:18:07 +01:00
Sébastien Hinderer 3dea9847bd Makefiles: simplify the invocation of sub-makefiles in the installopt rules
This commit replaces idioms like ``cd dir; $(MAKE) foo'' and
``cd dir && $(MAKE) foo'' by ``$(MAKE) -C dir foo''.

In Makefile.nt, the command ``$(MAKEREC) installoptopt'' has also been
replaced by ``$(MAKE) installoptopt''.
2017-02-15 11:18:07 +01:00
Sébastien Hinderer 99084ca4d3 Makefile: installopt rule enhancements
Make sure installation directories are properly quoted. Use the LN variable.
2017-02-15 11:18:07 +01:00
Sébastien Hinderer ecbd4e4f9f Makefiles: deduplicate the installoptopt rule 2017-02-15 11:18:07 +01:00
Sébastien Hinderer 96057a4468 Makefiles: make indentation consistent in the installoptopt rules 2017-02-15 11:18:06 +01:00
Sébastien Hinderer 81b7a902f6 Makefile: make the intstalloptopt rule more general
This is done by replacing the hard-coded .a and .o file extensions by
their more general .$(A) and .$(O) counterparts.
2017-02-15 11:18:06 +01:00
Sébastien Hinderer 600de03d00 Makefile: quote installation directories used in the installoptopt target 2017-02-15 11:18:06 +01:00
Sébastien Hinderer b6fa7fdb62 Makefile: use the LN variable in the installoptopt rule 2017-02-15 11:18:06 +01:00
Sébastien Hinderer 3a0f450e0b Move the install-compiler-sources target from Makefile to Makefile.shared
This target has been introduced by GPR #827 but added only to the
Unix build system. This commit makes it available to the Windows build
system, too.
2017-02-15 11:18:06 +01:00
Sébastien Hinderer 5863841aac Makefiles: deduplicate the tests rule 2017-02-15 11:18:06 +01:00
Sébastien Hinderer 127d660826 Makefiles: share the definition of general-purpose variables 2017-02-15 11:06:41 +01:00
Sébastien Hinderer 1e632bc1de Makefiles: deduplicate the rules related to utils/config.ml 2017-02-15 10:45:21 +01:00
Sébastien Hinderer 2f59a729b4 Add support for FLEXLINK_FLAGS to Makefile
This commit affects the recipe used to generate utils/config.ml
from utils/config.mlp. It adds an expression to the sed command to
replace the %%FLEXLINK_FLAGS%% token by a value. Given that this
variable is not defined for Unix build this will have no effect, except
making the recipe identical to the one used on the Windows build system.
2017-02-15 10:45:21 +01:00
Sébastien Hinderer 635abf5fda Makefiles: unify the way file extensions are generated
This commit deals with the rule that generates utils/config.ml
2017-02-15 10:24:09 +01:00
Sébastien Hinderer f1a250ed14 Makefiles: sed expressions cleanup in the recipes building utils/config.ml
The recipes to build utils/config.ml from utils/config.ml in Makefile
and Makefile.nt essentially are sed invocations with several

expressions. This commit sorts the expressions in alphabetical order in
both files and also makes sure all the expressions use the same
quoting style, namely single quotes.

This has no practical effect but makes the two recipes easier to
compare.
2017-02-15 10:24:09 +01:00
Sébastien Hinderer b06158bacb Makefile: stop removing -Werror from compiler options
This commit removes the line introduced by commit
59853fa694

Since the proposal to have separate variables for warning
options has been implemented, such a precaution should no longer be
necessary. Moreover, this had been implemented for the Unix build system
only, not for the Windows one.
2017-02-15 10:24:09 +01:00
Sébastien Hinderer e169dc4bfc Introduce the BYTECODE_C_COMPILER and NATIVE_C_COMPILER make variables
These variables represent the C compilers ocamlc and ocamlopt should use
to compile a third-party C source file when no -cc command-line option
has been specified.

Thanks to these variables, the substitutions performed in Makefile and
Makefile.nt to generate utils/config.ml from utils/config.ml become
similar.

(The NATIVE_C_COMPILER variable is not really necessary but it has still
been introduced to preserve symetry.)
2017-02-15 10:24:09 +01:00
Sébastien Hinderer 04aa870b9b Define BYTERUN as a real make variable
This variable is used to give a value to standard_runtime in
utils/config.ml.

Before this commit, its values were hard-coded in Makefile and
Makefile.nt, in the rules generating utils/config.ml from utils/config.mlp.

This commit gets rid of this hardcoding, to prepare the sharing of the
rules mentionned above.
2017-02-15 10:24:09 +01:00
Sébastien Hinderer 02e2cf2c6c Makefiles: Deduplicate the defaultentry rule 2017-02-15 10:24:09 +01:00
pierreweis 14c90d7bbc Some cleaning: consistent for loops display, indenting long lines, tabify
target recepees.
2017-01-18 12:10:24 +01:00
Nicolas Ojeda Bar 77dba7758e Add make_opcodes 2016-12-29 08:22:37 +05:30
Gabriel Scherer d4cd072d4c Merge pull request #935 from ygrek/termux-build
allow build in termux
2016-12-23 16:53:24 -05:00
Fabrice Le Fessant df546b92f5 Fix problem with ocamlopt.opt -plugin
Add NATDYNLINKOPTS options to ocamlbytecomp.cmxa
2016-12-23 14:49:30 -05:00
Jonathan Protzenko 7d1998d839 Some fixups for runtop; add runtop to Makefile.nt 2016-12-15 21:33:53 -05:00
Gabriel Scherer d89b1a7b83 PR#7172: ocamlc -config: add int_size, word_size, ext_exe (#970) 2016-12-14 09:43:19 -05:00
Stephen Dolan a35c6117e6 Instrumentation for american fuzzy lop (afl-fuzz) (#504) 2016-12-06 17:18:04 +01:00
ygrek ff34efc8c5 drop explicit SHELL specification from Makefile
it breaks build on termux where /bin/sh is not available, while make finds the proper shell itself just fine
2016-11-26 14:11:12 -08:00
Sébastien Hinderer 54e6aecd77 Improve handling of platforms that do not have gprof profiling support (#933)
This commit modifies these two behaviours:

1. ``make install'' installs libraries with profiling support only when
this makes sense.

2. On platforms that do not support profiling with gprof, the -p option of
ocamlopt produces an error message.
On such platforms, ``make install'' was installing dummy profiling
libraries and ocamlopt's -p option was silently ignored.

In addition, this commit modifies the values of the PROFILING make
variable. Before the commit it was either prof or noprof. After the
commit it is either true or false.

In the asmrun directory, the call to ranlib for libasmrunp.a has also been
removed from the install target because this command is already invoked
in the rule that builds libasmrunp.a.

ocamlc/ocamlopt -config now prints the state of profiling support
2016-11-25 17:24:44 +01:00
Gabriel Scherer 0657fd8193 Revert "Improve handling of platforms that do not have gprof profiling support (#933)"
This reverts commit 8adfe15f18.

This is a temporary revert caused by Continuous Integration
failure. We'll investigate the issue and merge again when it is fixed.
2016-11-25 11:12:56 -05:00
whitequark 0670dc2be9 Fix install of symlinks with installopt but without installoptopt. (#932) 2016-11-25 15:01:04 +00:00
Sébastien Hinderer 8adfe15f18 Improve handling of platforms that do not have gprof profiling support (#933)
This commit modifies these two behaviours:

1. ``make install'' installs libraries with profiling support only when
this makes sense.

2. On platforms that do not support profiling with gprof, the -p option of
ocamlopt produces an error message.
On such platforms, ``make install'' was installing dummy profiling
libraries and ocamlopt's -p option was silently ignored.

In addition, this commit modifies the values of the PROFILING make
variable. Before the commit it was either prof or noprof. After the
commit it is either true or false.

In the asmrun directory, the call to ranlib for libasmrunp.a has also been
removed from the install target because this command is already invoked
in the rule that builds libasmrunp.a.

ocamlc/ocamlopt -config now prints the state of profiling support
2016-11-25 15:57:14 +01:00
Sébastien Hinderer 3e81da2234 Clarify and slightly modify the use of C compiler related make variables.
Before this commit, there was no distinction between the options
used to compile C source files coming with the OCaml distribution
and third-party C source files compiled by calling ocamlc or ocamlopt.

This commit makes it possible to use options when compiling C source
files that come with OCaml without imposing these options to the compilation
of third-party code.

More specifically, the options in the BYTECCCOMPOPTS and NATIVECCCOMPOPTS
variables are not passed to the C compiler when called by ocamlc and
ocamlopt any longer.

This commit also documents the role of each concerned variable.

In addition:

- On Unix:
  * The -Wall and -Werror options are no longer passed to the C
    compiler by ocamlc and ocamlopt for third-party C source files

- For the MinGW port:
  * The -O option has been removed from the SHAREDCCCOMPOPTS variable
  * The -Wall and -Wno-unused options are no longer passed to the C
    compiler by ocamlc and ocamlopt for third-party C source files

- For the msvc port: the
  * The -Ox option has been removed from the SHAREDCCCOMPOPTS variable.
  * The -Wall and -Wno-unused options are no longer passed to the C
    compiler by ocamlc and ocamlopt for third-party C source files
2016-11-16 08:44:47 +01:00
hendriktews 0bb16e0934 improve installation of additional material (#827)
- install missing mli and cmti files for compiler-libs and otherlibs
- new make target install-compiler-sources to install compiler-libs ml files
2016-10-21 16:40:14 +02:00
Fabrice Le Fessant 632ad93b71 Merge pull request #735 from lefessan/2016-08-02-with-prof-id
Add --reserved-header-bits XX to ./configure
2016-09-05 15:45:58 +02:00
octachron e2fbb9145f Update root makefile manual-pregen target 2016-09-02 01:02:37 +02:00
octachron b76ee8d8d8 GPR#693: add a manual-pregen makefile target 2016-09-02 01:01:33 +02:00
Fabrice Le Fessant 6b436a43ea Add --reserved-header-bits XX to ./configure
with XX a number smaller than 32 (to leave at least 22 bits for the size)
2016-08-29 22:33:32 +02:00
Sébastien Hinderer e1b57c4a39 Make sure ocamlnat is built with a $(EXE) extension.
Before this commit, 'make ocamlnat' was building 'ocamlnat' without any
extension, even on Windows. The extension was added by 'make install', though.

With this commit, 'ocamlnat' is given its $(EXE) extension already
at build time.
2016-08-01 17:28:51 +02:00
Sébastien Hinderer e47f29bf85 Share the rules needed to build the native toplevel.
One side-effect is that ocamlnat is now removed by make clean under
Windows (mingw and msvc), which was not the case before.
2016-08-01 17:28:51 +02:00
Damien Doligez 0b4fbc2b30 fix whitespace, long lines, headers 2016-08-01 16:06:59 +02:00
Mark Shinwell cd0bd8aa73 Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
Damien Doligez d2ed1221c1 fix GPR#587: install byte-code versions of ocamlc and ocamllex 2016-07-20 17:08:59 +02:00
alainfrisch 012e1ef878 "./configure -safe-string" to force safe-string mode
When configured with -safe-string, the OCaml tools will default to the
safe-string mode and ignore -unsafe-string command-line arguments.  This
is intended to serve two purposes:

 - Facilitate the detection of packages that are not ready
   for -safe-string ready.  (Perhaps with some OPAM switch?)

 - Enable some optimizations that assume that all linked units are
   compiled with -safe-string.

Note: currently, there is no check that units compiled with an OCaml
configured without -safe-string are not linked in.
2016-07-19 14:28:51 +02:00
Fabrice Le Fessant d1418bc031 Remove dependency on Dynlink in ocamlnat 2016-07-18 17:49:52 +02:00
Fabrice Le Fessant f26c0ff8b6 Add plugins in the compiler 2016-07-18 17:43:05 +02:00
Fabrice Le Fessant 99b4d7bac9 Add a target `make reconfigure` to restart configure with the same options 2016-07-13 16:02:51 +02:00
alainfrisch 618e3ff309 Support check_all_arches under Windows. Make it more robust by removing all .cmo files in asmcomp. 2016-07-11 11:35:51 +02:00
Demi Obenour d89af40f64 Install native versions of tools by default.
Previously, `ocamlc`, `ocamlopt`, `ocamllex`, and `ocamldep` defaulted
to the bytecode versions of the tools.  However, there is normally no
advantage to the bytecode versions if the native-code versions are
available, except in unusual circumstances.  Instead, install the
native-code versions without the `.opt` suffix.  They are still
installed with the `.opt` suffix for backwards compatibility.  Finally,
install the bytecode versions with the `.byte` suffix, and build
native-code versions of tools that are not currently built in native
code.

Also, remove some duplication in tools/Makefile.shared.

Supersedes GPR #512.
2016-06-06 14:44:10 -04:00
François Bobot 2aec849922 Merge remote-tracking branch 'origin/4.03' into trunk
travis.yml is kept from trunk

Conflicts:
  	.depend
	Changes
	Makefile
	VERSION
	boot/ocamlc
	boot/ocamldep
	boot/ocamllex
	parsing/parser.mly
	parsing/pprintast.ml
	stdlib/hashtbl.ml
	testsuite/tests/unwind/Makefile
	tools/check-typo
2016-03-11 18:44:32 +01:00
alainfrisch de857d6fb9 GPR#324: Make boot/ocamlc read directly byterun/primitives (patch by Francois Bobot). 2016-03-10 10:46:19 +01:00
Alain Frisch 8eb9c0b46e An quick way to ensure that ocamlopt compiles fine on supported archs.
Examples: `make check_arch=power`, `make check_all_arches`.
2016-03-09 18:54:15 +01:00
Jacques-Henri Jourdan dd74659c68 * Fix coreboot target. This target calls promote, which itself now
uses tools/stripdebug. This executable has to be ran with the new
  runtime, not the one in boot/.

* Update .depend for byterun/ and asmrun/
2016-03-07 23:24:52 +01:00
Adrien Nader 78bdfa53ca Makefile: use "$(EXT_DLL)" instead of hard-cording ".so". 2016-03-05 14:25:11 +01:00
Damien Doligez 69a906872f tweak tools/check-typo and break more overlong lines 2016-02-19 17:13:53 +01:00
Damien Doligez d5f61a4e54 tweak tools/check-typo and break more overlong lines 2016-02-19 12:28:36 +01:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Damien Doligez ee8f71101b clean up whitespace and cut long lines 2016-02-17 13:36:27 +01:00
alainfrisch 6661919762 Move more stuff into Makefile.shared in order to fix the build on Windows. 2016-02-11 10:34:36 +01:00
Mark Shinwell 4f3b8bf872 Fix ocamlobjinfo for Flambda (includes work from Runhang Li) 2016-02-10 15:56:13 +01:00
Gabriel Scherer f8f2a6277f remove ocamlbuild from the compiler distribution 2016-02-01 15:05:18 -05:00
Pierre Chambart 050c454765 Add middle_end to Makefiles 2016-01-22 01:24:02 +01:00
Pierre Chambart 828cb4ebb9 Add field in Config for flambda and change the cmx and cmxa magic number 2016-01-14 14:20:23 +01:00
Leo White 3ef4b2c95e Install compiler libs .cmx files 2015-12-26 08:29:48 +00:00
Thomas Refis d004615e38 Makefile: add a 'natruntop' target, similar to 'runtop' 2015-12-18 10:39:36 +00:00
Jeremie Dimino d0e62811c0 make ocamlnat build again
Conflicts:
	Changes
	Makefile.shared
2015-12-18 10:39:36 +00:00
Xavier Leroy 5b62da1835 Merge pull request #340 from ocaml/stripped-bootstrap
Reduce size of bootstrap compilers by stripping debug info
2015-12-18 11:13:37 +01:00
Gabriel Scherer 2e8de3ff85 Makefile: a 'runtop' target to build and run the toplevel
Pass the content of the TOPFLAGS variable as additional arguments, eg.

  TOPFLAGS="-dparsetree" make runtop
2015-12-11 13:36:28 +01:00
Xavier Leroy 2810763764 Strip debugging information off the bootstrap compilers, to reduce their size
The stripping is done during bootstrap, when copying the new ocamlc, ocamllex and ocamldep to boot/.  The new "stripdebug" tool performs this task.

As a consequence, comparing the new compilers with the boot/ compilers at the end of bootstrap is more complicated, since the debug section must be ignored.  A new tool, "cmpbyt" in tools/, performs this comparison.
2015-12-09 10:45:31 +01:00
Alain Frisch 90323d0d1e Starting to share identical parts in the root Makefile and Makefile.nt.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16534 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 13:49:59 +00:00
Mark Shinwell e27e699fca GPR#173: Attributes to control inlining
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16530 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 08:18:08 +00:00
Jérémie Dimino f78f46bcce Add parsing/Attr_helper
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16451 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-06 10:58:17 +00:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Xavier Leroy 4ee74721a6 Update wrt trunk (r16374).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cc-optim@16375 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-25 13:40:40 +00:00
Gabriel Scherer cb3bb152ab add option handling for colors in compiler, OCAMLPARAM and ocamlbuild
(Simon Cruanes and Gabriel Scherer)

Use one of
  -color auto
  -color always
  -color never

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16348 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:51 +00:00
Xavier Leroy 59853fa694 Remove -Werror from the C compiler flags used by ocamlc/ocamlopt when compiling a C source file.
The risk of breakage of 3rd-party libraries is too high.
There might be cleaner ways to achieve this effect, e.g. split BYTECCCOMPOPTS into BYTECCCOMPOPTS and BYTECCEXTRAWARNINGS.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cc-optim@16337 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-06 08:17:31 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Leo White 5c55e4cc08 Attach documentation comments to Parsetree
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16189 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-28 13:11:50 +00:00
Gabriel Scherer 06a78807fb Update Makefile and .depend for untypeast.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15887 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-08 10:22:34 +00:00
Damien Doligez 0f5046b8b4 configure: add test for cygwin64
Makefile: fix compilation of checkstack
tests/callback: fix compilation



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15809 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-05 04:28:25 +00:00
Gabriel Scherer 95f626c9ff PR#6691: install .cmt[i] files for stdlib and compiler-libs
(patch by David Sheets)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15794 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-24 16:35:29 +00:00
Gabriel Scherer 7ca29ef3f7 PR#5887: move the byterun/*.h headers to byterun/caml/*.h to avoid header 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-27 14:41:49 +00:00
Alain Frisch 9d450a05e0 Replace TypedtreeMap with a more standard open-recursion iterator Tast_mapper. Keep TypedtreeMap/Iter for now, for external projects.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15739 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 09:36:41 +00:00
Alain Frisch 8037548026 Import the abstract_intel_emit branch (merge emit.mlp and emit_nt.mlp by going through an AST of the assembly language).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15619 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-01 10:44:02 +00:00
Alain Frisch 9decba7731 Rename Intel_* to X86_*.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15612 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-27 17:12:21 +00:00
Alain Frisch 8c075ad80a Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15610 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-27 16:43:24 +00:00
Luc Maranget 4fdd5dd354 Oups.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15571 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-07 15:29:48 +00:00
Luc Maranget 3bded3f977 Solve PR#6646, ie avoid introducing huge jump summaries
and unshared default clauses in the presence of many (>= 32) non-matched
constructors.




git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15570 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-07 14:13:53 +00:00
Damien Doligez 031cffd155 merge branch 4.02 from release 4.02.0 to release 4.02.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15 13:34:58 +00:00
Gabriel Scherer ccfa5d7fb1 minor: correct error locations in emit.mlp
From: Pierre Chambart <pierre.chambart@ocamlpro.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15496 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-08 06:59:27 +00:00
Alain Frisch fc4e2cd892 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15330 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-24 16:03:17 +00:00
Alain Frisch 060be502d3 Towards more explicit types.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15232 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-16 16:27:24 +00:00
Alain Frisch 25178442c2 Only include Intel_* modules when arch is i386 or amd64.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15180 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-02 15:07:59 +00:00
Alain Frisch 45f4535e99 Move the DSL part from intel_gas to its own module.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15160 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 14:40:25 +00:00
Fabrice Le Fessant c6d4264a09 import new intel emit branch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15097 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-18 09:32:20 +00:00
Gabriel Scherer 43f47d2f5d PR#6509: Add -linkall flag to ocamlcommon archives (Patch by Frédéric Bour)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15047 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 11:58:03 +00:00
Gabriel Scherer c24c9ac53d Makefile factorization
reducing world's sequentialization consistently improves parallel build times

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14971 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-09 13:53:43 +00:00
Mark Shinwell dc8727466e stop doing chmod -w on utils/config.ml (PR 6319)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14967 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-06 12:01:16 +00:00
Damien Doligez d0368bc2c5 update distclean target
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14801 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 14:03:04 +00:00
Gabriel Scherer e34fa841a0 [minor] Makefile: fix the hard-bootstrap recipe
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14768 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-08 13:34:46 +00:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56:17 +00:00
Xavier Leroy 558f40e344 New back-end optimization pass: common subexpression elimination (CSE).
(Reuses results of previous computations instead of recomputing them.)
(Cherry-picked from branch backend-optim.)
Tested on amd64/linux and i386/linux.
Other back-ends compile (after assorted updates) but are untested.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14688 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 10:40:22 +00:00
Xavier Leroy 9c1d005ebb New back-end optimization pass: dead code elimination.
(Removes arithmetic and load instructions whose results are unused.)
(Cherry-picked from branch backend-optim.)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14686 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 09:31:18 +00:00
Gabriel Scherer 56f1f8a89d makefile target to build the stdlib documentation as html
(Patch by Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14645 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 09:05:32 +00:00
Damien Doligez 7303ac34ca fix some of the whitespace problems in the source
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12 10:17:02 +00:00
Luc Maranget fcf3571123 Folllowup to PR#6359, great cleanup of switch actions sharing.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 15:43:20 +00:00
Damien Doligez 2231b6496b make clean: remove *.cmt and *.cmti files
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14543 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 10:57:12 +00:00
Gabriel Scherer de4f4cf8b3 PR#6358: obey DESTDIR in install targets
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14536 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 07:06:17 +00:00
Alain Frisch 0c4c54c990 Get rid of ocamlcomp.sh. The next step is to share all those common 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-04-02 16:20:38 +00:00
Luc Maranget dd55c293ac Fix PR#6359
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14520 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-02 13:22:21 +00:00
Alain Frisch da5b063687 #6352: add a warning on implicit removal of optional arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14498 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:09:28 +00:00
Luc Maranget c2a88c27fd #PR6269 Optimized string matching
Noticed that I had to bootstrap to test on ARM, so I commit  a new bootstrap
compiler.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14479 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21 17:02:44 +00:00
Mark Shinwell 1f4de8b799 use -bin-annot when building
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14448 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 14:47:30 +00:00
Alain Frisch 4907f6ca76 #5779: improve support for structured constants (better propagation, sharing, cleaner representation). Also fix #6337 (constants emitted several times).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-06 17:03:16 +00:00
Alain Frisch 10abdce7b1 Record inclusion checks between value_descriptions in .cmt files. This makes it easy in particular to track in external tools value declarations between implementations and interfaces.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14422 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-28 11:07:02 +00:00
Damien Doligez c81cc506ec configure: SO must be "so" or "dll" without the dot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14369 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-17 09:58:47 +00:00
Xavier Leroy f65785ae55 Un-bootstrapping of ocamlbuild: build it using a plain Makefile.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14347 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-12 17:38:43 +00:00
Damien Doligez aa58e55958 port to cygwin-64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14337 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-03 14:43:02 +00:00
Xavier Leroy 33f242aaea Reverting the elimination of the ocamlcomp*.sh scripts, namely the following 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-11-29 13:04:38 +00:00
Jérémie Dimino 5d917633ad remove camlp4
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/minus-camlp4@14309 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-21 16:23:28 +00:00
Wojciech Meyer 928503e9b8 build: always build lex/ and ocamlc with the compiler from boot/.
(Patch by Adrien Nader!)

This is a partial revert of revision 14168 which caused issues when
bootstrapping the compiler. Since these directories don't take long to
build, we can always use a byte-compiled compiler.

Bootstrapping and more generally working on the compiler itself does not
play nice with trying to use the most recent compiler as soon as
possible: imagine you've just modified the compiler but in a way that
breaks it at runtime in a non-obvious way; all the files that are
subsequently built will have been built with your the compiler you will
be debugging.

v2: always build tools/ with boot/ocamlc since most executables link
    against compiler libs.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14277 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-10 12:32:12 +00:00
Wojciech Meyer aa7e283b1b build: don't use make's -C; it's not available everywhere.
(Patch by Adrien Nader!)

-C doesn't work on at least openbsd's make so don't use it.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14173 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-21 12:02:49 +00:00
Wojciech Meyer 0cc184754c build: fix "make clean" failure when ./configure hasn't been run again.
(Patch by Adrien Nader!)

The "make clean" rules were relying on the $(ROOTDIR) variable.
However this variable is only defined when ./configure runs. This broke the
usual "make clean ; ./configure && make world.opt":
  < use old trunk >
  ./configure            # config/Makefile doesn't define ROOTDIR
  make world.opt
  < move to new trunk >
  make clean             # Fails early and doesn't clean all files
  ./configure            # config/Makefile now defines ROOTDIR
  make world.opt         # This fails because of left-over files

An easy solution was to run "make clean" again after configure but this is
not how everyone does and in particular, this is not how the jenkins build
bot seem to do.

The recipes for "make clean" should never rely on values defined by
configure for this exact reason.
As a simple solution, only run the commands that rely on $(ROOTDIR) if
$(ROOTDIR) is set.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14172 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-21 12:02:48 +00:00
Wojciech Meyer 241585bc83 build: replace ocamlcomp*.sh.
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-20 00:22:38 +00:00
Damien Doligez fadcc73c50 Merge branch 4.01 from 4.01.0+rc1 to 4.01.0
Command line used:
  svn merge --accept postpone -r 14055:14115 $REPO/version/4.01 .


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14121 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 15:21:52 +00:00
Xavier Clerc e82104a755 Remove labltk from the distribution (will be available as a third-party library).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14077 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-09 09:32:00 +00:00
Alain Frisch f6e4122b85 Do not compile or install by default ocamlast.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14045 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-29 12:51:03 +00:00
Alain Frisch 842f6794a9 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@14042 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-28 17:10:04 +00:00
Gabriel Scherer 27b357ead2 build: fix build on Windows (patch and commit message by Adrien Nader).
CI failures and further testing made me find four more issues:
- forgot to rename a variable from "OCAMLDOC" to "WITH_OCAMLDOC"
  (this issue was also in the non-.nt Makefile)
- syntax error in the installopt rule: missing "fi"
- testsuite doesn't have Makefile.nt so don't use -f Makefile.nt for the
  "clean" rule
- had put an extra call to make "ocamltoolsopt" which in turn built the
  "opt" rule in tools/ but which isn't buildable because it is used to
  build profiling.cmx which, afaiu, is not available on windows (iirc it
  uses posix signals to "sample" the running application).
  That issue was only triggered when building "opt" and not "world.opt"
  and this is why I hadn't noticed it.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13947 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-28 21:08:13 +00:00
Wojciech Meyer dda5f84f7c build: allow disabling ocamldoc and ocamlbuild.
(Patch by Adrien Nader!)

This doesn't touch the build system in build/ since it's obsolete and
unmaintained as far as I know (I'll try to remove it in a further
commit).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13943 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-28 15:52:17 +00:00
Wojciech Meyer 6549fe7019 build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables.
(Patch by Adrien Nader!)

This makes the variable names more coherent and is in preparation for
another patch that will allow disabling ocamldoc and ocamlbuild.

This changes the interface of the configuration somewhat but I don't
think anything outside of the ocaml tree reads the Makefile.config file
that gets installed in order to see whether the debugger and camlp4 have
been built. It also changes a .mli which might be problematic but I also
believe it is safe and we have time to see if there's a bad impact.

It also adds a configure switch to skip building ocamldebug.

While at it, it fixes a PR number in the Changes file.
build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables.

This makes the variable names more coherent and is in preparation for
another patch that will allow disabling ocamldoc and ocamlbuild.

This changes the interface of the configuration somewhat but I don't
think anything outside of the ocaml tree reads the Makefile.config file
that gets installed in order to see whether the debugger and camlp4 have
been built. It also changes a .mli which might be problematic but I also
believe it is safe and we have time to see if there's a bad impact.

It also adds a configure switch to skip building ocamldebug.

While at it, it fixes a PR number in the Changes file.
build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables.

This makes the variable names more coherent and is in preparation for
another patch that will allow disabling ocamldoc and ocamlbuild.

This changes the interface of the configuration somewhat but I don't
think anything outside of the ocaml tree reads the Makefile.config file
that gets installed in order to see whether the debugger and camlp4 have
been built. It also changes a .mli which might be problematic but I also
believe it is safe and we have time to see if there's a bad impact.

It also adds a configure switch to skip building ocamldebug.

While at it, it fixes a PR number in the Changes file.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-28 15:52:14 +00:00
Damien Doligez 5fbcc8e6ae PR#4243: make the Makefiles parallelizable
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13931 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-24 14:39:31 +00:00
Alain Frisch 525ef9d703 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13897 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-16 13:34:30 +00:00
Wojciech Meyer 0425a7246b Revert "build: make building ocamldoc, ocamlbuild and ocamldebug optional."
This patch fixes build failure.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13867 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 21:33:22 +00:00
Wojciech Meyer 21b780c0a5 configure: store $target and $host in the build configuration (fix-pt2). (Patch by Adrien Nader!)
Fixing builds continued.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13866 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 21:33:21 +00:00
Wojciech Meyer 70659109f2 build: make building ocamldoc, ocamlbuild and ocamldebug optional.
(modified patch from Adrien Nader!)

Add also new comments for the new INSTALL flags.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13864 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 19:28:18 +00:00
Wojciech Meyer 086c04495e Revert "configure: store $target and $host in the build configuration." as it breaks several builds.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13858 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 22:01:53 +00:00
Wojciech Meyer e5eeea88af configure: store $target and $host in the build configuration.
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13857 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 12:58:35 +00:00
Gabriel Scherer e7a503dc2a PR#4502: ocamlbuild now reliably excludes the build-dir from hygiene check
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13794 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-17 13:12:40 +00:00
Fabrice Le Fessant ad6c285818 Improved implementation of OCAMLPARAM
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13747 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 16:34:40 +00:00
Fabrice Le Fessant 9b53f8b10d Re-add configure option -with-frame-pointers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 18:03:59 +00:00
Fabrice Le Fessant 97bc1fa9e2 Reverting -with-frame-pointers
Fails to compile alt-ergo without frame-pointers. No time to debug
before tonight, so I revert and will merge again after fixing the
problem.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13732 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 06:29:33 +00:00
Fabrice Le Fessant 1b2667b9f2 Add -with-frame-pointers to ./configure
This option can be used to tell the native compiler that it should
update frame pointers, so that debuggers and profiling tools 
(especially Linux perf) can use them. For now, it is only supported
by the Unix/amd64 port.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 04:42:42 +00:00
Xavier Leroy e29c9d2956 PR#5986: added flag Marshal.Compat_32 and ocamlc option -compat-32.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13554 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 11:58:59 +00:00
Alain Frisch 27d523ea72 Better representation of variance in the Parsetree.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13474 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-02 15:33:35 +00:00
Damien Doligez 3a8ba3567a fix whitespace and over-long lines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13431 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-22 18:20:45 +00:00
Alain Frisch b0987fd693 Attributes on expresions (etc) are now stored in the expression record, to facilitate pattern matching on structured fragments of AST while ignoring attributes. Introducing a new Ast_helper module to help creating AST fragments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13381 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-08 14:59:45 +00:00
Pierre Weis 72cf9f780e Tabify.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13291 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-12 08:14:24 +00:00
Alain Frisch 779580674f Move ast_mapper to parsing/, make it part of compiler-libs, and add an interface. Plus minor code cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13249 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-16 16:10:29 +00:00
Damien Doligez 011b61118d PR#5712: (6) document OCAMLRUNPARAM flag R
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13199 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-03 15:23:40 +00:00
Wojciech Meyer a6774cae34 Entry point for ocamlbuild noboot version.
Is enabled by saying:

# make OCAMLBUILD_NOBOOT=yes world.opt

currently just works for bytecode only.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13189 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 00:33:28 +00:00
Alain Frisch 3ffcd66100 #5741: link pprintast into the compiler (unused for now, but it is available in compiler-libs).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13024 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-17 15:50:07 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Damien Doligez a39a38f94b PR#5278: update Makefile message to mention "make world.opt"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12930 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-09-17 16:25:03 +00:00
Jacques Garrigue 7935673bca ocamlbuild-mixed-boot is not phony
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12926 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-09-13 13:51:41 +00:00
Jacques Garrigue 308c941a19 call ocamltoolsopt earlier
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12874 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-08-23 06:50:40 +00:00
Fabrice Le Fessant 1641d2d16e Remove -g for ocamlopt in Makefile
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12794 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-30 10:00:51 +00:00
Fabrice Le Fessant 5ae3458a4d Remove dependency from typing/envaux.ml to bytecomp/instruct.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12793 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-30 10:00:10 +00:00
Damien Doligez 0c3a7de507 merge changes from 4.00 branching to 4.00.0 (part 1)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-26 19:21:54 +00:00
Wojciech Meyer f786ea843d Install topdirs.cmi in stdlib (problem reported on the mailing list - unable to use install_printer)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12748 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-19 22:45:45 +00:00
Fabrice Le Fessant 776c46fce8 Fix problem of size of bin-annot files
- Reset most of the fields of Env.t when saving bin-annot files
- Move debugger/envaux.ml to typing/, and add a function to 
    recover environements from bin-annot files.
- Move tools/typedtreeIter.ml to typing/
- Move the code of typing/typedtreeMap.ml from cmt_format.ml



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12702 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-12 11:02:18 +00:00
Damien Doligez 9d10503a1d PR#5218: use $(MAKE) instead of "make" in Makefiles
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12694 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-10 15:29:19 +00:00
Fabrice Le Fessant d39d43e55f merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-30 14:52:37 +00:00
Alain Frisch dd6d8257c0 Enabled 'unused rec flag' warning.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12503 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 12:33:51 +00:00
Alain Frisch a0a14c08fa Enable and fix more warnings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12498 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:47:28 +00:00
Alain Frisch 05c973e6ed Compile with warning 33, and remove unused opens.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12497 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:10:03 +00:00
Xavier Leroy 8b5b5f9df5 Makefile: typo in installoptopt entry
otherlibs/labltk: toplevellib.cma is no more, use the new compilerlibs/*.cma stuff instead


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12471 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-21 13:23:08 +00:00
Xavier Leroy 1e3bd1c332 Install compiler internals (as libraries + compiled interfaces + start modules)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12469 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-17 16:04:13 +00:00
Fabrice Le Fessant 7b9f2a7ddf Reverting commits 12385 and 12370, while waiting for a decision to be taken to install compiler files for 4.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12389 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-22 16:11:51 +00:00
Fabrice Le Fessant 905143bfa2 Add hooks in Asmgen
Add hooks in Asmgen to allow external developers to add
new passes on the typedtree, lambda, clambda and cmm trees.
A library 'ocamlopt.cm{a/xa}' is installed, with optmain.cm{x/o},
so that developers can create new ocamlopt executables containing
these new passes.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12370 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-18 08:50:26 +00:00