bug-make
[Top][All Lists]
Advanced

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

Re: Bug under Win32 with gnumake 3.79.1 and 3.77


From: Eli Zaretskii
Subject: Re: Bug under Win32 with gnumake 3.79.1 and 3.77
Date: Tue, 11 Sep 2001 21:51:26 +0300

> From: "Paul D. Smith" <address@hidden>
> Date: Tue, 11 Sep 2001 17:19:44 +0200
> 
> X=$(wildcard c:\\*.*)
> does not macht anything under win32 while
> X=$(wildcard c:/*.*)
> does match the given files.
> This is a problem for me, since make does
> use the "\\" as the path separator internally
> when handling files, so we did in our makefiles
> under win32.

GNU Make doesn't support backslashes in the wildcard function, even on
DOS and Windows.  It's impossible to have that support, since a
backslash is used for quoting parts of wildcards in the GNU
file-globbing library used by Make.  If backslashes were to be
supported as directory separators, GNU Make would lose much more
important features.

> Workaround:
> I Used:
> 
> X_PATH=c:\\temp\\
> X=$(subst /,\\, $(wildcard $(subst \\,/,$(X_PATH))*.*))
> 
> in my makefile.

Right.  That's the only solution I know of, if you must use
backslashes.  Using forward slashes is an even better alternative,
since the OS supports them just fine, and many development tools
(those programs you invoke from the Makefile) support them as well.
(Some programs require that you put qoutes, "like this", around file
names with forward slashes.)

> Since this solution looks somewhat ugly,
> could someone please consider fixing this bug?

It's not a bug, it's something that the ported code deliberately does
not do, to avoid breaking much more important features.



reply via email to

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