[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070421002045.36a663ba.akpm@linux-foundation.org>
Date: Sat, 21 Apr 2007 00:20:45 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: bbpetkov@...oo.de
Cc: Randy Dunlap <randy.dunlap@...cle.com>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv2] [KERNEL-DOC] kill warnings when building mandocs
On Thu, 19 Apr 2007 09:19:32 +0200 Borislav Petkov <bbpetkov@...oo.de> wrote:
> +# get kernel version
> +sub get_kernel_version() {
> + my $version;
> + open (FILE, $ENV{"SRCTREE"}."Makefile") || die "Can't open main kernel Makefile: $!";
> +
> + EOF: while (my $line = <FILE>)
> + {
> + if ($line =~ /VERSION\s+=\s+(\d+)/) {
> + $version .= $1;
> + next;
> + }
> + if ($line =~ /PATCHLEVEL\s+=\s+(\d+)/) {
> + $version .= ".$1";
> + next;
> + }
> + if ($line =~ /SUBLEVEL\s+=\s+(\d+)/) {
> + $version .= ".$1";
> + next;
> + }
> + if ($line =~ /EXTRAVERSION\s+=\s+(.*)$/) {
> + $version .= $1;
> + last EOF;
> + }
> + }
> + return $version;
> +}
we already did this in the top-level Makefile. It's in $(KERNELVERSION)
and is printed by `make kernelversion'.
Cannot we use that info somehow?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists