[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Savannah W32 patches... are any OK?

From: Paul D. Smith
Subject: Re: Savannah W32 patches... are any OK?
Date: Tue, 1 Mar 2005 08:46:27 -0500

%% "Earnie Boyd" <address@hidden> writes:

  >>> >> This seems crazy to me, coming from my cushy UNIX-centric world :-),
  >>> >> but there are some good arguments here and so if the W32 team thinks
  >>> >> it's a good idea, it's fine with me.

  ez> It seems crazy to me as well, especially since I don't understand
  ez> what was the original problem that such case-insensitive treatment
  ez> of environment vars is supposed to solve.  Can someone enlighten
  ez> me about the opriginal problem?

  >>> From the description above it seems like if the makefile expects a
  >>> variable from the environment called SOMEVARIABLE, but you set
  >>> SomeVariable in your environment, make won't treat them as the
  >>> same even though Windows (and DOS?) apparently DOES consider them
  >>> the same.

  >> Add to this that Win32 utilities are often inconsistent about the
  >> spelling of a variable: Since the OS retrieves variables
  >> case-insensitivitely, they feel free to amend the spelling across
  >> versions to increase readability.

  eb> I don't see why it matters!  Can you give an example of where the
  eb> case of the environment variable name matters w.r.t. Make?

I believe the argument goes, that if you have a Makefile that is
expecting to get a variable "FOOBAR" from the environment, and the user
sets the variable "foobar" instead, then your Makefile will not work,
even though according to the system they are the same variable.

I suppose there also might be IDE environments that set variables, then
invoke make, and the paragraph above is saying that those IDEs feel free
to change the case of these variables between releases.

  eb> Why does Make need its own version of getenv?  Why won't the
  eb> provided getenv function from the C runtime work?

I think the suggestion is that make provide a _MAKE_ function interface
to getenv, such as: $(getenv VARNAME) that would invoke the C getenv()
below it.  This $(getenv ...) would be case-insensitive on Windows

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

[Prev in Thread] Current Thread [Next in Thread]