···2424not have this which causes some important development things to be disabled
2525(ocamltest and converting C compiler warnings to errors).
26262727-2. Consult link:INSTALL.adoc[] for build instructions. Here is the gist of it:
2727+2. Consult xref:INSTALL.adoc[] for build instructions. Here is the gist of it:
2828+
2929[source,sh]
3030----
···113113114114Parses source files and produces an Abstract Syntax Tree (AST)
115115(link:parsing/parsetree.mli[] has lot of helpful comments). See
116116-link:parsing/HACKING.adoc[].
116116+xref:parsing/HACKING.adoc[].
117117118118The logic for Camlp4 and Ppx preprocessing is not in link:parsing/[],
119119but in link:driver/[], see link:driver/pparse.mli[] and
···123123124124Type-checks the AST and produces a typed representation of the program
125125(link:typing/typedtree.mli[] has some helpful comments). See
126126-link:typing/HACKING.adoc[].
126126+xref:typing/HACKING.adoc[].
127127128128==== The bytecode compiler -- link:bytecomp/[]
129129···145145and `runtime_NATIVE_ONLY_C_SOURCES` in link:Makefile[] for the list of common,
146146bytecode-only, and native-only source files.)
147147148148-See link:runtime/HACKING.adoc[].
148148+See xref:runtime/HACKING.adoc[].
149149150150=== Libraries
151151···183183184184=== Complete file listing
185185186186- BOOTSTRAP.adoc:: instructions for bootstrapping
187187- Changes:: what's new with each release
188188- CONTRIBUTING.md:: how to contribute to OCaml
189189- HACKING.adoc:: this file
190190- INSTALL.adoc:: instructions for installation
191191- LICENSE:: license and copyright notice
192192- Makefile:: main Makefile
193193- Makefile.common:: common Makefile definitions
194194- README.adoc:: general information on the compiler distribution
195195- README.win32.adoc:: general information on the Windows ports of OCaml
196196- VERSION:: version string. Run `tools/autogen` after changing.
197197- asmcomp/:: native-code compiler and linker
198198- boot/:: bootstrap compiler
199199- build-aux/:: autotools support scripts
200200- bytecomp/:: bytecode compiler and linker
201201- compilerlibs/:: the OCaml compiler as a library
202202- configure:: configure script
203203- configure.ac:: autoconf input file
204204- debugger/:: source-level replay debugger
205205- driver/:: driver code for the compilers
206206- flexdll/:: git submodule -- see link:README.win32.adoc[]
207207- lex/:: lexer generator
208208- man/:: man pages
209209- manual/:: system to generate the manual
210210- middle_end/:: the flambda optimisation phase
211211- ocamldoc/:: documentation generator
212212- ocamltest/:: test driver
213213- otherlibs/:: several additional libraries
214214- parsing/:: syntax analysis -- see link:parsing/HACKING.adoc[]
215215- release-info/:: documentation and tools to prepare releases
216216- runtime/:: bytecode interpreter and runtime systems
217217- stdlib/:: standard library
218218- testsuite/:: tests -- see link:testsuite/HACKING.adoc[]
219219- tools/:: various utilities
220220- toplevel/:: interactive system
221221- typing/:: typechecking -- see link:typing/HACKING.adoc[]
222222- utils/:: utility libraries
223223- winpthreads/:: winpthreads submodule -- see <<winpthreads,further>>
224224- yacc/:: parser generator
186186+ xref:BOOTSTRAP.adoc[]:: instructions for bootstrapping
187187+ link:Changes[]:: what’s new with each release
188188+ link:CONTRIBUTING.md[]:: how to contribute to OCaml
189189+ xref:HACKING.adoc[]:: this file
190190+ xref:INSTALL.adoc[]:: instructions for installation
191191+ link:LICENSE[]:: license and copyright notice
192192+ link:Makefile[]:: main Makefile
193193+ link:Makefile.common[]:: common Makefile definitions
194194+ xref:README.adoc[]:: general information on the compiler distribution
195195+ xref:README.win32.adoc[]:: general information on the Windows ports of OCaml
196196+ link:VERSION[]:: version string. Run `make configure` after changing.
197197+ link:asmcomp/[]:: native-code compiler and linker
198198+ link:boot/[]:: bootstrap compiler
199199+ link:build-aux/[]:: autotools support scripts
200200+ link:bytecomp/[]:: bytecode compiler and linker
201201+ link:compilerlibs/[]:: the OCaml compiler as a library
202202+ link:configure[]:: configure script
203203+ link:configure.ac[]:: autoconf input file
204204+ link:debugger/[]:: source-level replay debugger
205205+ link:driver/[]:: driver code for the compilers
206206+ link:flexdll/[]:: git submodule -- see xref:README.win32.adoc[]
207207+ link:lex/[]:: lexer generator
208208+ link:man/[]:: man pages
209209+ link:manual/[]:: system to generate the manual
210210+ link:middle_end/[]:: the flambda optimisation phase
211211+ link:ocamldoc/[]:: documentation generator
212212+ link:ocamltest/[]:: test driver
213213+ link:otherlibs/[]:: several additional libraries
214214+ link:parsing/[]:: syntax analysis -- see xref:parsing/HACKING.adoc[]
215215+ link:release-info/[]:: documentation and tools to prepare releases
216216+ link:runtime/[]:: bytecode interpreter and runtime systems
217217+ link:stdlib/[]:: standard library
218218+ link:testsuite/[]:: tests -- see xref:testsuite/HACKING.adoc[]
219219+ link:tools/[]:: various utilities
220220+ link:toplevel/[]:: interactive system
221221+ link:typing/[]:: typechecking -- see xref:typing/HACKING.adoc[]
222222+ link:utils/[]:: utility libraries
223223+ link:winpthreads/[]:: winpthreads submodule -- see <<winpthreads,further>>
224224+ link:yacc/[]:: parser generator
225225226226[#tips]
227227== Development tips and tricks
···418418419419=== Useful Makefile targets and options
420420421421-Besides the targets listed in link:INSTALL.adoc[] for build and
421421+Besides the targets listed in xref:INSTALL.adoc[] for build and
422422installation, the following targets may be of use:
423423424424`make runtop` :: builds and runs the ocaml toplevel of the distribution
···431431432432`make depend`:: Regenerate the `.depend` file. Should be used each time new dependencies are added between files.
433433434434-`make -C testsuite parallel`:: see link:testsuite/HACKING.adoc[]
434434+`make -C testsuite parallel`:: see xref:testsuite/HACKING.adoc[]
435435436436You can use `make foo V=1` to build the target foo and show full
437437commands instead of abbreviated names like OCAMLC, etc. This can be
···482482link:boot/[] directory. These bytecode images are used once the
483483bytecode runtime (which is written in C) has been built to compile the
484484standard library and then to build a fresh compiler. Details can be
485485-found in link:BOOTSTRAP.adoc[].
485485+found in xref:BOOTSTRAP.adoc[].
486486487487=== Speeding up builds
488488
+1-1
INSTALL.adoc
···2525 ** For Windows +
2626 To produce native Windows executables from OCaml sources, you need to use
2727 the MSVC or MinGW-w64 ports of OCaml, described in file
2828- https://github.com/ocaml/ocaml/blob/trunk/README.win32.adoc[README.win32.adoc]. +
2828+ xref:README.win32.adoc[]. +
2929 For a more Unix-like experience, you can use WSL, the
3030 https://aka.ms/wsl[Windows Subsystem for Linux], or the
3131 https://www.cygwin.com/[Cygwin environment]. You will need the
+3-3
README.adoc
···86868787== Installation
88888989-See the file link:INSTALL.adoc[] for installation instructions on
8989+See the file xref:INSTALL.adoc[] for installation instructions on
9090machines running Unix, Linux, macOS, WSL and Cygwin. For native Microsoft
9191-Windows, see link:README.win32.adoc[].
9191+Windows, see xref:README.win32.adoc[].
92929393== Documentation
9494···146146147147== Contributing
148148149149-For information on contributing to OCaml, see link:HACKING.adoc[] and
149149+For information on contributing to OCaml, see xref:HACKING.adoc[] and
150150link:CONTRIBUTING.md[].
151151152152== Separately maintained components
+1-1
README.win32.adoc
···43434444Cygwin aims to provide a Unix-like environment on Windows, and the build
4545procedure for it is the same as for other flavours of Unix. See
4646-link:INSTALL.adoc[] for full instructions.
4646+xref:INSTALL.adoc[] for full instructions.
47474848OCaml requires Windows 8 or later and naturally the 64-bit versions need a
494964-bit edition of Windows (note that this is both to run *and* build).
+1-1
stdlib/HACKING.adoc
···66Note: All paths are given relative to the root of the repository.
7788First, build the compiler. Run `./configure`, then `make`. See
99-link:../HACKING.adoc[].
99+xref:../HACKING.adoc[].
10101111To add a new module, you must:
1212
+1-1
utils/HACKING.adoc
···1919increment the version of every kind of magic number.
20202121The process for bootstrapping the compiler is covered in
2222-link:../BOOTSTRAP.adoc[BOOTSTRAP.adoc]. There is also a test script in CI which
2222+xref:../BOOTSTRAP.adoc[]. There is also a test script in CI which
2323demonstrates the process in
2424link:../tools/ci/inria/bootstrap/script[tools/ci/inria/bootstrap].
2525