comparison revisions.pl.in @ 1065:dc576c7e4b1e

Fix to make sure to create gen/ in build dir and unbreak build with older perl
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 08 Mar 2009 16:37:55 +0100
parents f0b6549055ab
children 829ac3f30103
comparison
equal deleted inserted replaced
1064:f0b6549055ab 1065:dc576c7e4b1e
9 9
10 my $llvm_rev = `svnversion --committed $llvm_src`; 10 my $llvm_rev = `svnversion --committed $llvm_src`;
11 my $llvm_rev_str; 11 my $llvm_rev_str;
12 my $llvm_rev_nr; 12 my $llvm_rev_nr;
13 13
14 if ($llvm_rev =~ /^\s*(\d+:)?(?<str>(?<nr>\d+)[MSP]*)\s*$/) { 14 if ($llvm_rev =~ /^\s*(\d+:)?((\d+)[MSP]*)\s*$/) {
15 $llvm_rev_str = qq!#define LLVM_REV_STR "LLVM rev. $+{str}"!; 15 $llvm_rev_str = qq!#define LLVM_REV_STR "LLVM rev. $2"!;
16 $llvm_rev_nr = "$+{nr}"; 16 $llvm_rev_nr = "$3";
17 } else { 17 } else {
18 my $llvm_lib = `perl @LLVM_CONFIG@ --libdir`; 18 my $llvm_lib = `perl @LLVM_CONFIG@ --libdir`;
19 $llvm_lib =~ s/\s+$//; 19 $llvm_lib =~ s/\s+$//;
20 $llvm_rev = ctime(stat($llvm_lib)->mtime) if (-d $llvm_lib); 20 $llvm_rev = ctime(stat($llvm_lib)->mtime) if (-d $llvm_lib);
21 $llvm_rev_str = qq!#include "llvm/Config/config.h"\n#define LLVM_REV_STR PACKAGE_STRING" ($llvm_rev)"!; 21 $llvm_rev_str = qq!#include "llvm/Config/config.h"\n#define LLVM_REV_STR PACKAGE_STRING" ($llvm_rev)"!;