You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +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:
+1
-29
@@ -34,10 +34,6 @@ use pgBackRestDoc::Common::Log;
|
||||
use pgBackRestDoc::Common::String;
|
||||
use pgBackRestDoc::ProjectInfo;
|
||||
|
||||
use pgBackRestBuild::Build;
|
||||
use pgBackRestBuild::Build::Common;
|
||||
use pgBackRestBuild::Config::BuildHelp;
|
||||
|
||||
use pgBackRestTest::Common::BuildTest;
|
||||
use pgBackRestTest::Common::CodeCountTest;
|
||||
use pgBackRestTest::Common::ContainerTest;
|
||||
@@ -534,32 +530,8 @@ eval
|
||||
{
|
||||
&log(INFO, "autogenerate code");
|
||||
|
||||
# Auto-generate C files
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
my $rhBuild =
|
||||
{
|
||||
'configHelp' =>
|
||||
{
|
||||
&BLD_DATA => buildConfigHelp(),
|
||||
&BLD_PATH => 'command/help',
|
||||
},
|
||||
};
|
||||
|
||||
my @stryBuilt = buildAll("${strBackRestBase}/src", $rhBuild);
|
||||
|
||||
# Error when checking that files have already been generated but they change
|
||||
if ($bGenCheck && @stryBuilt)
|
||||
{
|
||||
confess &log(
|
||||
ERROR,
|
||||
'unexpected autogeneration of C code: ' . join(', ', @stryBuilt) . ":\n" .
|
||||
trim(executeTest("git -C ${strBackRestBase} diff")));
|
||||
}
|
||||
|
||||
&log(INFO, " autogenerated C code: " . (@stryBuilt ? join(', ', @stryBuilt) : 'no changes'));
|
||||
|
||||
# Build code
|
||||
executeTest("make -C ${strBuildPath} build-config build-error");
|
||||
executeTest("make -C ${strBuildPath} build-config build-error build-help");
|
||||
|
||||
if ($bGenOnly)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user