Skip to content
Snippets Groups Projects
Commit 0b5c64a4 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[devguide] allows @plugin dev guide in plugins as well as kernel

parent 0d5972b6
No related branches found
No related tags found
No related merge requests found
......@@ -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 #
################################
......
......@@ -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
......
......@@ -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 \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment