Commit Graph

66 Commits (ac2a9dd188f0738a87018f5ee6e6b0b301bb1b63)

Author SHA1 Message Date
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
Sébastien Hinderer 8550f71441 Build system: use $(ROOTDIR) rather than hardcoded paths to access ocamlc 2019-01-03 17:02:25 +01:00
Sébastien Hinderer d258bb78ac Build system: use ocamlc -depend rather than ocamldep 2019-01-03 16:43:23 +01: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
Francois Berenger 5b884d6244 Unix fsync (#1839)
* added otherlibs/unix/fsync.c and otherlibs/unix/unix.ml

* add Unix.fsync

* added otherlibs/win32unix/fsync.c

* Unix.fsync for windows

* big typo

* Rewrite Unix.fsync stub for Windows

* belts and braces: fail in the case of named pipe

* Add missing include

* corrected header

* better ocamldoc for fsync

* rm fsync.c from the UNIX_FILES list

* updated Changes for Unix.fsync

* Use _commit instead of FlushFileBuffers

* Include <io.h>
2018-07-31 07:57:21 +02:00
Sébastien Hinderer 85fa27f7e9 Rename C compiler related build variables
This commit renames a few C compiler related build variables so that
they are reserved for the build system. They will then be re-introduced,
but this time as user varialbes whose value can be freely customized
when compiling the package, without risking to conflict with those
command-line flags that are required by the build system itself.

Here are the variables this commit renames:

- CFLAGS -> OC_CFLAGS
- CPPFLAGS -> OC_CPPFLAGS
- LDFLAGS -> OC_LDFLAGS

Note: before this commit the compilation of scheduler.c in
otherlibs/threads was relying on make's implicit rule to compile C files.

Since this commit stops using the standard variables for flags,
it is necessary to introduce an explicit rule to compile C files
and that makes use of the newly introduced variables.
2018-06-20 14:01:42 +02:00
Xavier Leroy ea9dc4e555
Add checks to the conversion of Unix file descriptors to I/O channels (#1825)
Unix.{in,out}_channel_of_descr now check that descr has stream semantics.
These functions fail if the given file descriptor is not suitable for
character-oriented I/O, e.g. a block device or a datagram socket.
Fixes part of MPR#7238.
2018-06-14 10:56:25 +02:00
Sébastien Hinderer b08deacf18 configure should define the CPP build variable
The CPP variable tells the build system how to invoke the C preprocessor.

Before this commit, this variable was defined by the Windows Makefiles
but not by the Makefile generated by configure. This commit fixes this.

This commit also fixes a few makefiles: to compute dependencies for C files,
they incorrectly called $(CPP) -MM instead of $(CC) -MM.
2017-09-18 17:40:14 +02:00
Sébastien Hinderer f2d5d60376 Define new build variables for C compiler and preprocessor flags 2017-03-29 11:10:06 +02:00
Xavier Leroy a9e4c54b75 Deprecation of Bigarray.*.map_file and introduction of Unix.map_file, continued
This is a follow-up to GPR #997 with a different implementation that creates fewer dependencies.

We add to the runtime a `byterun/bigarray.c` file that contains the bigarray creation functions that used to be in `otherlibs/bigarray/bigarray_stubs.c`.  In the latter file we keep all primitives needed to implement the Bigarray interface.  The functions in the new `byterun/bigarray.c` make it possible to create bigarrays both from the bigarray library and from the unix library.

The header file `bigarray.h` moves to `byterun/caml/bigarray.h` accordingly.

The `map_file` implementations move to `otherlibs/unix/mmap.c` and `otherlibs/win32unix/mmap.c`.  Some bigarray allocation code shared between the two implementations is put in `otherlibs/unix/mmap_ba.c`.

Through a couple of `#ifdef`, the `map_file` implementations can also be compiled from within `otherlibs/bigarray` with the same semantics they had in 4.04.

As a consequence, the bigarray library still contains a standalone, Unix-independent implementation of `Bigarray.*.map_file`; the only difference with 4.04 is that it is marked deprecated.

Current status: compiled and lightly tested under Unix.  Win32 implementation neither compiled nor tested.
2017-03-13 19:15:10 +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
ygrek b16b9d590a dllunix.so needs -lm for modf 2016-11-26 15:24:14 -08:00
alainfrisch c1ead896a2 Pass -slash to ocamldep so that dependencies generated from a Windows system are closer to those generated from a Unix system. 2016-04-13 17:04:15 +02: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 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
Damien Doligez 66af6470a6 PR#5418 (comments) : generate dependencies with $(CC) instead of gcc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-20 17:02:26 +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 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Xavier Leroy 6c55d7fea2 PR#4632: install socketaddr.h header in lib/caml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10442 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-20 09:40:41 +00:00
Xavier Leroy 238cf4bde3 PR#3047: added Unix.setgroups, Unix.initgroups.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9220 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-04-01 16:50:10 +00:00
Alain Frisch 3958a92c72 Merge the natdynlink branch into HEAD.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8477 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-06 15:16:56 +00:00
Damien Doligez aabb13f857 ajout VERSION + cvsignore
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7836 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-07 15:49:11 +00:00
Damien Doligez 5d5094fe30 PR#4123, PR#4125: export unixsupport.h with unix_error_of_code
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7832 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-07 14:45:46 +00:00
Xavier Leroy 4b5512c74c Stack backtraces on uncaught exceptions in native code (merge of the opt_backtrace branch)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7812 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-01-29 12:11:18 +00:00
Xavier Leroy 0b1b6eb0c6 Ajout de Unix.isatty
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7632 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-09-21 13:54:26 +00:00
Damien Doligez 35de2ce529 mise au carre des warnings XYZ
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6714 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-11-29 14:53:32 +00:00
Jacques Garrigue 0edba97cf6 new warning for black holes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6703 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-11-29 02:27:25 +00:00
Damien Doligez 4ffbf5ec57 ajout warning unused variable
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6669 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-11-06 20:17:47 +00:00
Xavier Leroy 641657c87b Support IPv6
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6193 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-04-09 13:25:23 +00:00
Xavier Leroy fa10aa694e Installer les stub DLLs dans LIBDIR/stublibs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4960 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-27 11:36:02 +00:00
Jacques Garrigue b148bb401e acceleration des Makefiles
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4758 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-04-27 14:45:33 +00:00
Xavier Leroy cefcfba94a Mettre -D_FILE_OFFSET_BITS=64 dans les options de compilation partagees par tout le monde
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4533 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-03-15 14:38:37 +00:00
Xavier Leroy bddfe5d0ce Ajout operations sur gros fichiers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4474 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-03-02 09:16:39 +00:00
Damien Doligez 42f72c7694 ajout -warn-error
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4282 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-01-20 15:12:32 +00:00
Xavier Leroy 7501784c80 MAJ en-tetes pour mentionner la 'special exception' sur la LGPL
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4144 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-12-07 13:41:02 +00:00
Xavier Leroy ac238f8632 Appeler ocamlmklib via ocamlrun (PR#613)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3999 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-11-08 10:32:24 +00:00
Xavier Leroy 343d49401a Revu gestion des DLLs: ne pas les utiliser en mode -custom; dans les .cma et .cmxa, stocker separement les options pour linker statiquement (-cclib) et par chargement dynamique (-dllib).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3949 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-10-30 09:32:32 +00:00
Jacques Garrigue 12e6fe3ffa be friendly to non-gnu make
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3860 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-10-06 02:24:45 +00:00
Jacques Garrigue ea299bbbc1 passage aux labels stricts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3696 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-09-06 08:52:32 +00:00
Xavier Leroy ddd99c7e5d Chargement dynamique de primitives C
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3677 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-08-28 14:47:48 +00:00
Xavier Leroy c7b7c24381 Nouveau format de .cma et .cmxa, se rappelle des -cclib et -ccopt necessaires pour le link final
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2930 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-03-09 09:12:28 +00:00
Xavier Leroy f723d5394f Revu les Makefiles pour qu'ils utilisent ocamlc et non boot/ocamlc (puisqu'ils utilisent stdlib et non boot)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2789 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-05 12:16:09 +00:00
Xavier Leroy cc0f32b054 Changement de la licence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Xavier Leroy ee699eec48 Ajout de sigprocmask, sigpending, sigsuspend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2040 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-08-08 16:53:42 +00:00
Xavier Leroy 11a4c45b78 Ajout de putenv et getenv.
Dams mktime: ignorer le champ is_dst fourni en argument.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1947 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-04-30 13:30:03 +00:00
Damien Doligez 09505325a4 bug "make depend" avant "make install"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1925 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-04-21 16:09:03 +00:00
Xavier Leroy c316e8e8c8 Nettoyages, copie des .mli dans LIBDIR
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1681 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-07-30 12:29:46 +00:00
Xavier Leroy 6cc9c43866 Eradication des warnings de gcc.
Nettoyages divers.
Suppression de ioctl.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1597 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-06-13 15:52:43 +00:00
Xavier Leroy 4a2e700ea6 Renommage make clean -> make partialclean et make realclean -> make clean. Non teste sur Mac et Win32.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-02-16 13:36:42 +00:00
Xavier Leroy d0c1f4366b Ajout de setsid()
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1266 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-02-14 16:29:10 +00:00