aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.extr
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-02-24 19:15:00 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2015-02-24 19:15:00 +0100
commitbd0591f676f585a38c32049f31f1f187d748d6a2 (patch)
treef125b42f1d571a7efdc5193dab60c98f4dbf96fa /Makefile.extr
parent65b9b7082d50ed60f42eb4f8a37c9d94693db308 (diff)
downloadcompcert-bd0591f676f585a38c32049f31f1f187d748d6a2.tar.gz
compcert-bd0591f676f585a38c32049f31f1f187d748d6a2.zip
Added a small ocamlfile that calls ocamlfind recursivly over a given directory.
Diffstat (limited to 'Makefile.extr')
-rw-r--r--Makefile.extr12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile.extr b/Makefile.extr
index 83ef3e2b..3299cea9 100644
--- a/Makefile.extr
+++ b/Makefile.extr
@@ -61,14 +61,12 @@ endif
OCAMLC=ocamlc$(DOTOPT) $(COMPFLAGS)
OCAMLOPT=ocamlopt$(DOTOPT) $(COMPFLAGS)
-OCAMLDEP=ocamldep$(DOTOPT) $(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
@@ -156,6 +154,7 @@ 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:
@@ -164,11 +163,14 @@ cleansource:
# Generation of .depend.extr
-depend: $(GENERATED)
+tools/recdepend: tools/recdepend.ml
+ ocamlopt -o tools/recdepend unix.cmxa tools/recdepend.ml
+
+depend: $(GENERATED) tools/recdepend
@echo "Analyzing OCaml dependencies"
- @for d in $(DIRS); do $(OCAMLDEP) $$d/*.mli $$d/*.ml; done > .depend.extr
+ @tools/recdepend $(DIRS) -o .depend.extr
ifneq ($(strip $(DIRS_P4)),)
- @for d in $(DIRS_P4); do $(OCAMLDEP_P4) $$d/*.mli $$d/*.ml; done >> .depend.extr
+ @tools/recdepend -use-ocamlfind $(BITSTRING) $(INCLUDES) $(DIRS_P4) >> .depend.extr
endif