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

@ -274,16 +274,19 @@ if ( ENABLE_CONFIG_FILES )
add_definitions( -DTIDY_ENABLE_CONFIG_FILES ) add_definitions( -DTIDY_ENABLE_CONFIG_FILES )
# For example, /etc/tidy.conf # define a default here so we can pass to XSL.
if ( TIDY_CONFIG_FILE ) if ( NOT TIDY_CONFIG_FILE )
set( TIDY_CONFIG_FILE "/etc/tidy.conf" )
endif ()
# 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_CONFIG_FILE="${TIDY_CONFIG_FILE}" )
endif ()
# For example, ~/.tidy.rc
if ( TIDY_USER_CONFIG_FILE )
add_definitions( -DTIDY_USER_CONFIG_FILE="${TIDY_USER_CONFIG_FILE}" ) add_definitions( -DTIDY_USER_CONFIG_FILE="${TIDY_USER_CONFIG_FILE}" )
endif ()
endif () endif ()

View file

@ -26,6 +26,9 @@
--> -->
<xsl:variable name="CONFIG" select="document('@TIDYCONFIG@')"/> <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: --> <!-- Main Template: -->
<xsl:template match="/"> <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 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 (defined with -DTIDY_CONFIG_FILE), but before any of the files specified
using \fB-config\fR. using \fB-config\fR.
<xsl:if test="$ENABLE_CONFIG_FILES = 'ON'">
.TP .TP
.B RUNTIME CONFIGURATION FILES .B RUNTIME CONFIGURATION FILES
In general, Unix-like systems support runtime configuration files. Use You can also specify runtime configuration files from which \fBtidy\fR will
\fBtidy -help-env\fR to see if your version of \fBtidy\fR supports them, and attempt to load a configuration automatically.
where they are expected to be on your system. .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" .SH "EXIT STATUS"
.IP 0 .IP 0
All input files were processed successfully. All input files were processed successfully.