Update the man page to show the actual RC paths, and only if RC's are enabled.

This commit is contained in:
Jim Derry 2017-10-02 12:54:03 -04:00
parent 8d6ae76993
commit b1e7bba512
2 changed files with 25 additions and 10 deletions

View File

@ -273,17 +273,20 @@ if ( ENABLE_CONFIG_FILES )
message(STATUS "*** Building support for runtime configuration files.")
add_definitions( -DTIDY_ENABLE_CONFIG_FILES )
# For example, /etc/tidy.conf
if ( TIDY_CONFIG_FILE )
add_definitions( -DTIDY_CONFIG_FILE="${TIDY_CONFIG_FILE}" )
# define a default here so we can pass to XSL.
if ( NOT TIDY_CONFIG_FILE )
set( TIDY_CONFIG_FILE "/etc/tidy.conf" )
endif ()
# For example, ~/.tidy.rc
if ( TIDY_USER_CONFIG_FILE )
add_definitions( -DTIDY_USER_CONFIG_FILE="${TIDY_USER_CONFIG_FILE}" )
# define a default here so we can pass to XSL.
if ( NOT TIDY_USER_CONFIG_FILE )
set( TIDY_USER_CONFIG_FILE "~/.tidyrc" )
endif ()
# do *not* add these unless ENABLE_CONFIG_FILES!
add_definitions( -DTIDY_CONFIG_FILE="${TIDY_CONFIG_FILE}" )
add_definitions( -DTIDY_USER_CONFIG_FILE="${TIDY_USER_CONFIG_FILE}" )
endif ()

View File

@ -26,6 +26,9 @@
-->
<xsl:variable name="CONFIG" select="document('@TIDYCONFIG@')"/>
<xsl:variable name="ENABLE_CONFIG_FILES" select="'@ENABLE_CONFIG_FILES@'"/>
<xsl:variable name="TIDY_CONFIG_FILE" select="'@TIDY_CONFIG_FILE@'"/>
<xsl:variable name="TIDY_USER_CONFIG_FILE" select="'@TIDY_USER_CONFIG_FILE@'"/>
<!-- Main Template: -->
<xsl:template match="/">
@ -160,11 +163,20 @@ since you will probably invoke \fBtidy\fR from different directories.
The value of HTML_TIDY will be parsed after the compiled-in default
(defined with -DTIDY_CONFIG_FILE), but before any of the files specified
using \fB-config\fR.
<xsl:if test="$ENABLE_CONFIG_FILES = 'ON'">
.TP
.B RUNTIME CONFIGURATION FILES
In general, Unix-like systems support runtime configuration files. Use
\fBtidy -help-env\fR to see if your version of \fBtidy\fR supports them, and
where they are expected to be on your system.
You can also specify runtime configuration files from which \fBtidy\fR will
attempt to load a configuration automatically.
.IP
The system runtime configuration file (<xsl:value-of select="$TIDY_CONFIG_FILE" />),
if it exists will be loaded and applied first, followed by the user runtime
configuration file (<xsl:value-of select="$TIDY_USER_CONFIG_FILE" />).
Subsequent usage of a specific option will override any previous usage.
.IP
Note that if you use the \fBHTML_TIDY\fR environment variable, then the user
runtime configuration file will not be used. This is a feature, not a bug.
</xsl:if>
.SH "EXIT STATUS"
.IP 0
All input files were processed successfully.