From bfad5d6af72693654162b41eb3a0dcd2cf0368c3 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 27 Feb 2015 16:48:24 +0100 Subject: Removed the recdepend again and replaced it by a builtin Make function. --- Makefile.extr | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'Makefile.extr') 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 -- cgit