Skip to content

Add an option to disable building documentation#596

Closed
aduskett wants to merge 1 commit into
firewalld:masterfrom
aduskett:optional-documentation-building
Closed

Add an option to disable building documentation#596
aduskett wants to merge 1 commit into
firewalld:masterfrom
aduskett:optional-documentation-building

Conversation

@aduskett
Copy link
Copy Markdown
Contributor

For embedded applications such as Buildroot or Yocto, the man pages may not be
desired or even capable of being built.

On line 45 of configure.ac there is the line:
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], [DocBook XSL Stylesheets])

There are three issues with this:

  • It requires building the xml-catalog package.
  • It automatically defaults to the host systems xml-catalog
    instead of the cross environments.
  • It isn't necessary to have a functioning firewalld.

Create a new option: --disable-docs. By default, build the documentation, but
if a user passes --disable-docs documentation will no longer be built as
desired.

For embedded applications such as Buildroot or Yocto, the man pages may not be
desired or even capable of being built.

On line 45 of configure.ac there is the line:
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], [DocBook XSL Stylesheets])

There are three issues with this:
  - It requires building the xml-catalog package.
  - It automatically defaults to the host systems xml-catalog
    instead of the cross environments.
  - It isn't necessary to have a functioning firewalld.

Create a new option: --disable-docs. By default, build the documentation, but
if a user passes --disable-docs documentation will no longer be built as
desired.
Comment thread configure.ac

if test "x$ENABLE_DOCS" = "xyes"; then
AC_CONFIG_COMMANDS([xsl-cleanup],,[rm -f doc/xml/transform-*.xsl])
AC_CONFIG_FILES([doc/Makefile
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the autoconf manual, it is indeed legit to call AC_CONFIG_FILES() multiple times:

This section describes [...] AC_CONFIG_FILES [...]
All these macros can be called multiple times, [...]

Comment thread configure.ac
AM_CONDITIONAL(ENABLE_DOCS, [test x$ENABLE_DOCS = xyes])
if test "x$ENABLE_DOCS" = "xyes"; then
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], [DocBook XSL Stylesheets])
fi
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we were to try and be pedantic, this should be written as:

AS_IF([test "x$ENABLE_DOCS" = "xyes"],
      [JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
                            [DocBook XSL Stylesheets])])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or use AM_COND_IF([ENABLE_DOCS], [... ])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AM_COND_IF()

Oh, I did not know about that one, thanks! :-)

@erig0
Copy link
Copy Markdown
Collaborator

erig0 commented Mar 30, 2020

I'm working on cleaning this up manually. I'll should push it later today.

@erig0 erig0 closed this in 1627f10 Mar 30, 2020
@erig0
Copy link
Copy Markdown
Collaborator

erig0 commented Mar 30, 2020

I just pushed the changes. I had to fix it up because a few things were broken. Namely "make distclean". Thanks for the work!

@aduskett
Copy link
Copy Markdown
Contributor Author

Thank you so much! I really appreciate your help!

erig0 pushed a commit that referenced this pull request Apr 1, 2020
For embedded applications such as Buildroot or Yocto, the man pages may not be
desired or even capable of being built.

On line 45 of configure.ac there is the line:
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], [DocBook XSL Stylesheets])

There are three issues with this:
  - It requires building the xml-catalog package.
  - It automatically defaults to the host systems xml-catalog
    instead of the cross environments.
  - It isn't necessary to have a functioning firewalld.

Create a new option: --disable-docs. By default, build the documentation, but
if a user passes --disable-docs documentation will no longer be built as
desired.

Fixes: #589
Closes: #596
(cherry picked from commit 1627f10)
erig0 pushed a commit that referenced this pull request Apr 1, 2020
For embedded applications such as Buildroot or Yocto, the man pages may not be
desired or even capable of being built.

On line 45 of configure.ac there is the line:
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], [DocBook XSL Stylesheets])

There are three issues with this:
  - It requires building the xml-catalog package.
  - It automatically defaults to the host systems xml-catalog
    instead of the cross environments.
  - It isn't necessary to have a functioning firewalld.

Create a new option: --disable-docs. By default, build the documentation, but
if a user passes --disable-docs documentation will no longer be built as
desired.

Fixes: #589
Closes: #596
(cherry picked from commit 1627f10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants