diff --git a/.gitignore b/.gitignore index 63a7c737c..89682b7c4 100644 --- a/.gitignore +++ b/.gitignore @@ -123,3 +123,6 @@ buck-out/ /infer/annotations/processor_classes/ /infer/lib/java/processor.jar infer/src/.project +/dependencies/ocamldot/ocamldot +/dependencies/ocamldot/ocamldot.ml +/infer/src/mod_dep.dot diff --git a/Makefile.in b/Makefile.in index a0808fdb2..32461b2f0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -150,6 +150,7 @@ test: $(MAKE) -C $(INFER_DIR) $(INFER_BIN) $(MAKE) -C $(SRC_DIR) init $(MAKE) -j$(NCPU) test_build + $(MAKE) -C $(SRC_DIR) mod_dep.dot $(MAKE) ocaml_unit_test buck_test inferTraceBugs_test test_xml: buck_test_xml diff --git a/infer/src/Makefile.in b/infer/src/Makefile.in index 37b8c1974..05bfe9f55 100644 --- a/infer/src/Makefile.in +++ b/infer/src/Makefile.in @@ -192,6 +192,19 @@ test_build: init $(INFERPRINT_ATDGEN_STUBS) $(CLANG_ATDGEN_STUBS) $(INFER_CLANG_ $(INFERUNIT_MAIN).byte \ $(CHECKCOPYRIGHT_MAIN).byte +$(DEPENDENCIES_DIR)/ocamldot/ocamldot: + $(MAKE) -C $(DEPENDENCIES_DIR)/ocamldot + +roots:=Inferanalyze CMain JMain Inferprint +src_dirs:=$(shell find * -type d) +src_files:=$(shell find $(src_dirs) -regex '.*\.ml\(i\)*' -not -path facebook/scripts/eradicate_stats.ml) +inc_flags:=$(foreach dir,$(src_dirs),-I $(dir)) +root_flags:=$(foreach root,$(roots),-r $(root)) +mod_dep.dot: $(DEPENDENCIES_DIR)/ocamldot/ocamldot $(src_files) + ocamldep.opt $(inc_flags) $(src_files) \ + | $(DEPENDENCIES_DIR)/ocamldot/ocamldot -lr $(root_flags) \ + > mod_dep.dot + ifeq (@ENABLE_OCAML_ANNOT@,yes) java_annotations: build_java rsync -a --include '*/' --include '*.annot' --exclude '*' $(JAVA_BUILD_DIR)/ $(ANNOT_DIR)/ @@ -312,3 +325,4 @@ endif $(REMOVE) $(INFERANALYZE_BIN) $(INFERPRINT_BIN) $(CHECKCOPYRIGHT_BIN) $(REMOVE) $(CLANG_ATDGEN_STUBS) $(REMOVE) $(INFER_CLANG_FCP_MIRRORED_FILES) + $(REMOVE) mod_dep.dot