Determine system ver (Debian vs. other Linuxes) at runtime?
- From: Matt England <mengland@xxxxxxxxxxxx>
- Date: Fri, 30 Dec 2005 14:40:04 -0600
In my cross-platform-programming quests, I'm looking for ways to determine via my Makefiles which system/platform said build process is running on, so I can automatically pull in the correct libraries, build to the correct target directories, use the correct platform-specific code, etc.
Back in the "old days" for me (mid 1990s), the Unix builds I was making were mostly Solaris, HP-UX, Irix, Digital-Unix, AIX....etc etc. In such cases, 'uname -rs' all had distinctly different outputs.
Now, 'uname -rs' (and the newer 'uname -o') all say "Linux" or "GNU/Linux" for all the Linux distributions.
So I'm left with figuring out much harder ways to tell system revs apart. I'm guessing I'm going to have to make an application which does nothing but evaluate a system and report it's variant (Redhat vs SuSE vs. Debian) and revision (Debian Woody/3.0, Sarge/3.1, etc).
Thing is, I don't even know where to start. Will some uname-based analysis work by itself? Haven't seen anything yet that will distinguish between the different Linux distros. I suspect there will be other cmds/APIs I can use to do stuff. I'm looking for suggestions.
-Matt
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- Follow-Ups:
- Re: Determine system ver (Debian vs. other Linuxes) at runtime?
- From: OxyOss
- Re: Determine system ver (Debian vs. other Linuxes) at runtime?
- From: John Hasler
- Re: Determine system ver (Debian vs. other Linuxes) at runtime?
- From: Chris Howie
- Re: Determine system ver (Debian vs. other Linuxes) at runtime?
- Prev by Date: Re: How to install additional fonts ?
- Next by Date: Re: Determine system ver (Debian vs. other Linuxes) at runtime?
- Previous by thread: How to install additional fonts ?
- Next by thread: Re: Determine system ver (Debian vs. other Linuxes) at runtime?
- Index(es):