How to put shell script to Makefile
Steven W. Orr
steveo at syslang.net
Fri Dec 2 21:58:08 UTC 2005
On Friday, Dec 2nd 2005 at 16:07 -0500, quoth Gavin Li:
=>I have a script like this:
=>
=>KNL_VER=2.6.9
=>echo ${KNL_VER) | cut -c -3
=>if [ $? == "2.6"] ; then
=> Make -f Makefile
=>else
=> Make -f Makefile-2.4
=>endif
=>
=>How can I put in make file?
Gavin, you're very confused. $? is always the exit status code of the
previous command. I'm not sure what you're looking for.
For starters:
KNL_VER=2.6.9
if [[ $(echo ${KNL_VER) | cut -c -3) = 2.6 ]]
then
Make -f Makefile
else
Make -f Makefile-2.4
fi
Now, please try again and tell me what you're trying to ask.
--
Time flies like the wind. Fruit flies like a banana. Stranger things have .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
More information about the fedora-list
mailing list