[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gmake detection of which version of RH
From: |
deodiaus |
Subject: |
gmake detection of which version of RH |
Date: |
12 Nov 2004 09:25:40 -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-------------------------
- gmake detection of which version of RH,
deodiaus <=