X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Sat, 30 Aug 2008 15:58:51 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Probably stupid make question (cmd a=b)
Message-ID: <20080830195851.GC20923@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <1220079853.15427.ezmlm@cygwin.com> <COL101-W69299EA7E887774F7EEC73E6620@phx.gbl> <B870629719727B4BA82A6C06A31C291207429E0915@hqmailsvr01.voltage.com> <2A9FABB3664AF8459CBADA1CE4E4024642D52EA2BF@DF-MASTIFF-MSG.exchange.corp.microsoft.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@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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/

