diff options
author | Florian Angeletti <florian.angeletti@inria.fr> | 2022-06-07 15:06:06 +0200 |
---|---|---|
committer | Florian Angeletti <florian.angeletti@inria.fr> | 2022-06-07 15:06:06 +0200 |
commit | 47f313ec71992e5febd322492d1635ffe710ea8e (patch) | |
tree | 092a05170fb5cf1ee91e710b3d5c4551aa4c4f26 /manual/src | |
parent | 1aaeb19bc15705035b9399d2feb7caef4a76ffcd (diff) | |
download | ocaml-47f313ec71992e5febd322492d1635ffe710ea8e.tar.gz |
documentation: new location for otherlibs
Diffstat (limited to 'manual/src')
-rw-r--r-- | manual/src/library/Makefile | 7 | ||||
-rw-r--r-- | manual/src/library/libdynlink.etex | 3 | ||||
-rw-r--r-- | manual/src/library/libstr.etex | 10 | ||||
-rw-r--r-- | manual/src/library/libunix.etex | 13 |
4 files changed, 24 insertions, 9 deletions
diff --git a/manual/src/library/Makefile b/manual/src/library/Makefile index f9c0e73459..c5b7b6d380 100644 --- a/manual/src/library/Makefile +++ b/manual/src/library/Makefile @@ -1,6 +1,8 @@ ROOTDIR = ../../.. TEXQUOTE = $(ROOTDIR)/runtime/ocamlrun ../../tools/texquote2 +CAMLLATEX = CAML_LD_LIBRARY_PATH="" $(OCAMLRUN) $(addprefix -I ,$(LD_PATH)) \ + $(ROOTDIR)/tools/caml-tex -repo-root $(ROOTDIR) -n 80 -v false FILES = core.tex builtin.tex stdlib-blurb.tex compilerlibs.tex \ libunix.tex libstr.tex old.tex libthreads.tex libdynlink.tex @@ -8,7 +10,10 @@ FILES = core.tex builtin.tex stdlib-blurb.tex compilerlibs.tex \ etex-files: $(FILES) all: etex-files -%.tex: %.etex +%.gen.tex: %.etex + $(CAMLLATEX) $< -o $@ + +%.tex: %.gen.tex $(TEXQUOTE) < $< > $*.texquote_error.tex mv $*.texquote_error.tex $@ diff --git a/manual/src/library/libdynlink.etex b/manual/src/library/libdynlink.etex index a198a68119..e19443fa7e 100644 --- a/manual/src/library/libdynlink.etex +++ b/manual/src/library/libdynlink.etex @@ -14,7 +14,8 @@ might be useful to hide ".cmx" files when building native plugins so that they remain independent of the implementation of modules in the main program. -Programs that use the "dynlink" library simply need to link +Programs that use the "dynlink" library simply need to include +the dynlink library directory with "-I +dynlink" and link "dynlink.cma" or "dynlink.cmxa" with their object files and other libraries. \textbf{Note:} in order to insure that the dynamically-loaded modules have diff --git a/manual/src/library/libstr.etex b/manual/src/library/libstr.etex index 095c5e6f16..b8faa9166c 100644 --- a/manual/src/library/libstr.etex +++ b/manual/src/library/libstr.etex @@ -8,8 +8,8 @@ such as "awk", "perl" or "sed". Programs that use the "str" library must be linked as follows: \begin{alltt} - ocamlc \var{other options} str.cma \var{other files} - ocamlopt \var{other options} str.cmxa \var{other files} + ocamlc \var{other options} -I +str str.cma \var{other files} + ocamlopt \var{other options} -I +str str.cmxa \var{other files} \end{alltt} For interactive use of the "str" library, do: \begin{alltt} @@ -17,7 +17,11 @@ For interactive use of the "str" library, do: ./mytop \end{alltt} or (if dynamic linking of C libraries is supported on your platform), -start "ocaml" and type "#load \"str.cma\";;". +start "ocaml" and type +\begin{caml_example*}{toplevel} +#directory "+str";; +#load "str.cma";; +\end{caml_example*} \begin{linklist} \libdocitem{Str}{regular expressions and string processing} diff --git a/manual/src/library/libunix.etex b/manual/src/library/libunix.etex index 7cac596a8f..0cdb870a97 100644 --- a/manual/src/library/libunix.etex +++ b/manual/src/library/libunix.etex @@ -20,16 +20,21 @@ are not available, they will raise "Invalid_arg" when called. Programs that use the "unix" library must be linked as follows: \begin{alltt} - ocamlc \var{other options} unix.cma \var{other files} - ocamlopt \var{other options} unix.cmxa \var{other files} + ocamlc \var{other options} -I +unix unix.cma \var{other files} + ocamlopt \var{other options} -I +unix unix.cmxa \var{other files} \end{alltt} For interactive use of the "unix" library, do: \begin{alltt} - ocamlmktop -o mytop unix.cma + ocamlmktop -o mytop -I +unix unix.cma ./mytop \end{alltt} or (if dynamic linking of C libraries is supported on your platform), -start "ocaml" and type "#load \"unix.cma\";;". +start "ocaml" and type + +\begin{caml_example*}{toplevel} +#directory "+unix";; +#load "unix.cma";; +\end{caml_example*} \begin{latexonly} \begin{windows} |