Skip to content

Commit

Permalink
Use ocamldep wrapper provided by findlib when appropriate
Browse files Browse the repository at this point in the history
Closes #219
  • Loading branch information
foretspaisibles committed Jan 5, 2017
1 parent c654041 commit 4e9815b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ocaml/ocaml.depend.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
# do-clean-depend

# Variables:
#
# OCAMLDEP [ocamldep]
# OCaml dependency generator


### IMPLEMENTATION
Expand All @@ -58,6 +61,8 @@
.if !target(__<ocaml.depend.mk>__)
__<ocaml.depend.mk>__:

OCAMLDEP?= ocamldep

.for directory in ${DIRS}
_OCAMLDEP_FILTER_SCRIPT+= -e "s@${directory}/*@@g"
.endfor
Expand Down Expand Up @@ -95,7 +100,7 @@ OCAMLDEPFLAGS+= -native

.if defined(_OCAML_DEPEND)
.depend: ${_OCAML_DEPEND}
(cd ${.CURDIR} && ocamldep ${OCAMLDEPFLAGS} ${_OCAML_DEPEND})\
(cd ${.CURDIR} && ${OCAMLDEP} ${OCAMLDEPFLAGS} ${_OCAML_DEPEND})\
| ${_OCAMLDEP_FILTER} \
> ${.TARGET}
.else
Expand Down
3 changes: 2 additions & 1 deletion ocaml/ocaml.find.mk
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ OCAMLFIND?=ocamlfind
.if ${USE_OCAMLFIND} == yes
OCAMLWHERE?= ${OCAMLFIND} ocamlc -where
OCAMLDOC?= ${OCAMLFIND} ocamldoc
OCAMLDEP?= ${OCAMLFIND} ocamldep
OCAMLMKTOP?= ${OCAMLFIND} ocamlmktop -linkpkg
.if ${WITH_PROFILE} == yes
# Profiling case
Expand Down Expand Up @@ -157,7 +158,7 @@ PKGS+= threads


.for pseudo in OCAMLCB OCAMLCN OCAMLCS OCAMLCI OCAMLLB OCAMLLN\
OCAMLDOC OCAMLMKTOP
OCAMLDOC OCAMLMKTOP OCAMLDEP
.if defined(PKGS)&&!empty(PKGS)
${pseudo}+= -package "${PKGS}"
.endif
Expand Down

0 comments on commit 4e9815b

Please sign in to comment.