On 9/16/2010 2:20 PM, Paul Smith wrote:
> On Thu, 2010-09-16 at 12:36 -0700, Radly wrote:
>> Thanks, that was helpful, except that 'info' seems to be a no-op.
> 
> That means you're using an older version of GNU make where it wasn't
> implemented.
> 
> You can use $(warning ...) instead; that was implemented earlier.
> 
>> ifeq (${value OSTYPE},linux-gnu)
>>   TXT = GOT_IT
>> else
>>   TXT = MISSED_IT
>> endif
>>
>> all:
>>         @echo ${TXT}
> 
> You should not use the $(value ...) function, as I mentioned in my last
> email.
> 
>> Now I would like to know how to pick up OSTYPE directly from the
>> shell, without having to type "make OSTYPE = $OSTYPE".  If I enter it
>> that way, the makefile prints out "GOT_IT", but if I just type "make",
>> it prints "MISSED_IT".
> 
> If you are correctly exporting your OSTYPE variable from the shell, then
> using the make variable $(OSTYPE) as we described will work.
> 
> If, in your shell, you run "env | grep OSTYPE" does it show the value
> for OSTYPE?  If so then it's exported properly.
> 
> If not then you need to run "export OSTYPE" to export it.  This is in no
> way related to make; this is a feature of the shell.

That's what I love about this career--the learning opportunities abound.  I
ran the check you suggested, and sure enough there was nothing there.  So I
added "export OSTYPE=$OSTYPE to my .bashrc and that cleaned everything up
nicely.  THANKS!!

-- 
Daryl Lee
www.daryllee.com
The unexamined life is not worth living. -- Socrates
The unlived life is not worth examining. -- Unknown



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to