Skip to content

Commit

Permalink
Ensure 'doc' Make Target Is Supported; Add Diagnostic Information If …
Browse files Browse the repository at this point in the history
…Documentation Is Disabled (#1503)

* Ensure the 'doc' target is supported per 'make help'. Also, provide useful diagnostic infomration if Doxygen is not available or if documentation support has been explicitly disabled.

* Qualify the negated CHIP_BUILD_DOCS case with the 'doc' and 'docdist' targets.
  • Loading branch information
gerickson authored Jul 9, 2020
1 parent dd62545 commit c56ec54
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ dist-hook: $(distdir)/.dist-version
distclean-local:
$(MAKE) -C $(srcdir) -f Makefile-bootstrap clean-repos

#
# Top-level convenience target for making documentation.
#

.PHONY: doc
doc: $(BUILT_SOURCES)
$(MAKE) -C docs $(@)

#
# Top-level convenience target for making a documentation-only
# distribution whose results appear at the top level of the build tree
Expand Down
9 changes: 8 additions & 1 deletion docs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ CLEANFILES = \
$(chip_docdist_archive) \
$(NULL)

.PHONY: doc docdist

if CHIP_BUILD_DOCS

all-local: html/index.html
all-local doc: html/index.html

#
# We choose to manually transform Doxyfile.in into Doxyfile here in
Expand Down Expand Up @@ -106,6 +108,11 @@ docdist $(chip_docdist_alias): $(chip_docdist_archive)
clean-local:
$(AM_V_at)rm -f -r html

else

doc docdist:
$(error "Documentation support is disabled. Please explicitly enable documentation with `--enable-docs` via `configure` and/or ensure that Doxygen is installed")

endif # CHIP_BUILD_DOCS

include $(abs_top_nlbuild_autotools_dir)/automake/post.am

0 comments on commit c56ec54

Please sign in to comment.