detecting RH version in GNUMakefile
From: deodiaus (deodiaus_at_my-deja.com)
Date: 11/12/04
- Next message: Rich Teer: "Re: detecting RH version in GNUMakefile"
- Previous message: Antonio Mano: "Re: Setting time with rdate ( SCO x RED HAT )"
- Next in thread: Rich Teer: "Re: detecting RH version in GNUMakefile"
- Reply: Rich Teer: "Re: detecting RH version in GNUMakefile"
- Reply: Moe Trin: "Re: detecting RH version in GNUMakefile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Nov 2004 08:59:10 -0800
How does one find out which version of RH is installed on a particular
machine?
I am trying to detect the version of RH on which future we will be doing a
build.
I can't believe that this is not more standardized, and for the last 30
years everyone has been writting something like this!
I do this by looking at uname -r and associating the kernal with that
version!
Will this work? I see one problem it that if the sys op updated the kernal,
this could potentially break
#-----------GNUMakefile -----------------
UNAMES = $(shell uname -s)
ifeq ($(UNAMES),SunOS)
SSLIPATH = -I../os/Solaris/Solaris32/ssl/include \
-I../os/Solaris/Solaris32/ssl/include/openssl
else
ifeq ($(UNAMES),Linux)
UNAMER = $(shell uname -r)
UNAMER1 = $(join v,$(UNAMER))
UNAMER2=$(findstring v2.4,$(UNAMER1))
ifeq ($(UNAMER2),v2.4)
SSLIPATH = -I../os/Linux/LinuxRH7/ssl/include \
-I../os/Linux/LinuxRH7/ssl/include/openssl
else
UNAMER1 = $(join v,$(UNAMER))
UNAMER2=$(findstring v2.5, $(UNAMER1))
ifeq ($(UNAMER2),v2.5) #rh9
SSLIPATH = -I../os/Linux/LinuxRH9/ssl/include \
-I../os/Linux/LinuxRH9/ssl/include/openssl
else
SSLIPATH = -I../os/Linux/LinuxRHE3/ssl/include \
-I../os/Linux/LinuxRHE3/ssl/include/openssl
endif#rh9
endif#rh7
else
SSLIPATH = -I../os/WINDOWS/WIN32/ssl/include \
-I../os/WINDOWS/WIN32/ssl/include/openssl
endif#Linux
endif#SunOS
# more code to follow
#---------------------------eof-------------------------
- Next message: Rich Teer: "Re: detecting RH version in GNUMakefile"
- Previous message: Antonio Mano: "Re: Setting time with rdate ( SCO x RED HAT )"
- Next in thread: Rich Teer: "Re: detecting RH version in GNUMakefile"
- Reply: Rich Teer: "Re: detecting RH version in GNUMakefile"
- Reply: Moe Trin: "Re: detecting RH version in GNUMakefile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|