delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/01/20:34:27

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F50238E.2090601@cs.cmu.edu>
Date: Thu, 01 Mar 2012 17:34:06 -0800
From: Paul Allen Newell <pnewell AT cs DOT cmu DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: pnewell AT cs DOT cmu DOT edu
Subject: Re: question on Cygwin's version of make
References: <4F4F21AC DOT 7060209 AT cs DOT cmu DOT edu> <CAEhDDbBLTNOzW-iHOR5LjFtDFjiuoseFCAvNTQtMAY4xnA+VKA AT mail DOT gmail DOT com>
In-Reply-To: <CAEhDDbBLTNOzW-iHOR5LjFtDFjiuoseFCAvNTQtMAY4xnA+VKA@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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 3/1/2012 12:27 AM, Csaba Raduly wrote:
> On Thu, Mar 1, 2012 at 8:13 AM, Paul Allen Newell  wrote:
>> I've got a C++ tree that is running under Fedora 14, Fedora 16, and Cygwin.
>> Everything works.
>>
>> Tonight, I needed to test something and was on my Windows box, so I did a
>> cut-and-paste operation which gave me a directory of "Copy of myStuff". I
>> did a make and it worked, but I am seeing a message about "basename: extra
>> operand 'myStuff'.
> That appears to be an error message from /usr/bin/basename
>
> GNU make has a built-in function $(basename ...) but that doesn't
> appear to have such an error message.
>
>> I figured out that the spaces in the MS "Copy of myStuff" were the problem
>> and was able to rename w/o spaces and move forward.
>>
>> But I would like to ask if anyone knows what in "make" uses the basename
>> command so I can try to either massage the Makefile to deal with it or throw
>> a more meaningful error (as in "your directory has spaces in it and there
>> will be complaints")?
> Read your makefile. One of the actions is probably using basename.
> Alas, /usr/bin/basename has no way of knowing that it was invoked from
> make; you can't get "more meaningful errors".
>
> Csaba

Csaba:

The first thing I did was look in my makefiles to see if I was using 
basename. I'm not and so I am thinking that something else is calling it 
under the hood. Its the very first thing, so I am inclined to think that 
make must be calling it to load up a variable should the makefile ever 
need it.

I went through the gnu.org man html and can't see much more than 
"basename" exists and how to use it.

Using Macro's suggestion of 2>&1 doesn't capture the basename 
error/warning message. I tried "make > make.out 2>&1" and the message 
still isn't being captured.

Given that I don't like spaces in filenames/directories, its a moot 
point in terms of how to avoid the problem. But the inability to capture 
the output is bothering me ...

Paul

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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