X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Sat, 30 Aug 2008 15:58:51 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Probably stupid make question (cmd a=b) Message-ID: <20080830195851.GC20923@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <1220079853 DOT 15427 DOT ezmlm AT cygwin DOT com> <2A9FABB3664AF8459CBADA1CE4E4024642D52EA2BF AT DF-MASTIFF-MSG DOT exchange DOT corp DOT microsoft DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2A9FABB3664AF8459CBADA1CE4E4024642D52EA2BF@DF-MASTIFF-MSG.exchange.corp.microsoft.com> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: 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 On Sat, Aug 30, 2008 at 10:34:36AM -0700, Stephan Mueller wrote: >Creating a test batch file that echos %1 etc and %* is pretty trivial >to create. In mine, I tend to do > @echo echoing percent-n > @echo .%1. .%2. .%3. .%4. .%5. .%6. .%7. .%8. .%9. >and similarly for %* -- the dots won't be confused with content when >doing experiments. > >From this, you can test theories like the one below and see that batch >will parse > -Dsomething=c:\Documents and Settings\whatever >as four tokens. If you want the path to be a single token you will >need to use quotes. A perl equivalent will show that perl treats that >as three tokens. So, neither cmd nor perl will avoid your need to >quote filenames with spaces in them. cmd just adds to the problem with >the equals-treated-as-space thing. > >If your CMake-created-Makefile doesn't quote filenames, then that's a >bug in the Makefile generation or maybe it's just out-of-spec usage -- >you could also consider the bug to be the use of any file or directory >components containing spaces. So, another approach might be to set >'something' to a location other than somewhere under c:\Documents and >Settings; insist that your build be in a sane, no-space-in-name >location. As you've noted in another thread, the care and feeding of .bat files really is off-topic for this list. Please find another forum for discussing this stuff. The whole reason for Cygwin is to eschew the use of such MS-DOS things as .bat files. cgf -- 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/