lkml.org 
[lkml]   [2007]   [Apr]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 21 Apr 2007 00:20:45 -0700
FromAndrew Morton <>
SubjectRe: [PATCHv2] [KERNEL-DOC] kill warnings when building mandocs
On Thu, 19 Apr 2007 09:19:32 +0200 Borislav Petkov <bbpetkov@yahoo.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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-21 09:23    [from the cache]
©2003-2008