1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-05-22 10:15:16 +02:00

Migrate error code generation to C.

Parse src/build/error.yaml and write to src/config/error.auto.h and src/config/error.auto.c.
This commit is contained in:
David Steele
2021-08-02 18:32:11 -04:00
parent aaa9136820
commit 74c0c44fc8
14 changed files with 448 additions and 202 deletions
+2 -12
View File
@@ -37,8 +37,6 @@ use pgBackRestDoc::ProjectInfo;
use pgBackRestBuild::Build;
use pgBackRestBuild::Build::Common;
use pgBackRestBuild::Config::BuildHelp;
use pgBackRestBuild::Error::Build;
use pgBackRestBuild::Error::Data;
use pgBackRestTest::Common::BuildTest;
use pgBackRestTest::Common::CodeCountTest;
@@ -538,8 +536,6 @@ eval
# Auto-generate C files
#-----------------------------------------------------------------------------------------------------------------------
errorDefineLoad(${$oStorageBackRest->get("build/error.yaml")});
my $rhBuild =
{
'configHelp' =>
@@ -547,12 +543,6 @@ eval
&BLD_DATA => buildConfigHelp(),
&BLD_PATH => 'command/help',
},
'error' =>
{
&BLD_DATA => buildError(),
&BLD_PATH => 'common',
},
};
my @stryBuilt = buildAll("${strBackRestBase}/src", $rhBuild);
@@ -568,8 +558,8 @@ eval
&log(INFO, " autogenerated C code: " . (@stryBuilt ? join(', ', @stryBuilt) : 'no changes'));
# Build configuration
executeTest("make -C ${strBuildPath} build-config");
# Build code
executeTest("make -C ${strBuildPath} build-config build-error");
if ($bGenOnly)
{