diff --git a/Makefile b/Makefile index 6938c2e48d5b0c260420acb6c48949def6ef2efb..a75258ec1333bfce384a7762ad4fef0e04a75926 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,7 @@ PLUGIN_TYPES_CMX_LIST := PLUGIN_DEP_LIST:= PLUGIN_DOC_LIST := PLUGIN_DOC_DIRS := +PLUGIN_DOC_DUMP_LIST := PLUGIN_DISTRIBUTED_LIST:= PLUGIN_DIST_TARGET_LIST:= PLUGIN_DIST_DOC_LIST:= @@ -1718,20 +1719,23 @@ CHECK_CODE=$(CHECK_API_DIR)/check_code.cmxs devguide: byte $(OCAMLBEST) $(MAKE) FRAMAC_INTERNAL=no -C $(DOC_DEV_DIR) -check-devguide: $(CHECK_CODE) $(DOC_DEPEND) $(DOC_DIR)/kernel-doc.ocamldoc devguide +check-devguide: $(CHECK_CODE) $(DOC_DEPEND) $(DOC_DIR)/kernel-doc.ocamldoc plugins-doc devguide $(PRINT) 'Checking developer guide consistency' $(MKDIR) $(CHECK_API_DIR)/html + $(RM) $(CHECK_API_DIR)/code_file + $(foreach doc_dump, \ + $(DOC_DIR)/kernel-doc.ocamldoc $(PLUGIN_DOC_DUMP_LIST), \ $(OCAMLDOC) $(DOC_FLAGS) -I $(OCAMLLIB) \ -g $(CHECK_CODE) \ -passopt -docdevpath -passopt "`pwd`/$(CHECK_API_DIR)" \ - -load $(DOC_DIR)/kernel-doc.ocamldoc \ - -d $(CHECK_API_DIR)/html + -load $(doc_dump) \ + -d $(CHECK_API_DIR)/html; ) $(RM) -r $(CHECK_API_DIR)/html $(MAKE) --silent -C $(CHECK_API_DIR) main.idx $(MAKE) --silent -C $(CHECK_API_DIR) >$(CHECK_API_DIR)/summary.txt $(ECHO) see all the information displayed here \ in $(CHECK_API_DIR)/summary.txt - $(RM) code_file + ################################ # Code prettyfication and lint # ################################ diff --git a/doc/developer/check_api/check_code.ml b/doc/developer/check_api/check_code.ml index 72539005fc293e584338f9333afe0a5eb4b47072..62f50554c5fa7e398f2f0fa6a23ebe9cb1c3b6c9 100644 --- a/doc/developer/check_api/check_code.ml +++ b/doc/developer/check_api/check_code.ml @@ -29,7 +29,7 @@ let print_in_file l = in let file_path = !doc_dev_path ^ "/code_file" in try - let chan_out = open_out file_path in + let chan_out = open_out_gen [Open_append; Open_creat] 0o644 file_path in output_string chan_out (string_of_list l) ; flush chan_out ; close_out chan_out diff --git a/share/Makefile.plugin.template b/share/Makefile.plugin.template index 976ab0f64615566a95fb0e05d58c2ffc027ea2fe..a00758817d2b640aff5ea8b5d2bc8a66ec5cf39d 100644 --- a/share/Makefile.plugin.template +++ b/share/Makefile.plugin.template @@ -762,6 +762,9 @@ ifneq ($(ENABLE_GUI),no) OCAMLDOC_DEPEND:= $(OCAMLDOC_DEPEND) $(PLUGIN_GUI_CMO) endif +PLUGIN_DOC_DUMP:=$(@PLUGIN_NAME@_DOC_DIR)/@PLUGIN_NAME@.ocamldoc +@PLUGIN_NAME@_DOC_DUMP:=$(PLUGIN_DOC_DUMP) + .PHONY: @PLUGIN_NAME@_DOC @PLUGIN_NAME@_DOC: $(OCAMLDOC_DEPEND) \ $(OCAMLDOC_GEN) \ @@ -780,6 +783,7 @@ endif -t "@PLUGIN_NAME@ plugin" \ -css-style ../style.css \ -d $(@PLUGIN_NAME@_DOC_DIR) -g $(DOC_PLUGIN) -passopt -docpath $(DOC_DIR)/html \ + -dump $(@PLUGIN_NAME@_DOC_DUMP) \ $(addprefix -load ,$(wildcard $(DOC_DIR)/kernel-doc.ocamldoc)) \ $(wildcard $(@PLUGIN_NAME@_DOC_SRC)) # [rb+js] 20090619 @@ -798,6 +802,7 @@ endif $(ISED) -e 's|\(doc/code/html\)|../../../\1|g' $$f ; \ done +PLUGIN_DOC_DUMP_LIST+=$(PLUGIN_DOC_DUMP) # removed dependencies: # $(PLUGIN_DOC_DIR)/modules.ps \