Skip to content

Commit

Permalink
[doxygen] Review fixes.
Browse files Browse the repository at this point in the history
- Move directory back to docs
- Move doxygen-format-check.sh to scripts/helpers.
- Clean up CHIP naming.
  • Loading branch information
turon committed May 12, 2020
1 parent 51a2ec7 commit 104ab9c
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 28 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SUBDIRS = \
examples \
third_party \
src \
doc \
docs \
tests \
$(NULL)

Expand Down Expand Up @@ -212,7 +212,7 @@ distclean-local:

.PHONY: docdist
docdist: $(BUILT_SOURCES)
$(MAKE) -C doc docdistdir=$(abs_builddir) $(@)
$(MAKE) -C docs docdistdir=$(abs_builddir) $(@)

#
# Top-level convenience target for making a tools-only distribution
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ src/lib/support/Makefile
src/lib/support/tests/Makefile
src/platform/Makefile
tests/Makefile
doc/Makefile
docs/Makefile
])

#
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/Doxyfile.in → docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ IMAGE_PATH =
# code is scanned, but not when the output code is generated. If lines are added
# or removed, the anchors will not be placed correctly.

INPUT_FILTER = @abs_srcdir@/format-file.sh
INPUT_FILTER = @abs_top_srcdir@/scripts/helpers/doxygen-format-check.sh

# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
# basis. Doxygen will compare the file name with each pattern and apply the
Expand Down
14 changes: 7 additions & 7 deletions doc/Makefile.am → docs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@

#
# Description:
# This file is the GNU automake template for the Nest Weave
# This file is the GNU automake template for the CHIP
# API and stack documentation.
#

include $(abs_top_nlbuild_autotools_dir)/automake/pre.am

EXTRA_DIST = \
$(srcdir)/Doxyfile.in \
$(srcdir)/ChipDoxygenLayout.xml \
$(srcdir)/format-file.sh \
$(srcdir)/namespaces.dox \
EXTRA_DIST = \
$(srcdir)/Doxyfile.in \
$(srcdir)/ChipDoxygenLayout.xml \
$(top_srcdir)/scripts/helpers/doxygen-format-check.sh \
$(srcdir)/namespaces.dox \
$(NULL)

#
Expand Down Expand Up @@ -88,7 +88,7 @@ html/index.html: Doxyfile

#
# Addition rules and commands to create a documentation-only
# distribution of Weave
# distribution of Chip
#

$(chip_docdist_name): $(EXTRA_DOCS) html/index.html
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 5 additions & 14 deletions doc/namespaces.dox → docs/namespaces.dox
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,19 @@

/*
* Description:
* This file documents all C++ namespaces used within the Weave
* This file documents all C++ namespaces used within the CHIP
* Core SDK that are not otherwise documented in an umbrella
* header encompassing that namespace.
*
*/

/**
* @namespace nl
* @namespace chip
*
* @brief
* This namespace is the outermost namespace for all Weave interfaces.
* This namespace is the outermost namespace for all CHIP interfaces.
*
* @note All Nest Labs interfaces shall appear within this namespace.
*
* @note No third-party interfaces shall appear within this namespace.
*/

/**
* @namespace nl::Weave
*
* @brief
* This namespace includes interfaces within the Weave Core SDK
* that cover the Core stack, the Common and Nest vendor-specific
* This namespace includes interfaces within the CHIP Core SDK
* that cover the Core stack, the Common and vendor-specific
* profiles, and the support interfaces.
*/
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
# limitations under the License.
#

# Managed namespace constructs within Weave ended up seriously
# Managed namespace constructs within CHIP ended up seriously
# confusing Doxygen, and I could not find a nicer way to evaluate
# those macros via Doxygen's PREDEFINED directives. Instead, we
# process the incoming files via this script file.

SED=/bin/sed
FILENAME=${1}
# clang format has difficulty recognizing the
# WeaveMakeManagedNamespaceIdentifier() macro as a valid namespace;
# ChipMakeManagedNamespaceIdentifier() macro as a valid namespace;
# temporarily change the namespace name to something more palatable to
# clang-format

sed -e 's:^[ ]*namespace[ ]\+WeaveMakeManagedNamespaceIdentifier(\([^ ,()]\+\),[ ]*kWeaveManagedNamespaceDesignation_\([^ ,()]\+\))[ ]*{[ ]*$:namespace \1_\2 {:g' \
sed -e 's:^[ ]*namespace[ ]\+ChipMakeManagedNamespaceIdentifier(\([^ ,()]\+\),[ ]*kChipManagedNamespaceDesignation_\([^ ,()]\+\))[ ]*{[ ]*$:namespace \1_\2 {:g' \
-e 's/NS_ENUM(\([_a-zA-Z0-9][_a-zA-Z0-9]*\)[ ]*,[ ]*\([_a-zA-Z0-9][_a-zA-Z0-9]*\))/ enum \2 : \1 \2; enum \2 : \1/g' \
-e 's/__attribute__(([^)]*))//g' \
-e 's/__attribute__([^)]*)//g' "$FILENAME"

0 comments on commit 104ab9c

Please sign in to comment.