Show libcurl's timestamp. This timestamp is only available in curlver.h
for tarball-based tests and builds, the maketgz script inserts it when the tarball is created. For CVS-based tests and builds the timestamp we show is the current UTC build time as it is the CVS version timestamp. In this way, all builds will have a valid source code timestamp which isn't related to the moment the tests and build is performed, with the exception of CVS-based ones which have the same "date" and "timestamp"
This commit is contained in:
parent
7725853446
commit
116f60e063
@ -65,7 +65,7 @@ use vars qw($version $fixed $infixed $CURLDIR $CVS $pwd $build $buildlog
|
|||||||
$buildlogname $configurebuild $targetos $confsuffix $binext
|
$buildlogname $configurebuild $targetos $confsuffix $binext
|
||||||
$libext);
|
$libext);
|
||||||
use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
|
use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
|
||||||
$nocvsup $nobuildconf $crosscompile);
|
$nocvsup $nobuildconf $crosscompile $timestamp);
|
||||||
|
|
||||||
# version of this script
|
# version of this script
|
||||||
$version='$Revision$';
|
$version='$Revision$';
|
||||||
@ -282,6 +282,28 @@ logit "date = ".(scalar gmtime)." UTC";
|
|||||||
# off that path from all possible logs and error messages etc.
|
# off that path from all possible logs and error messages etc.
|
||||||
$pwd = cwd();
|
$pwd = cwd();
|
||||||
|
|
||||||
|
# libcurl timestamp is present in curlver.h only if this isn't a CVS version.
|
||||||
|
# If no timestamp available in curlver.h then we are building from CVS and we
|
||||||
|
# will use current UTC build time as the CVS version timestamp.
|
||||||
|
if ((-f "$CURLDIR/include/curl/curlver.hh") &&
|
||||||
|
(grepfile("define LIBCURL_TIMESTAMP",
|
||||||
|
"$CURLDIR/include/curl/curlver.h")) &&
|
||||||
|
(open(F, "<$CURLDIR/include/curl/curlver.h"))) {
|
||||||
|
while (<F>) {
|
||||||
|
chomp;
|
||||||
|
if ($_ =~ /^\#define LIBCURL_TIMESTAMP\s+\"(.+)\".*$/) {
|
||||||
|
$timestamp = $1;
|
||||||
|
$timestamp =~ s/\s+UTC//;
|
||||||
|
$timestamp .= " UTC";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(F);
|
||||||
|
}
|
||||||
|
if(not defined $timestamp) {
|
||||||
|
$timestamp = scalar(gmtime)." UTC";
|
||||||
|
}
|
||||||
|
logit "timestamp = $timestamp";
|
||||||
|
|
||||||
if (-d $CURLDIR) {
|
if (-d $CURLDIR) {
|
||||||
if ($CVS && -d "$CURLDIR/CVS") {
|
if ($CVS && -d "$CURLDIR/CVS") {
|
||||||
logit "$CURLDIR is verified to be a fine source dir";
|
logit "$CURLDIR is verified to be a fine source dir";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user