Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / scripts / version_tag.pl.in
index 1212441..c341642 100644 (file)
@@ -16,9 +16,9 @@ sub get_tag()
     my $line;
 
     my $tagfile = new IO::File;
-    if (!$tagfile->open("CVS/Tag")) {
+    if (!$tagfile->open("lustre/CVS/Tag")) {
         my $verfile = new IO::File;
-        if (!$verfile->open("portals/include/config.h")) {
+        if (!$verfile->open("config.h")) {
           return "UNKNOWN";
         }
         while(defined($line = <$verfile>)) {
@@ -156,7 +156,12 @@ sub generate_ver($$$)
                             $hour, $min, $sec);
 
     print "#define BUILD_VERSION \"";
-    if ($pristine) {
+
+    my $lustre_vers = $ENV{LUSTRE_VERS};
+
+    if ($lustre_vers) {
+        print "$tag-$lustre_vers\"\n";
+    } elsif ($pristine) {
         print "$tag-$show_last-PRISTINE-$linuxdir-$kernver\"\n";
     } else {
         print "$tag-$show_last-CHANGED-$linuxdir-$kernver\"\n";