Skip to content

Commit 40fcbb5

Browse files
committedApr 26, 2017
Move configuration header files from the config to the byterun/caml directory
This commit moves: - config/m.h to byterun/caml/m.h - config/s.h to byterun/caml/s.h Consequently, m.h and s.h now get installed alongside other OCaml header files. This commit also updates the .depend files, introducing updates in the dependencies which are not consequences of this commit itself.
1 parent 418b706 commit 40fcbb5

36 files changed

+2885
-3103
lines changed
 

‎.depend

+4-6
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,10 @@ typing/env.cmi : utils/warnings.cmi typing/types.cmi typing/subst.cmi \
205205
typing/path.cmi parsing/longident.cmi parsing/location.cmi \
206206
typing/ident.cmi utils/consistbl.cmi typing/cmi_format.cmi \
207207
parsing/asttypes.cmi
208-
typing/envaux.cmo : typing/types.cmi typing/subst.cmi typing/printtyp.cmi \
209-
typing/path.cmi utils/misc.cmi typing/ident.cmi typing/env.cmi \
210-
parsing/asttypes.cmi typing/envaux.cmi
211-
typing/envaux.cmx : typing/types.cmx typing/subst.cmx typing/printtyp.cmx \
212-
typing/path.cmx utils/misc.cmx typing/ident.cmx typing/env.cmx \
213-
parsing/asttypes.cmi typing/envaux.cmi
208+
typing/envaux.cmo : typing/subst.cmi typing/printtyp.cmi typing/path.cmi \
209+
typing/ident.cmi typing/env.cmi parsing/asttypes.cmi typing/envaux.cmi
210+
typing/envaux.cmx : typing/subst.cmx typing/printtyp.cmx typing/path.cmx \
211+
typing/ident.cmx typing/env.cmx parsing/asttypes.cmi typing/envaux.cmi
214212
typing/envaux.cmi : typing/subst.cmi typing/path.cmi typing/env.cmi
215213
typing/ident.cmo : utils/identifiable.cmi typing/ident.cmi
216214
typing/ident.cmx : utils/identifiable.cmx typing/ident.cmi

‎.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@
105105
/bytecomp/opcodes.ml
106106

