Skip to content

Commit

Permalink
Documentation reorganization. (#802)
Browse files Browse the repository at this point in the history
Added makefile targets to generate Wiki and/or API documentation.
  • Loading branch information
slaff authored Nov 15, 2016
1 parent 065f90d commit 1343ba1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
path = Sming/rboot
url = https://github.com/raburton/rboot.git
[submodule "Sming.wiki"]
path = Sming.wiki
path = docs/wiki
url = https://github.com/SmingHub/Sming.wiki.git
1 change: 0 additions & 1 deletion Sming.wiki
Submodule Sming.wiki deleted from 8faf47
28 changes: 19 additions & 9 deletions Sming/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ $1/%.o: %.cpp
$(Q) $(CXX) $(INCDIR) $(MODULE_INCDIR) $(EXTRA_INCDIR) $(SDK_INCDIR) $(CXXFLAGS) -c $$< -o $$@
endef

.PHONY: all checkdirs clean spiffy test samples recurse-samples $(SAMPLES_DIRS)
.PHONY: all checkdirs clean spiffy test samples recurse-samples $(SAMPLES_DIRS) docs api wiki

all: checkdirs $(APP_AR) spiffy

Expand Down Expand Up @@ -263,14 +263,24 @@ clean:

test: all spiffy samples

docs:
$(Q) cd $(SMING_HOME)/../docs ; doxygen 2>errors.log 1>doxygen.log
$(Q) echo "Undocumented compounds: $(shell grep "Compound.*is not documented" $(SMING_HOME)/../docs/error.log | wc -l)"
$(Q) echo "Undocumented members: $(shell grep "Member.*is not documented" $(SMING_HOME)/../docs/error.log | wc -l) "
$(Q) echo "Undocumented parameters: $(shell grep "The following parameters of .* are not documented" $(SMING_HOME)/../docs/error.log | wc -l) "
$(Q) echo "Open in your browser: file://$(SMING_HOME)/../docs/publish/sming-api-/index.html"


docs/wiki/Home.md:
$(Q) echo "No Wiki submodule found. Using git to fetch it..."
$(Q) git submodule update --init ../docs/wiki

docs/api/error.log:
$(Q) mkdir -p $(SMING_HOME)/../docs/api
$(Q) cd $(SMING_HOME)/../docs; doxygen 2>$(SMING_HOME)/../docs/api/stderr.log 1>$(SMING_HOME)/../docs/api/doxygen.log

docs/api/sming/index.html: docs/api/error.log
$(Q) echo "Undocumented compounds: $(shell grep "Compound.*is not documented" $(SMING_HOME)/../docs/api/error.log | wc -l)"
$(Q) echo "Undocumented members: $(shell grep "Member.*is not documented" $(SMING_HOME)/../docs/api/error.log | wc -l) "
$(Q) echo "Undocumented parameters: $(shell grep "The following parameters of .* are not documented" $(SMING_HOME)/../docs/api/error.log | wc -l) "
$(Q) echo "Open in your browser: file://$(SMING_HOME)/../$@"

wiki: docs/wiki/Home.md
api: docs/api/sming/index.html

docs: wiki api

samples: Basic_Blink HttpServer_Bootstrap Basic_rBoot

Expand Down
6 changes: 3 additions & 3 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = publish
OUTPUT_DIRECTORY = api

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down Expand Up @@ -746,7 +746,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).

WARN_LOGFILE = error.log
WARN_LOGFILE = api/error.log

#---------------------------------------------------------------------------
# Configuration options related to the input files
Expand Down Expand Up @@ -1046,7 +1046,7 @@ GENERATE_HTML = YES
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_OUTPUT = "sming-api-$(GIT_BRANCH)"
HTML_OUTPUT = "sming"

# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
Expand Down
1 change: 1 addition & 0 deletions docs/wiki
Submodule wiki added at 74f77c

0 comments on commit 1343ba1

Please sign in to comment.