1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-15 01:04:37 +02:00

Migrate command-line help generation to C.

Command-line help is now generated at build time so it does not need to be committed. This reduces churn on commits that add configuration and/or update the help.

Since churn is no longer an issue, help.auto.c is bzip2 compressed to save space in the binary.

The Perl config parser (Data.pm) has been moved to doc/lib since the Perl build path is no longer required.

Likewise doc/xml/reference.xml has been moved to src/build/help/help.xml since it is required at build time.
This commit is contained in:
David Steele
2021-09-08 18:16:06 -04:00
parent def7d513cd
commit f4e1babf6b
32 changed files with 1194 additions and 5394 deletions

View File

@ -193,14 +193,14 @@ sub new
my $oRenderOut =
$self->{oManifest}->renderOutGet($self->{strType} eq 'latex' ? 'pdf' : $self->{strType}, $self->{strRenderOutKey});
# If these are the backrest docs then load the reference
# If these are the backrest docs then load the help
if ($self->{oManifest}->isBackRest())
{
$self->{oReference} =
new pgBackRestDoc::Common::DocConfig(${$self->{oManifest}->sourceGet('reference')}{doc}, $self);
new pgBackRestDoc::Common::DocConfig(${$self->{oManifest}->sourceGet('help')}{doc}, $self);
}
if (defined($$oRenderOut{source}) && $$oRenderOut{source} eq 'reference' && $self->{oManifest}->isBackRest())
if (defined($$oRenderOut{source}) && $$oRenderOut{source} eq 'help' && $self->{oManifest}->isBackRest())
{
if ($self->{strRenderOutKey} eq 'configuration')
{
@ -843,7 +843,7 @@ sub processTag
$strBuffer .= $strStart;
# Admonitions in the reference materials are tags of the text element rather than field elements of the document so special
# Admonitions in the help materials are tags of the text element rather than field elements of the document so special
# handling is required
if ($strTag eq 'admonition')
{