summaryrefslogtreecommitdiff
path: root/manual/tools
diff options
context:
space:
mode:
authoroctachron <octa@polychoron.fr>2016-04-24 18:56:31 +0200
committeroctachron <octa@polychoron.fr>2016-04-24 21:51:11 +0200
commit3383bb78f3f555c52dcb95264bb0745a428a4681 (patch)
tree8f34afa3f181972a71f09893ff7f975aad9db107 /manual/tools
parentb61fe71bf19ddf8d50c0dbe794267c38ad2aa2ff (diff)
downloadocaml-3383bb78f3f555c52dcb95264bb0745a428a4681.tar.gz
Manual: makefiles use in-tree compiler/interpreter
First, this commit splits testsuite/makefiles/Makefile.common in two: * Makefile.tools contains the definitions of the in-tree compiler and interpreter variables * Makefile.common includes Makefile.tools and defines the same targets as previously. Second, this commit uses the definitions of the in-tree compiler and interpreter in Makefile.tools to: * compile the manual tools (inside manual/tools) * eval the caml_example and caml_eval environment in the tutorial part of the manual
Diffstat (limited to 'manual/tools')
-rw-r--r--manual/tools/Makefile29
1 files changed, 16 insertions, 13 deletions
diff --git a/manual/tools/Makefile b/manual/tools/Makefile
index c46a77f2e7..12d044cc9f 100644
--- a/manual/tools/Makefile
+++ b/manual/tools/Makefile
@@ -1,3 +1,8 @@
+TOPDIR=../..
+LD_PATH=$(TOPDIR)/otherlibs/str
+COMPFLAGS=-I $(OTOPDIR)/otherlibs/str -I $(OTOPDIR)/otherlibs/unix
+include $(TOPDIR)/testsuite/makefiles/Makefile.tools
+
CFLAGS=-g -O
all: texquote2 transf htmlquote htmlgen dvi2txt caml-tex2
@@ -6,33 +11,31 @@ dvi2txt:
cd dvi_to_txt; ${MAKE}
transf: transf.cmo htmltransf.cmo transfmain.cmo
- ocamlc -o transf -g transf.cmo htmltransf.cmo transfmain.cmo
+ $(OCAMLC) -o transf -g transf.cmo htmltransf.cmo transfmain.cmo
transf.ml: transf.mll
- ocamllex transf.mll
+ $(OCAMLLEX) transf.mll
htmltransf.ml: htmltransf.mll
- ocamllex htmltransf.mll
+ $(OCAMLLEX) htmltransf.mll
htmlgen: latexmacros.cmo latexscan.cmo latexmain.cmo
- ocamlc -o htmlgen -g latexmacros.cmo latexscan.cmo latexmain.cmo
+ $(OCAMLC) -o htmlgen -g latexmacros.cmo latexscan.cmo latexmain.cmo
latexscan.ml: latexscan.mll
ocamllex latexscan.mll
caml-tex2: caml_tex2.cmo
- ocamlc -o caml-tex2 str.cma unix.cma caml_tex2.cmo
-# ocamlc -custom -o caml-tex2 str.cma unix.cma caml-tex2.cmo \
-# -cclib -lunix -cclib -lstr
+ $(OCAMLC) -o caml-tex2 str.cma unix.cma caml_tex2.cmo
.SUFFIXES:
.SUFFIXES: .ml .cmo .mli .cmi .c
.ml.cmo:
- ocamlc -c $<
+ $(OCAMLC) -c $<
.mli.cmi:
- ocamlc -c $<
+ $(OCAMLC) -c $<
.c:
$(CC) $(CFLAGS) -o $@ $<
@@ -45,7 +48,7 @@ clean:
rm -f *~ #*#
cd dvi_to_txt; ${MAKE} clean
-latexmacros.cmo: latexmacros.cmi
-latexmain.cmo: latexscan.cmo
-latexscan.cmo: latexmacros.cmi
-transfmain.cmo: transf.cmo htmltransf.cmo
+latexmacros.cmo: latexmacros.cmi
+latexmain.cmo: latexscan.cmo
+latexscan.cmo: latexmacros.cmi
+transfmain.cmo: transf.cmo htmltransf.cmo