107107
/byterun/caml/jumptbl.h
108+
/byterun/caml/m.h
109+
/byterun/caml/s.h
108110
/byterun/primitives
109111
/byterun/prims.c
110112
/byterun/caml/opnames.h
@@ -119,8 +121,6 @@
119121
/byterun/*.d.c
120122
/byterun/*.pic.c
121123

122-
/config/m.h
123-
/config/s.h
124124
/config/Makefile
125125
/config/auto-aux/hashbang4
126126

‎Changes

+5
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ Working version
115115
- GPR#1032: display the output of -dtimings as a hierarchy
116116
(Valentin Gatien-Baron, review by Gabriel Scherer)
117117

118+
- GPR#1127: move config/{m,s}.h to byterun/caml and install them.
119+
User code should not have to include them directly since they are
120+
included by other header files
121+
(Sébastien Hinderer)
122+
118123
### Bug fixes
119124

120125
- PR#5927: Type equality broken for conjunctive polymorphic variant tags

‎INSTALL.adoc

+5-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
./configure
2727
+
28-
This generates the three configuration files `Makefile`, `m.h` and `s.h`
29-
in the `config/` subdirectory.
28+
This generates the three configuration files `config/Makefile`,
29+
`byterun/caml/m.h` and `byterun/caml/s.h`.
3030
+
3131
The `configure` script accepts the following options:
3232
+
@@ -313,8 +313,9 @@ In the latter case, the destination directory defaults to the
313313
Read the "common problems" and "machine-specific hints" section at the end of
314314
this file.
315315

316-
Check the files `m.h` and `s.h` in `config/`. Wrong endianness or alignment
317-
constraints in `m.h` will immediately crash the bytecode interpreter.
316+
Check the files `m.h` and `s.h` in `byterun/caml/`.
317+
Wrong endianness or alignment constraints in `machine.h` will
318+
immediately crash the bytecode interpreter.
318319

319320
If you get a "segmentation violation" signal, check the limits on the stack size
320321
and data segment size (type `limit` under csh or `ulimit -a` under bash). Make

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ depend: beforedepend
12881288
distclean: clean
12891289
rm -f boot/ocamlrun boot/ocamlrun$(EXE) boot/camlheader \
12901290
boot/ocamlyacc boot/*.cm* boot/libcamlrun.$(A)
1291-
rm -f config/Makefile config/m.h config/s.h
1291+
rm -f config/Makefile byterun/caml/m.h byterun/caml/s.h
12921292
rm -f tools/*.bak
12931293
rm -f ocaml ocamlc
12941294
rm -f testsuite/_log

‎README.win32.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ quickly as it will be unable to link `ocamlrun`.
192192

193193
Now run:
194194

195-
cp config/m-nt.h config/m.h
196-
cp config/s-nt.h config/s.h
195+
cp config/m-nt.h byterun/caml/m.h
196+
cp config/s-nt.h byterun/caml/s.h
197197

198198
followed by:
199199

@@ -263,8 +263,8 @@ the WinZip Options Window.)
263263

264264
Now run:
265265

266-
cp config/m-nt.h config/m.h
267-
cp config/s-nt.h config/s.h
266+
cp config/m-nt.h byterun/caml/m.h
267+
cp config/s-nt.h byterun/caml/s.h
268268

269269
followed by:
270270

‎appveyor_build.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ make MSVC_DETECT=0 CHAINS=msvc64 support
6767
cp flexdll*_msvc64.obj "$PREFIX/bin/flexdll"
6868
cd ..
6969

70-
cp config/m-nt.h config/m.h
71-
cp config/s-nt.h config/s.h
70+
cp config/m-nt.h byterun/caml/m.h
71+
cp config/s-nt.h byterun/caml/s.h
7272

7373
echo "Edit config/Makefile to set PREFIX=$PREFIX"
7474
sed -e "s|PREFIX=.*|PREFIX=$PREFIX|" -e "/\(BYTE\|NATIVE\)CCCOMPOPTS=./s/\r\?$/ -WX\0/" config/Makefile.msvc64 > config/Makefile
@@ -81,8 +81,8 @@ run "make opt.opt" make opt.opt
8181

8282
cd ../build-mingw32
8383

84-
cp config/m-nt.h config/m.h
85-
cp config/s-nt.h config/s.h
84+
cp config/m-nt.h byterun/caml/m.h
85+
cp config/s-nt.h caml/byterun/s.h
8686

8787
PREFIX="C:/Program Files/OCaml-mingw32"
8888
echo "Edit config/Makefile to set PREFIX=$PREFIX"

‎asmrun/.depend

+1,218-1,282
Large diffs are not rendered by default.

‎asmrun/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ endif
5858
IFLAGS=$(CFLAGS) -DCAML_INSTR
5959
PICFLAGS=$(CFLAGS) $(SHAREDCCCOMPOPTS)
6060

61-
ASPPFLAGS = -DSYS_$(SYSTEM)
61+
ASPPFLAGS = -DSYS_$(SYSTEM) -I../byterun
6262
ifeq "$(UNIX_OR_WIN32)" "unix"
6363
ASPPFLAGS += -DMODEL_$(MODEL)
6464
endif

‎asmrun/amd64.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/* PIC mode support based on contribution by Paul Stravers (see PR#4795) */
2020

21-
#include "../config/m.h"
21+
#include "caml/m.h"
2222

2323
#if defined(SYS_macosx)
2424

‎asmrun/i386.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/* Asm part of the runtime system, Intel 386 processor */
1717
/* Must be preprocessed by cpp */
1818

19-
#include "../config/m.h"
19+
#include "caml/m.h"
2020

2121
/* Linux/BSD with ELF binaries and Solaris do not prefix identifiers with _.
2222
Linux/BSD with a.out binaries and NextStep do. */

‎asmrun/spacetime_offline.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include "caml/sys.h"
3737
#include "caml/spacetime.h"
3838

39-
#include "../config/s.h"
39+
#include "caml/s.h"
4040

4141
#ifdef ARCH_SIXTYFOUR
4242

0 commit comments

Comments
 (0)
Please sign in to comment.