make-w32
[Top][All Lists]
Advanced

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

Re: PATH vs. Path ([Fwd: Returned mail: see transcript for details]


From: Eli Zaretskii
Subject: Re: PATH vs. Path ([Fwd: Returned mail: see transcript for details]
Date: Sat, 05 Mar 2005 13:18:45 +0200

> Date: Fri, 4 Mar 2005 23:25:45 +0200
> From: David Baird <address@hidden>
> 
> I tried to set the Path variable in a make file with GNU Make 3.80
> last year on Windows XP, and got problems with the $(shell) macros. I
> was using the CMD.EXE as my shell. I recall that if I set and exported
> PATH, then the $(shell) didn't pick it up. I can't recall what effect
> setting Path had.
> 
> I was writing make files which work with ClearCase's clearmake with
> GNU emulation and with GNU Make 3.80. I was able to detect which make
> program was running by testing the $(MAKE) variable. Clearmake's GNU
> emulation requires setting and exporting Path, and it selects the
> CMD.EXE for the shell by default. Once I set Path (with :=) all my
> $(shell) macros worked. However, I encountered several challenges
> getting things to work with GNU Make 3.80, whether setting Path or
> PATH.

Can you explain why you needed to set or export PATH or Path in the
Makefile?  Was it different from the value outside Make, or was it
because of some other reason?

> I suggest that when testing setting Path or PATH in a make file, to
> test the effect on $(shell) macros as well as on commands in target
> rules.

Good point.

> For my own work, supporting non-Cygwin and non-MSYS environments is
> important, as I want to distribute a build system where I don't
> require installation of Unix emulation additions, but still allow
> their presence.

Agreed.

> I therefore utilize the CMD.EXE for Windows, and my
> make files work well.

That might not work for situations different from yours.  One notable
example is using Make to build ported GNU software: in that case,
Makefiles almost always need a ported Unix shell (Bash) and auxiliary
utilities (Fileutils, Grep, Sh-utils, find, etc.).

So we cannot tell users of the Windows port of Make ``use cmd.exe if
you want PATH and $shell to work''.




reply via email to

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