Re: [PATCHv2] [KERNEL-DOC] kill warnings when building mandocs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 19 Apr 2007 09:19:32 +0200 Borislav Petkov <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux