Skip to content

Commit bfad5d6

Browse files
committed
Removed the recdepend again and replaced it by a builtin Make function.
1 parent fd204b2 commit bfad5d6

File tree

2 files changed

+6
-214
lines changed

2 files changed

+6
-214
lines changed

Makefile.extr

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@ endif
6161

6262
OCAMLC=ocamlc$(DOTOPT) $(COMPFLAGS)
6363
OCAMLOPT=ocamlopt$(DOTOPT) $(COMPFLAGS)
64+
OCAMLDEP=ocamldep$(DOTOPT) -slash $(INCLUDES)
6465

6566
# Compilers used for Camlp4-preprocessed code. Note that we cannot
6667
# use the .opt compilers (because ocamlfind doesn't support them).
6768

6869
OCAMLC_P4=ocamlfind ocamlc $(COMPFLAGS) $(BITSTRING)
6970
OCAMLOPT_P4=ocamlfind ocamlopt $(COMPFLAGS) $(BITSTRING)
71+
OCAMLDEP_P4=ocamlfind ocamldep $(INCLUDES) $(BITSTRING)
7072

7173
MENHIR=menhir --explain
7274
OCAMLLEX=ocamllex -q
@@ -154,7 +156,6 @@ checklink/%.cmx: checklink/%.ml
154156
clean:
155157
rm -f $(EXECUTABLES)
156158
rm -f $(GENERATED)
157-
rm -f tools/recdepend
158159
for d in $(ALLDIRS); do rm -f $$d/*.cm[iox] $$d/*.o; done
159160

160161
cleansource:
@@ -163,16 +164,13 @@ cleansource:
163164

164165
# Generation of .depend.extr
165166

166-
tools/recdepend: tools/recdepend.ml
167-
ocamlopt -o tools/recdepend unix.cmxa tools/recdepend.ml
168-
169-
RECDEPEND=tools/recdepend
170-
171167
depend: $(GENERATED) tools/recdepend
172168
@echo "Analyzing OCaml dependencies"
173-
@$(RECDEPEND) $(DIRS) -o .depend.extr
174-
ifneq ($(strip $(DIRS_P4)),)
169+
$(OCAMLDEP) $(foreach d,$(DIRS),$(wildcard $(d)/*.mli $(d)/*.ml)) >.depend.extr
170+
$(OCAMLDEP) $(GENERATED) >> .depend.extr
171+
ifneq ($(strip $(DIRS_P4)),)
175172
@$(RECDEPEND) -use-ocamlfind $(BITSTRING) $(INCLUDES) $(DIRS_P4) >> .depend.extr
173+
$(OCAMLDEP_P4) $(foreach d,$(DIRS_P4),$(wildcard $(d)/*.mli $(d)/*.ml)) >>.depend.extr
176174
endif
177175

178176

tools/recdepend.ml

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)