1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Dynamically generate list of files for C library build.

This commit is contained in:
David Steele 2017-09-17 14:49:23 -04:00
parent 7c95a2f4de
commit 20af8ecf50
2 changed files with 18 additions and 6 deletions

View File

@ -21,6 +21,12 @@
<p>Exclude <file>pg_internal.init</file> files from backup since they are rebuilt on startup.</p>
</release-item>
</release-feature-list>
<release-refactor-list>
<release-item>
<p>Dynamically generate list of files for C library build.</p>
</release-item>
</release-refactor-list>
</release-core-list>
<release-doc-list>

View File

@ -360,6 +360,17 @@ sub formatText
####################################################################################################################################
use ExtUtils::MakeMaker;
# Create C files array
my @stryCFile = qw(LibC.c);
foreach my $strFile (sort(keys(%{$oStorage->manifest('')})))
{
# Skip all files except .c files (including .auto.c)
next if $strFile !~ /(?<!\.auto)\.c$/;
push(@stryCFile, "../${strFile}");
}
WriteMakefile
(
NAME => BACKREST_NAME . '::LibC',
@ -380,12 +391,7 @@ WriteMakefile
-I../src
)),
C => [qw(
LibC.c
../src/config/config.c
../src/config/configRule.c
../src/postgres/pageChecksum.c
)],
C => \@stryCFile,
OBJECT => '$(O_FILES)',
);