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