On Thu, Mar 1, 2012 at 19:05, Kenneth Wolcott <kennethwolc...@gmail.com> wrote: > > > > On Thu, Mar 1, 2012 at 18:52, Paul Allen Newell <pnew...@cs.cmu.edu> > wrote: >> >> Cygwin: >> >> I've already run an earlier version of this through the list to see if I >> was dealing with pilot error. Its gotten to the point that it was suggested >> I consult http://cygwin.com/problems.html and submit. >> >> The issue came up when I did a Windows cut-and-paste of a directory in my >> cygwin home, cd-ed to it, and got a basename error when I ran make. Was able >> to figure out that make didn't like "Copy\ of\ myStuff" and all I had to do >> was remove the spaces and everything was happy. >> >> But while trying to debug, I found another issue. The first is that I >> wanted to trap all output to a file so I could run make -d to see where >> basename was getting called. So, I used "make -d &> make.out" per #3.6 in >> http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html. Everything except the >> basename error went to the file ... basename still printed to the screen. >> Tried other variations with no success. That's when it was suggested I do >> the report.html. >> >> I went through the archives and the closest I found was a 2005 post with >> a basename error, but it seemed to not cover what I was seeing. >> >> To show the problem: >> >> Create a directory called "myStuff" in one's cygwin home directory. Do a >> "cd myStuff" and run make. It will say no targets or makefile found. Now, >> open the cygwin home directory with a Windows "right click Open". Do a Copy >> and then a Paste of myStuff to get "Copy\ of\ myStuff". Do a cd into that >> directory and run make. I am getting: >> +++ >> $make >> basename: extra operand 'myStuff' >> Try 'basename --help' for more information. >> make: *** No targets specified and no makefile found. Stop. >> +++ >> >> That's the original problem and this test proves that it is nothing in my >> makefile as there is no makefile, its happening in the execution of make. >> With make -d, it still is the first thing called before one gets the opening >> stuff about which version, no warranty, etc.. >> >> If I type "make &> make.out", the basename error still goes to the screen >> and the no target/makefile goes to make.out. >> >> The issue I am reporting is the lack of capturing the basename error to >> make.out, though I do think basename not being able to understand >> directories with space(s) is a nuisance worth noting. >> >> Please let me know if there is any other info I can provide (cygcheck >> attached) >> Thanks, >> Paul
Is it possible that scripts and executables write to file descripter 3 or 4 or 5? File descriptor 0 is STDIN (normally), and file descriptor 1 is STDOUT (normally) and file descripter 2 is SDTERR (normally). So, perhaps you might want to try to capture/merge the output of file descriptor 3, or 4 or 5? The syntax for merging is quite similar to the "2<&1" for bash which means "please merge the STDERR with the STDOUT". HTH, Ken Wolcott -- 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