From a627f10979d6fea3487af9706c2a3bb0be74d80f Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Fri, 25 Nov 2016 15:44:09 -0800 Subject: [PATCH] Add target to generate list of source files topologically sorted by dependency Summary: Useful for refactoring purposes, to provide a list of modules in dependency order. Reviewed By: jeremydubreil Differential Revision: D4232363 fbshipit-source-id: 2adaaf5 --- infer/src/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infer/src/Makefile b/infer/src/Makefile index edb9fcb2d..56026e86b 100644 --- a/infer/src/Makefile +++ b/infer/src/Makefile @@ -258,6 +258,10 @@ mod_dep.dot: $(ml_src_files) $(re_src_files) mod_dep.pdf: mod_dep.dot dot -Tpdf -o mod_dep.pdf mod_dep.dot +.PHONY: dsort +dsort: + @ocamldep.opt -sort $(inc_flags) -ml-synonym .re -mli-synonym .rei $(ml_src_files) -pp refmt $(re_src_files) + roots_grep_regex:=$(foreach root,$(roots),-e $(root)$$) dirs_find_regex:=$(foreach dir, $(DEPENDENCIES) stubs/ml,-path "./$(dir)/*" -o)