From: anserper Date: Wed, 17 Jun 2009 12:48:30 +0000 (+0000) Subject: b=16424 X-Git-Tag: v1_8_2_01~1^2~315 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=582df6efe38d8fee6f28459bd5351ee9e0766215;p=fs%2Flustre-release.git b=16424 i=Sheng Yang i=Yibin Wang o=Brian Murrell fix for sles' -obj dirs --- diff --git a/lustre/scripts/version_tag.pl b/lustre/scripts/version_tag.pl index 8ae53ae..4569254 100644 --- a/lustre/scripts/version_tag.pl +++ b/lustre/scripts/version_tag.pl @@ -144,7 +144,7 @@ sub get_latest_mtime() sub get_linuxdir() { my $config = new IO::File; - my ($line, $dir); + my ($line, $dir, $objdir); if (!$config->open("autoMakefile")) { die "Run ./configure first\n"; } @@ -152,16 +152,20 @@ sub get_linuxdir() chomp($line); if ($line =~ /LINUX :?= (.*)/) { $dir = $1; + } elsif ($line =~ /LINUX_OBJ :?= (.*)/) { + $objdir = $1; last; } } $config->close(); my $ver = new IO::File; - if (!$ver->open("$dir/include/linux/utsrelease.h")) { - if (!$ver->open("$dir/include/linux/version.h")) { + if (!$ver->open("$objdir/include/linux/utsrelease.h") && + !$ver->open("$objdir/include/linux/version.h") && + !$ver->open("$dir/include/linux/utsrelease.h") && + !$ver->open("$dir/include/linux/version.h")) { die "Run make dep on $dir\n"; } - } + while(defined($line = <$ver>)) { $line =~ /\#define UTS_RELEASE "(.*)"/; if ($1) {