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
master
Josh Berdine 8 years ago committed by Facebook Github Bot
parent 8415b6c38b
commit a627f10979

@ -258,6 +258,10 @@ mod_dep.dot: $(ml_src_files) $(re_src_files)
mod_dep.pdf: mod_dep.dot mod_dep.pdf: mod_dep.dot
dot -Tpdf -o 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)$$) roots_grep_regex:=$(foreach root,$(roots),-e $(root)$$)
dirs_find_regex:=$(foreach dir, $(DEPENDENCIES) stubs/ml,-path "./$(dir)/*" -o) dirs_find_regex:=$(foreach dir, $(DEPENDENCIES) stubs/ml,-path "./$(dir)/*" -o)

Loading…
Cancel
Save