Date: Wed, 9 Dec 1998 17:05:25 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Jeff Williams cc: djgpp AT delorie DOT com Subject: Re: Environment variables with BASH In-Reply-To: <199812091341.HAA06690@kendall.> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Wed, 9 Dec 1998, Jeff Williams wrote: > There is one problem, however, that I can't seem to fix by fiddling with the > bash environment variables: a colon-delimited directory list in makefiles > (e.g., in a vpath statement) will not be recognized, even if PATH_SEPARATOR=: > For some reason I must use semicolons (or spaces). The reason for this is that VPATH and vpath are processed by Make itself, and Make doesn't know anything about PATH_SEPARATOR. That feature is unique to Bash. Obviously, you cannot use a colon in DOS-style VPATH/vpath variables, since they can legitimately include drive letters. > Is it possible to use colon-delimited directory lists in makefiles (vpath > and elsewhere) under bash simply by setting the environment variables > appropriately, or will I need in this case to resort to the OS-dependent > separator as you described? One portable way to handle this nuisance is to say this in the Makefile: ifneq ($(COMSPEC),) sep = ; else sep = : endif and then use $(sep) in VPATH and vpath. (You might need to handle the blanks around the colon and semi-colon, I'm not sure.)