X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: mwoehlke Subject: Re: Why are Windows paths broken in make 3.81? Date: Thu, 27 Jul 2006 14:00:41 -0500 Lines: 58 Message-ID: References: <9c2aabaf0607211629u4e29ffa1w5f09b3d8e5a923fc AT mail DOT gmail DOT com> <9c2aabaf0607260912n4d17a340j533a049565234c00 AT mail DOT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 1.5.0.4 (X11/20060516) In-Reply-To: <9c2aabaf0607260912n4d17a340j533a049565234c00@mail.gmail.com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Michael Hirsch wrote: > On 7/21/06, mwoehlke wrote: >> Michael Hirsch wrote: >> > Here is a sample Makefile that breaks with Gnu Make 3.81-1 under >> > Cygwin, but works fine with Gnu Make 3.80-1. We have been writing >> > these types of Makefiles for years, using both Windows and Cygwin >> > tools, and this is the first time Make has ever broken like this. >> > >> > I see in another thread that this is a known issue, though I don't see >> > it in the changelogs for make 3.81. >> > >> > Was this a deliberate break with backwards compatibility? It means >> > that every single reference to a windows path needs to be wrapped in >> > cygpath, which is a huge inconvenience. >> >> Yes. See . >> If you are using a POSIX-like "OS" (i.e. Cygwin), you should be using >> POSIX paths. That's not an inconvenience, that's called writing a bad >> makefile. If you aren't using Cygwin for the POSIX environment, you >> should be using MinGW. > > I see. Unfortunately, I am trying to use cygwin to make my life > easier on Windows, but I am still constrained to use windows programs. > Many of them cannot use the cygwin paths, but require a path like > "c:/my/path.exe". It will be very difficult to switch back and forth > between path representations. I guess I do need to look into MinGW. Ah, that problem. There are two possible solutions. One is to write a wrapper script for your Windows programs that will take the args, translate them (using cygpath), and then invoke the actual program. The other is to use 'cygpath' directly in your makefile, as needed. I also use Cygwin to drive the Microsoft compilers, having switched recently from an MKS environment. I used both of the above techniques. My GNUmakefile's do not contain Windows paths, as they should not in a Cygwin environment. >> > Is it broken only on Windows? >> >> That sounds like a silly question... 'are Windows paths only broken on >> Windows?' > > It sounds like a silly question, but it isn't. I tested, and yes, if > you have a directory named "c:" in Linux, make is broken on that > directory, too. Since "c:" is a valid name in Linux (and POSIX, I > believe) I consider that a bug in make. I'll have to report that to > GNU, as it is not a cygwin issue. The error message on Linux is just > as incomprehensible as it is Cygwin, too, so at least I know who to > talk to about it. Right, that would be something to take up with the make author. However, as both CGF and Igor mentioned, ':' means something special to make, and so probably needs to be quoted/escaped/something. There is probably a way to do this that works right now on make 3.81. -- Matthew Ok, so the quotes aren't entirely original. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/