summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2000-08-31 01:10:14 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2000-08-31 01:10:14 +0000
commit2e44915a373bfc16cb09e4e839199d7cf41a8a8b (patch)
tree0fdf76abbc912a8491240fbf9415d4790920d855
parent513e7622afc49e6186eae622580b394d06c0f735 (diff)
downloadocaml-2e44915a373bfc16cb09e4e839199d7cf41a8a8b.tar.gz
add ocamllex.opt and opt.opt targets
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3290 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--INSTALL4
-rw-r--r--Makefile6
-rw-r--r--Makefile.nt5
-rw-r--r--lex/.cvsignore1
-rw-r--r--lex/Makefile12
-rw-r--r--lex/Makefile.nt12
6 files changed, 36 insertions, 4 deletions
diff --git a/INSTALL b/INSTALL
index a4735d76a7..a0e2c90976 100644
--- a/INSTALL
+++ b/INSTALL
@@ -145,6 +145,9 @@ Just do:
make ocamlc.opt # to build a native-code version of ocamlc
make ocamlopt.opt # to build a native-code version of ocamlopt
+ make ocamllex.opt # to build a native-code version of ocamllex
+or
+ make opt.opt # to build all of them
Later, you can compile your programs to bytecode using ocamlc.opt
instead of ocamlc, and to native-code using ocamlopt.opt instead of
@@ -174,6 +177,7 @@ and also, if you built them during step 5,
ocamlc.opt the batch bytecode compiler compiled with ocamlopt
ocamlopt.opt the batch native-code compiler compiled with ocamlopt
+ ocamllex.opt the lexer generator compiled with ocamlopt
From the top directory, become superuser and do:
diff --git a/Makefile b/Makefile
index f94456c5f3..2b8305929e 100644
--- a/Makefile
+++ b/Makefile
@@ -204,6 +204,9 @@ cleanboot:
# Compile the native-code compiler
opt: runtimeopt ocamlopt libraryopt otherlibrariesopt
+# Native-code versions of the tools
+opt.opt: ocamlc.opt ocamlopt.opt ocamllex.opt
+
# Installation
install: FORCE
if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi
@@ -233,6 +236,7 @@ installopt:
set -e; for i in $(OTHERLIBRARIES); do (cd otherlibs/$$i; $(MAKE) installopt); done
if test -f ocamlc.opt; then cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE); else :; fi
if test -f ocamlopt.opt; then cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE); else :; fi
+ if test -f lex/ocamllex.opt; then cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE); else :; fi
clean:: partialclean
@@ -476,6 +480,8 @@ alldepend::
ocamllex: ocamlyacc ocamlc
cd lex; $(MAKE) all
+ocamllex.opt: ocamlopt
+ cd lex; $(MAKE) allopt
partialclean::
cd lex; $(MAKE) clean
alldepend::
diff --git a/Makefile.nt b/Makefile.nt
index 66671267e5..c861585ca0 100644
--- a/Makefile.nt
+++ b/Makefile.nt
@@ -199,6 +199,9 @@ cleanboot:
# Compile the native-code compiler
opt: runtimeopt ocamlopt libraryopt otherlibrariesopt
+# Native-code versions of the tools
+opt.opt: ocamlc.opt ocamlopt.opt ocamllex.opt
+
# Installation
install: installbyt installopt
@@ -475,6 +478,8 @@ alldepend::
ocamllex:
cd lex & $(MAKEREC) all
+ocamllex.opt:
+ cd lex & $(MAKEREC) allopt
partialclean::
cd lex & $(MAKEREC) clean
alldepend::
diff --git a/lex/.cvsignore b/lex/.cvsignore
index 407c794d88..739f3af265 100644
--- a/lex/.cvsignore
+++ b/lex/.cvsignore
@@ -2,3 +2,4 @@ parser.ml
parser.mli
lexer.ml
ocamllex
+ocamllex.opt \ No newline at end of file
diff --git a/lex/Makefile b/lex/Makefile
index 62523f7c03..1e713cefc2 100644
--- a/lex/Makefile
+++ b/lex/Makefile
@@ -15,6 +15,7 @@
# The lexer generator
CAMLC=../boot/ocamlrun ../boot/ocamlc -I ../boot
+CAMLOPT=../boot/ocamlrun ../ocamlopt -I ../stdlib
COMPFLAGS=
LINKFLAGS=
CAMLYACC=../boot/ocamlyacc
@@ -26,12 +27,16 @@ DEPFLAGS=
OBJS=parser.cmo lexer.cmo lexgen.cmo compact.cmo output.cmo main.cmo
all: ocamllex
+allopt: ocamllex.opt
ocamllex: $(OBJS)
$(CAMLC) $(LINKFLAGS) -o ocamllex $(OBJS)
+ocamllex.opt: $(OBJS:.cmo=.cmx)
+ $(CAMLOPT) -o ocamllex.opt $(OBJS:.cmo=.cmx)
+
clean::
- rm -f ocamllex
+ rm -f ocamllex ocamllex.opt
rm -f *.cmo *.cmi
parser.ml parser.mli: parser.mly
@@ -51,7 +56,7 @@ clean::
beforedepend:: lexer.ml
.SUFFIXES:
-.SUFFIXES: .ml .cmo .mli .cmi
+.SUFFIXES: .ml .cmo .mli .cmi .cmx
.ml.cmo:
$(CAMLC) -c $(COMPFLAGS) $<
@@ -59,6 +64,9 @@ beforedepend:: lexer.ml
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
+.ml.cmx:
+ $(CAMLOPT) -c $(COMPFLAGS) $<
+
depend: beforedepend
$(CAMLDEP) *.mli *.ml > .depend
diff --git a/lex/Makefile.nt b/lex/Makefile.nt
index 2267052654..5f3bea81bc 100644
--- a/lex/Makefile.nt
+++ b/lex/Makefile.nt
@@ -15,6 +15,7 @@
# The lexer generator
CAMLC=..\boot\ocamlrun ..\boot\ocamlc -I ..\boot
+CAMLOPT=..\boot\ocamlrun ..\ocamlopt -I ..\stdlib
COMPFLAGS=
LINKFLAGS=
CAMLYACC=..\boot\ocamlyacc
@@ -26,12 +27,16 @@ DEPFLAGS=
OBJS=parser.cmo lexer.cmo lexgen.cmo compact.cmo output.cmo main.cmo
all: ocamllex
+allopt: ocamllex.op
ocamllex: $(OBJS)
$(CAMLC) $(LINKFLAGS) -o ocamllex $(OBJS)
+ocamllex.opt: $(OBJS:.cmo=.cmx)
+ $(CAMLOPT) -o ocamllex.opt $(OBJS:.cmo=.cmx)
+
clean::
- rm -f ocamllex
+ rm -f ocamllex ocamllex.opt
rm -f *.cmo *.cmi
parser.ml parser.mli: parser.mly
@@ -51,7 +56,7 @@ clean::
beforedepend:: lexer.ml
.SUFFIXES:
-.SUFFIXES: .ml .cmo .mli .cmi
+.SUFFIXES: .ml .cmo .mli .cmi .cmx
.ml.cmo:
$(CAMLC) -c $(COMPFLAGS) $<
@@ -59,6 +64,9 @@ beforedepend:: lexer.ml
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
+.ml.cmx:
+ $(CAMLOPT) -c $(COMPFLAGS) $<
+
depend: beforedepend
$(CAMLDEP) *.mli *.ml > .depend