diff options
author | Gabriel Scherer <gabriel.scherer@gmail.com> | 2023-01-03 17:41:12 +0100 |
---|---|---|
committer | Florian Angeletti <florian.angeletti@inria.fr> | 2023-01-04 14:23:38 +0100 |
commit | bae30e3bcb85883c6de1f18248c6d293887a1d55 (patch) | |
tree | 866f17da90cbe17a117f5ec50b9bcd50ddf7c1a3 | |
parent | 7f4021ef0442b8c95d287f306faef8802392e29e (diff) | |
download | ocaml-4.13.tar.gz |
Merge pull request #11860 from Octachron/index_for_stdlib4.13
documentation: sort modules alphabetically
fixes #11857
(cherry picked from commit 14004c6d4bedadb7215ded2c77230270e52307ff)
-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) |