delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/08/30/15:59:37

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 <cgf-use-the-mailinglist-please AT cygwin DOT com>
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> <COL101-W69299EA7E887774F7EEC73E6620 AT phx DOT gbl> <B870629719727B4BA82A6C06A31C291207429E0915 AT hqmailsvr01 DOT voltage DOT com> <2A9FABB3664AF8459CBADA1CE4E4024642D52EA2BF AT DF-MASTIFF-MSG DOT exchange DOT corp DOT microsoft DOT com>
MIME-Version: 1.0
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019