my $tagfile = new IO::File;
if (!$tagfile->open("CVS/Tag")) {
my $verfile = new IO::File;
- if (!$verfile->open("include/config.h")) {
+ if (!$verfile->open("portals/include/config.h")) {
return "UNKNOWN";
}
while(defined($line = <$verfile>)) {
my $tag = get_tag();
my $mtime = get_latest_mtime();
-# for get_linuxdir you need to be in builddir
+# for get_linuxdir you need to be in builddir
-#if ($ARGV[1]) {
-# chdir($cwd);
-# chdir($ARGV[1]);
-#}
-#my $linuxdir = get_linuxdir();
-
-my $linuxdir = '@LINUX@';
-$linuxdir =~ s/\//\./g;
-$kernver = '@LINUXRELEASE@';
+if ($ARGV[1]) {
+ chdir($cwd);
+ chdir($ARGV[1]);
+}
+my $linuxdir = get_linuxdir();
generate_ver($tag, $mtime, $linuxdir);