diff options
-rw-r--r-- | lib/erl_docgen/priv/bin/chunk.escript | 8 | ||||
-rw-r--r-- | lib/stdlib/src/shell_docs.erl | 4 | ||||
-rw-r--r-- | lib/wx/doc/src/Makefile | 2 | ||||
-rw-r--r-- | make/doc.mk | 13 | ||||
-rw-r--r-- | make/otp.mk.in | 3 |
5 files changed, 24 insertions, 6 deletions
diff --git a/lib/erl_docgen/priv/bin/chunk.escript b/lib/erl_docgen/priv/bin/chunk.escript index 8b37a88166..d31da2853e 100644 --- a/lib/erl_docgen/priv/bin/chunk.escript +++ b/lib/erl_docgen/priv/bin/chunk.escript @@ -30,6 +30,14 @@ -include_lib("kernel/include/eep48.hrl"). +main([FromBeam, _Escript, ToChunk]) -> + %% This module is not documented, generate an empty beam chunk file + Name = filename:basename(filename:rootname(FromBeam)) ++ ".erl", + + EmptyDocs = #docs_v1{ anno = erl_anno:set_file(Name, erl_anno:new(0)), + module_doc = hidden, docs = []}, + file:write_file(ToChunk, term_to_binary(EmptyDocs,[compressed])), + ok; main([FromXML, FromBeam, _Escript, ToChunk]) -> erlang:process_flag(max_heap_size,20 * 1000 * 1000), case docs(FromXML, FromBeam) of diff --git a/lib/stdlib/src/shell_docs.erl b/lib/stdlib/src/shell_docs.erl index ac89d70472..b86d87bd0e 100644 --- a/lib/stdlib/src/shell_docs.erl +++ b/lib/stdlib/src/shell_docs.erl @@ -333,7 +333,9 @@ get_local_doc(_Missing, ModuleDoc) when map_size(ModuleDoc) > 0 -> %% Otherwise take first alternative found binary_to_term(maps:get(hd(maps:keys(ModuleDoc)), ModuleDoc)); get_local_doc(Missing, hidden) -> - [{p,[],[<<"The documentation for ">>,Missing,<<" is hidden">>]}]; + [{p,[],[<<"The documentation for ">>,Missing, + <<" is hidden. This probably means that it is internal " + "and not to be used by other applications.">>]}]; get_local_doc(Missing, None) when None =:= none; None =:= #{} -> [{p,[],[<<"There is no documentation for ">>,Missing]}]. diff --git a/lib/wx/doc/src/Makefile b/lib/wx/doc/src/Makefile index a458baa6b9..1d2b9824f4 100644 --- a/lib/wx/doc/src/Makefile +++ b/lib/wx/doc/src/Makefile @@ -64,7 +64,7 @@ TOP_SPECS_FILE = specs.xml include $(ERL_TOP)/make/doc.mk -$(XMLDIR)/%.xml: $(APP_DIR)/gen/%.erl +$(XMLDIR)/%.xml: $(APP_SRC_DIR)/gen/%.erl $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript \ -def vsn $(VSN) $(EDOC_FLAGS) -dir $(XMLDIR) $< diff --git a/make/doc.mk b/make/doc.mk index 8dce91b49d..d45e07e795 100644 --- a/make/doc.mk +++ b/make/doc.mk @@ -28,7 +28,9 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) endif RELCHUNKSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) -APP_DIR = $(ERL_TOP)/lib/$(APPLICATION)/src +APP_DIR = $(ERL_TOP)/lib/$(APPLICATION) +APP_SRC_DIR = $(APP_DIR)/src +APP_EBIN_DIR = $(APP_DIR)/src # ---------------------------------------------------- HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \ @@ -63,6 +65,9 @@ endif CHUNK_REF3_FILES = $(filter-out $(NO_CHUNKS), $(XML_ALL_REF3_FILES)) CHUNK_FILES = $(CHUNK_REF3_FILES:%.xml=$(CHUNKSDIR)/%.chunk) +ERL_CHUNK_FILES = $(patsubst $(APP_EBIN_DIR)/%.BEAM,$(CHUNKSDIR)/%.chunk,$(wildcard $(APP_EBIN_DIR)/*.beam)) +EMPTY_CHUNK_FILES = $(filter-out $(NO_CHUNKS:%.xml=$(CHUNKSDIR)/%.chunk) $(CHUNK_FILES), $(ERL_CHUNK_FILES)) + # ---------------------------------------------------- # FLAGS @@ -90,13 +95,13 @@ html: images $(HTML_REF_MAN_FILE) man: $(MAN1_FILES) $(MAN2_FILES) $(MAN3_FILES) $(MAN4_FILES) $(MAN5_FILES) $(MAN6_FILES) $(MAN7_FILES) -chunks: $(CHUNK_FILES) +chunks: $(CHUNK_FILES) $(EMPTY_CHUNK_FILES) images: $(IMAGE_FILES:%=$(HTMLDIR)/%) -$(EDOC_REF3_FILES:%=$(XMLDIR)/%): $(APP_DIR)/$(@:$(XMLDIR)/%.xml=%.erl) +$(EDOC_REF3_FILES:%=$(XMLDIR)/%): $(APP_SRC_DIR)/$(@:$(XMLDIR)/%.xml=%.erl) $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript \ - -def vsn $(VSN) $(EDOC_FLAGS) -dir $(XMLDIR) $(APP_DIR)/$(@:$(XMLDIR)/%.xml=%.erl) + -def vsn $(VSN) $(EDOC_FLAGS) -dir $(XMLDIR) $(APP_SRC_DIR)/$(@:$(XMLDIR)/%.xml=%.erl) $(XMLDIR)/$(EDOC_CHAPTER_FILE): ../overview.edoc $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) \ -chapter -dir $(XMLDIR) $< diff --git a/make/otp.mk.in b/make/otp.mk.in index 30fe0ee404..64061ac7b5 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -332,3 +332,6 @@ $(CHUNKSDIR)/%.chunk: $(XMLDIR)/%.xml ../../ebin/%.beam $(DOCGEN)/priv/bin/chunk $(CHUNKSDIR)/%.chunk: $(XMLDIR)/%.xml ../../preloaded/ebin/%.beam $(DOCGEN)/priv/bin/chunk.escript $(gen_verbose)escript $(DOCGEN)/priv/bin/chunk.escript $^ $@ + +$(CHUNKSDIR)/%.chunk: ../../ebin/%.beam $(DOCGEN)/priv/bin/chunk.escript + $(gen_verbose)escript $(DOCGEN)/priv/bin/chunk.escript $^ $@ |