diff options
Diffstat (limited to 'Makefile.extr')
-rw-r--r-- | Makefile.extr | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Makefile.extr b/Makefile.extr index 372f5e32..eb578fa9 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,12 @@ 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 +depend: $(GENERATED) @echo "Analyzing OCaml dependencies" - @$(RECDEPEND) $(DIRS) -o .depend.extr + @$(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 |