summaryrefslogtreecommitdiff
path: root/ocamldoc/Makefile
diff options
context:
space:
mode:
authorSébastien Hinderer <Sebastien.Hinderer@inria.fr>2022-03-18 11:05:17 +0100
committerSébastien Hinderer <Sebastien.Hinderer@inria.fr>2022-03-22 18:12:02 +0100
commit4d0d02b247579df8b1965c54672386fc259ac53f (patch)
tree51bd230864ddb50f6fcb44dae3c186f2f9ec513f /ocamldoc/Makefile
parentdf4759a2205e85302fed1006e7509e73365cd4a1 (diff)
downloadocaml-4d0d02b247579df8b1965c54672386fc259ac53f.tar.gz
Build system: also factorize the inclusion of directories when calling ocamldep
Diffstat (limited to 'ocamldoc/Makefile')
-rw-r--r--ocamldoc/Makefile30
1 files changed, 11 insertions, 19 deletions
diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile
index f8c30dc169..9bcbc81a83 100644
--- a/ocamldoc/Makefile
+++ b/ocamldoc/Makefile
@@ -53,23 +53,15 @@ endif
# Compilation
#############
-INCLUDES_DEP=\
- -I $(ROOTDIR)/utils \
- -I $(ROOTDIR)/parsing \
- -I $(ROOTDIR)/typing \
- -I $(ROOTDIR)/driver \
- -I $(ROOTDIR)/bytecomp \
- -I $(ROOTDIR)/toplevel
-
-INCLUDES_NODEP=\
- -I $(ROOTDIR)/stdlib \
- -I $(ROOTDIR)/compilerlibs \
- -I $(ROOTDIR)/otherlibs/str \
- -I $(ROOTDIR)/otherlibs/dynlink \
- -I $(ROOTDIR)/otherlibs/dynlink/native \
- -I $(ROOTDIR)/otherlibs/$(UNIXLIB)
-
-DEPINCLUDES=$(INCLUDES_DEP)
+
+INCLUDE_DIRS = $(addprefix $(ROOTDIR)/,\
+ utils parsing typing driver bytecomp toplevel)
+INCLUDES_DEP = $(addprefix -I ,$(INCLUDE_DIRS))
+INCLUDES_NODEP = $(addprefix -I $(ROOTDIR)/,\
+ stdlib compilerlibs otherlibs/str otherlibs/dynlink \
+ otherlibs/dynlink/native otherlibs/$(UNIXLIB))
+
+OC_OCAMLDEPDIRS = $(INCLUDE_DIRS)
INCLUDES=$(INCLUDES_DEP) $(INCLUDES_NODEP)
COMPFLAGS=$(INCLUDES) -absname -w +a-4-9-41-42-44-45-48-70 -warn-error +A \
@@ -350,7 +342,7 @@ distclean: clean
.PHONY: depend
depend: $(DEPEND_PREREQS)
- $(OCAMLDEP_CMD) $(DEPINCLUDES) *.mll *.mly *.ml *.mli > .depend
- $(OCAMLDEP_CMD) $(DEPINCLUDES) -shared generators/*.ml >> .depend
+ $(OCAMLDEP_CMD) *.mll *.mly *.ml *.mli > .depend
+ $(OCAMLDEP_CMD) -shared generators/*.ml >> .depend
include .depend