Unix Programming - shell comman in make (Xplatform)

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2004 > shell comman in make (Xplatform)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author shell comman in make (Xplatform)
Shea Martin

2004-01-27, 3:34 am

I need a variable in my Makefile, set to the OS name (i.e., the output
of uname) in upper case.

For gmake
OS := ($shell uname | tr -s '[:lower:]' '[:upper:]')
does the trick.

But for non gmake systems such as Solaris
OS :sh= uname | tr -s '[:lower:]' '[:upper:]'
works.

But I would like to have a universal make file. Any ideas?

Thanks,

~S

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com