[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newbie question - testing for OS. . .
From: |
Ken Smith |
Subject: |
Re: Newbie question - testing for OS. . . |
Date: |
Wed, 20 Dec 2006 18:18:27 -0800 |
On 12/20/06, bC <address@hidden> wrote:
Thanks for the prompt replies, everyone.
Are you always this way, or was I just lucky? ;-)
You were lucky :)
####################
test:
osver := $(shell uname -r)
#osname := $(shell uname -s)
#cpuarch := $(shell uname -m)
#youname := $(shell uname -o)
ifeq ($(osver),2.6.15-1.2054_FC5)
unzip ksh.zip
else
unzip ksh2.zip
endif
###################
Try one of these. Replace the <TAB>s with real tab characters. Both
of these approaches will work equally well. For some reason, I always
tend to use the $(if) function rather than the ifeq construct but
different strokes for different folks.
osver := $(shell uname -r)
.PHONY: test
test:
<TAB>$(if $(filter $(osver),2.6.15-1.2054_FC5), \
echo unzip ksh.zip, \
echo unzip ksh2.zip \
)
.PHONY:test2
ifeq ($(osver),2.6.15-1.2054_FC5)
test2:
<TAB>echo unzip ksh.zip
else
test2:
<TAB>echo unzip ksh2.zip
endif
- Newbie question - testing for OS. . ., bC, 2006/12/19
- RE: Newbie question - testing for OS. . ., Dave Korn, 2006/12/19
- Re: Newbie question - testing for OS. . ., Mike Shal, 2006/12/19
- RE: Newbie question - testing for OS. . ., Dave Korn, 2006/12/19
- Re: Newbie question - testing for OS. . ., Ken Smith, 2006/12/19
- Re: Newbie question - testing for OS. . ., Martin Sebor, 2006/12/19
- Re: Newbie question - testing for OS. . ., bC, 2006/12/20
- RE: Newbie question - testing for OS. . ., Dave Korn, 2006/12/20
- Message not available
- Re: Newbie question - testing for OS. . .,
Ken Smith <=