From 20af8ecf505f3b8b490dfb76969d5e39dabf0362 Mon Sep 17 00:00:00 2001 From: David Steele Date: Sun, 17 Sep 2017 14:49:23 -0400 Subject: [PATCH] Dynamically generate list of files for C library build. --- doc/xml/release.xml | 6 ++++++ libc/Makefile.PL | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index c3704d6a9..4c5dd9293 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -21,6 +21,12 @@

Exclude pg_internal.init files from backup since they are rebuilt on startup.

+ + + +

Dynamically generate list of files for C library build.

+
+
diff --git a/libc/Makefile.PL b/libc/Makefile.PL index 117894d42..a920d14f1 100644 --- a/libc/Makefile.PL +++ b/libc/Makefile.PL @@ -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 !~ /(? 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)', );