aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.extr
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-02-27 16:48:24 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2015-02-27 16:48:24 +0100
commitbfad5d6af72693654162b41eb3a0dcd2cf0368c3 (patch)
treee774758965f88fcb9728c595dd9a22ebc1dfbbfb /Makefile.extr
parentfd204b20e4ac3c41e1826f99344023d294a834c0 (diff)
downloadcompcert-bfad5d6af72693654162b41eb3a0dcd2cf0368c3.tar.gz
compcert-bfad5d6af72693654162b41eb3a0dcd2cf0368c3.zip
Removed the recdepend again and replaced it by a builtin Make function.
Diffstat (limited to 'Makefile.extr')
-rw-r--r--Makefile.extr14
1 files changed, 6 insertions, 8 deletions
diff --git a/Makefile.extr b/Makefile.extr
index 372f5e32..67b2a604 100644
--- a/Makefile.extr
+++ b/Makefile.extr
@@ -61,12 +61,14 @@ endif
OCAMLC=ocamlc$(DOTOPT) $(COMPFLAGS)
OCAMLOPT=ocamlopt$(DOTOPT) $(COMPFLAGS)
+OCAMLDEP=ocamldep$(DOTOPT) -slash $(INCLUDES)
# Compilers used for Camlp4-preprocessed code. Note that we cannot
# use the .opt compilers (because ocamlfind doesn't support them).
OCAMLC_P4=ocamlfind ocamlc $(COMPFLAGS) $(BITSTRING)
OCAMLOPT_P4=ocamlfind ocamlopt $(COMPFLAGS) $(BITSTRING)
+OCAMLDEP_P4=ocamlfind ocamldep $(INCLUDES) $(BITSTRING)
MENHIR=menhir --explain
OCAMLLEX=ocamllex -q
@@ -154,7 +156,6 @@ checklink/%.cmx: checklink/%.ml
clean:
rm -f $(EXECUTABLES)
rm -f $(GENERATED)
- rm -f tools/recdepend
for d in $(ALLDIRS); do rm -f $$d/*.cm[iox] $$d/*.o; done
cleansource:
@@ -163,16 +164,13 @@ cleansource:
# Generation of .depend.extr
-tools/recdepend: tools/recdepend.ml
- ocamlopt -o tools/recdepend unix.cmxa tools/recdepend.ml
-
-RECDEPEND=tools/recdepend
-
depend: $(GENERATED) tools/recdepend
@echo "Analyzing OCaml dependencies"
- @$(RECDEPEND) $(DIRS) -o .depend.extr
-ifneq ($(strip $(DIRS_P4)),)
+ $(OCAMLDEP) $(foreach d,$(DIRS),$(wildcard $(d)/*.mli $(d)/*.ml)) >.depend.extr
+ $(OCAMLDEP) $(GENERATED) >> .depend.extr
+ ifneq ($(strip $(DIRS_P4)),)
@$(RECDEPEND) -use-ocamlfind $(BITSTRING) $(INCLUDES) $(DIRS_P4) >> .depend.extr
+ $(OCAMLDEP_P4) $(foreach d,$(DIRS_P4),$(wildcard $(d)/*.mli $(d)/*.ml)) >>.depend.extr
endif