mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-22 14:27:00 +08:00
Force creation of stamp file after libpq library check in meson builds
Previously, if --stamp_file was specified, libpq_check.pl would create a new stamp file only if none could be found. If there was already a stamp file, the script would do nothing, leaving the previous stamp file in place. This logic could cause unnecessary rebuilds because meson relies on the timestamp of the output files to determine if a rebuild should happen. In this case, a stamp file generated during an older check would be kept, but we need a stamp file from the latest moment where the libpq check has been run, so as correct rebuild decisions can be taken. This commit changes libpq_check.pl so as a fresh stamp file is created each time libpq_check.pl is run, when --stamp_file is specified. Oversight in commit 4a8e6f43a6b5. Reported-by: Andres Freund <andres@anarazel.de> Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Reviewed-by: VASUKI M <vasukim1992002@gmail.com> Discussion: https://postgr.es/m/CAN55FZ22rrN6gCn7urtmTR=_5z7ArZLUJu-TsMChdXwmRTaquA@mail.gmail.com
This commit is contained in:
@ -31,12 +31,9 @@ die "$0: --nm must be specified\n" unless defined $nm_path and -x $nm_path;
|
||||
|
||||
sub create_stamp_file
|
||||
{
|
||||
if (!(-f $stamp_file))
|
||||
{
|
||||
open my $fh, '>', $stamp_file
|
||||
or die "can't open $stamp_file: $!";
|
||||
close $fh;
|
||||
}
|
||||
open my $fh, '>', $stamp_file
|
||||
or die "can't open $stamp_file: $!";
|
||||
close $fh;
|
||||
}
|
||||
|
||||
# Skip on Windows and Solaris
|
||||
|
||||
Reference in New Issue
Block a user