delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/01/22:10:38

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Received-SPF: pass (google.com: domain of kennethwolcott AT gmail DOT com designates 10.60.4.227 as permitted sender) client-ip=10.60.4.227;
Authentication-Results: mr.google.com; spf=pass (google.com: domain of kennethwolcott AT gmail DOT com designates 10.60.4.227 as permitted sender) smtp.mail=kennethwolcott AT gmail DOT com; dkim=pass header.i=kennethwolcott AT gmail DOT com
MIME-Version: 1.0
In-Reply-To: <CADex0xx-sC-aqHMJC1BtVbDvWHEFNB-zpmeWAv6dqTSZSvmF-w@mail.gmail.com>
References: <4F5035D0 DOT 9070502 AT cs DOT cmu DOT edu> <CADex0xx-sC-aqHMJC1BtVbDvWHEFNB-zpmeWAv6dqTSZSvmF-w AT mail DOT gmail DOT com>
Date: Thu, 1 Mar 2012 19:10:14 -0800
Message-ID: <CADex0xyuU+Ljm=Uh5_vD-7KTqsdBEhMdMT8B8EiQb+4Wio0q0g@mail.gmail.com>
Subject: Re: make producing basename error that can't be captured by "make &> make.out"
From: Kenneth Wolcott <kennethwolcott AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q223AZlj028000

On Thu, Mar 1, 2012 at 19:05, Kenneth Wolcott <kennethwolcott AT gmail DOT com> wrote:
>
>
>
> On Thu, Mar 1, 2012 at 18:52, Paul Allen Newell <pnewell AT cs DOT cmu DOT 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


- Raw text -


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