summaryrefslogtreecommitdiff
path: root/tools/Makefile
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2002-11-15 16:16:07 +0000
committerDamien Doligez <damien.doligez-inria.fr>2002-11-15 16:16:07 +0000
commitee99d6e15887ee460bad5e60275cc5eaecc5b4f3 (patch)
treee4cb8cfcdf4aaea4a5b9805ec7c4b9674a6992b0 /tools/Makefile
parentb29e84f717ce113cdc9c8c5c64a26ccd4f20e4b5 (diff)
downloadocaml-ee99d6e15887ee460bad5e60275cc5eaecc5b4f3.tar.gz
ocamldep.opt
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5265 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools/Makefile')
-rw-r--r--tools/Makefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/tools/Makefile b/tools/Makefile
index ccad6934a3..ae605ac9cf 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -25,7 +25,7 @@ LINKFLAGS=$(INCLUDES)
all: ocamldep ocamlprof ocamlcp ocamlmktop ocamlmklib scrapelabels addlabels
-opt.opt: depend.cmx
+opt.opt: ocamldep.opt
# The dependency generator
@@ -37,14 +37,20 @@ CAMLDEP_IMPORTS=misc.cmo config.cmo clflags.cmo terminfo.cmo \
ocamldep: depend.cmi $(CAMLDEP_OBJ)
$(CAMLC) $(LINKFLAGS) -o ocamldep $(CAMLDEP_IMPORTS) $(CAMLDEP_OBJ)
-depend.cmx:
- $(CAMLOPT) $(COMPFLAGS) -I ../stdlib -c depend.ml
+ocamldep.opt: depend.cmi $(CAMLDEP_OBJ:.cmo=.cmx)
+ $(CAMLOPT) $(LINKFLAGS) -o ocamldep.opt $(CAMLDEP_IMPORTS:.cmo=.cmx) \
+ $(CAMLDEP_OBJ:.cmo=.cmx)
+# ocamldep is precious: sometimes we are stuck in the middle of a
+# bootstrap and we need to remake the dependencies
clean::
- rm -f ocamldep
+ mv -f ocamldep ocamldep.bak
+ rm -f ocamldep.opt
install::
cp ocamldep $(BINDIR)/ocamldep$(EXE)
+ if test -f ocamldep.opt; \
+ then cp ocamldep.opt $(BINDIR)/ocamldep.opt$(EXE); else :; fi
# The profiler
@@ -228,7 +234,7 @@ clean::
# Common stuff
.SUFFIXES:
-.SUFFIXES: .ml .cmo .mli .cmi
+.SUFFIXES: .ml .cmo .mli .cmi .cmx
.ml.cmo:
$(CAMLC) -c $(COMPFLAGS) $<
@@ -236,6 +242,9 @@ clean::
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
+.ml.cmx:
+ $(CAMLOPT) $(COMPFLAGS) -c $<
+
clean::
rm -f *.cmo *.cmi