diff options
-rw-r--r-- | api_docgen/Makefile.docfiles | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/api_docgen/Makefile.docfiles b/api_docgen/Makefile.docfiles index 14a3b18322..0ba36f4c23 100644 --- a/api_docgen/Makefile.docfiles +++ b/api_docgen/Makefile.docfiles @@ -26,11 +26,6 @@ define capitalize $(foreach m,$(1),$(call capitalize_one,$m)) endef -define sort -$(shell $(BEST_OCAMLDEP) -sort $(1)) -endef - - str_MLIS := str.mli unix_MLIS := unix.mli unixLabels.mli dynlink_MLIS := dynlink.mli @@ -60,10 +55,8 @@ libref_EXTRA=stdlib__pervasives libref_TEXT=Ocaml_operators Format_tutorial libref_C=$(call capitalize,$(libref) $(libref_EXTRA)) -PARSING_MLIS := $(call sort, \ - $(notdir $(wildcard $(ROOTDIR)/parsing/*.mli))\ -) -UTILS_MLIS := $(call sort,$(notdir $(wildcard $(ROOTDIR)/utils/*.mli))) +PARSING_MLIS := $(notdir $(wildcard $(ROOTDIR)/parsing/*.mli)) +UTILS_MLIS := $(notdir $(wildcard $(ROOTDIR)/utils/*.mli)) DRIVER_MLIS := pparse.mli compilerlibref_MLIS= \ @@ -74,8 +67,20 @@ compilerlibref=$(compilerlibref_MLIS:%.mli=%) compilerlibref_TEXT=Compiler_libs compilerlibref_C=$(call capitalize,$(compilerlibref)) -ALL_LIBREF= $(libref_TEXT:%=libref/%) $(libref:%=libref/%) +ALL_LIBREF= \ + $(sort $(libref_TEXT:%=libref/%)) \ + $(sort $(filter-out libref/camlinternal%, $(libref:%=libref/%))) \ + $(sort $(filter libref/camlinternal%, $(libref:%=libref/%))) + ALL_COMPILERLIBREF= \ $(compilerlibref_TEXT:%=compilerlibref/%) \ $(compilerlibref:%=compilerlibref/%) +# Note that the output of $(wildcard ...) is sorted alphabetically. +# The compilerlibs index will be thus be sorted first by category: +# - text documentation +# - parsing modules +# - utils modules +# - driver modules +# And then alphabetically inside each category. + ALL_DOC= $(ALL_LIBREF) $(ALL_COMPILERLIBREF) |