make-w32
[Top][All Lists]
Advanced

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

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


From: Alessandro Vesely
Subject: Re: Savannah W32 patches... are any OK?
Date: Tue, 01 Mar 2005 11:25:21 +0100

Eli Zaretskii wrote:
> 
> > Date: Mon, 28 Feb 2005 12:43:21 +0100
> > From: Alessandro Vesely <address@hidden>
> > CC: Eli Zaretskii <address@hidden>, address@hidden
> >
> > The analisys above is not fully correct: NT distinguishes two kinds of
> > environment, system variables and user variables. Thus, setting a variable
> > with different case in the other environment still creates two variables
> > with the same uppercase name. Typically, that occurs when PATH has been set
> > as a system variable and Path has been added by GNU make as a user variable.
> >
> > [...]
> >
> > 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.
> 
> What specific Make-related problems can happen due to all this mess?

Users may want to detect if MSVC is active without trying all combinations, e.g.

  MSVC = $(origin MSVCDir)
  ifeq "$(MSVC)" "undefined"
   MSVC = $(origin MSDEVDIR)
   ifeq "$(MSVC)" "undefined"
    MSVC = $(origin MSDevDir)
    ifeq "$(MSVC)" "undefined"
     MSVC = $(origin MSDevdir)
     # ...
    endif
   endif
  endif
 
> I don't think we need to solve academic problems, only the ones that
> harm Make or its frequent subsidiary programs.

So do I.

I added the example about the PATH vs. Path environment variable because
it may concern the malfunctioning of the $(shell) function in Win9x.
 
> > IMHO, a more interesting solution to this problem is to have a getenv 
> > function.
> 
> ??? Environment variables are just variables in Make, so you already
> have that.  E.g., "foo = $BAR" wil store in foo the value of the
> environment variable BAR (modulo the -e switch to Make).

getenv(MSDEVDIR) is easier than the above. My proposal is to fix this in 3.82,
after Guile support will have been introduced, including that getenv function.

Meanwhile, one could do $(shell echo $$MSDEVDIR) or $(shell echo %MSDEVDIR%),
if $(shell) worked correctly...




reply via email to

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