help-make
[Top][All Lists]
Advanced

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

Re: Internal make command Macro to identify linux/os distribution.


From: Gautam Shejwalkar
Subject: Re: Internal make command Macro to identify linux/os distribution.
Date: Tue, 9 Sep 2008 17:36:29 +0530

Hi Paul,

Thank you for the reply. The information which you have provided is exactly what I was looking for. This will help me resolve my problem.

Regards,
-Gautam

On Tue, Sep 9, 2008 at 5:27 PM, Paul Smith <address@hidden> wrote:
On Tue, 2008-09-09 at 16:18 +0530, Gautam Shejwalkar wrote:
> Yes, I was referring to the distro. Actually based on the distro I
> want to decide which rpm package needs to be installed. B'coz only in
> uname -r we get the information on the distro. I am not sure if there
> are any other commands available for checking the distro type.

uname -r returns the version of the kernel.  _Some_ distros will build
custom kernels and _some_ of them will put a reference to the distro
name in the kernel name.  But, this is very, very far from being a
reliable test.  People can rebuild their kernels for lots of reasons.
Also some distros DON'T put a distro reference in the kernel name (on my
Ubuntu 8.04 system for example, uname -r gives "2.6.24-21-generic").

The best, most portable way to tell the distro name on a Linux system is
with lsb_release; any LSB-compliant distro will have this command.  You
can see the options for details, but probably you want "lsb_release
--id" if all you want is the distribution vendor ("Red Hat" etc.) or
"lsb_release --description" if you want the distro version info.

--
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


reply via email to

[Prev in Thread] Current Thread [Next in Thread]