delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/09/09:54:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-Id: <200207091354.g69DsQN01874@etp1.bitmover.com>
From: Andrew Chang <awc AT bitmover DOT com>
To: cygwin AT cygwin DOT com, jbezem AT csksoftware DOT com
Subject: Re: The "make" command and file handle problem
Date: Tue, 9 Jul 2002 06:54:26 -0700
References: <200207090501 DOT g6951Mo14832 AT etp1 DOT bitmover DOT com> <3D2A9D71 DOT E2318ECE AT csksoftware DOT com>
MIME-Version: 1.0

On Tuesday 09 July 2002 06:46 am, Andrew Chang wrote:
> On Tuesday 09 July 2002 01:23 am, Johan Bezem wrote:
> > Hi,
> >
> > Andrew Chang wrote:
> > > On cygwin1.3.12-1, I am running a multi-level makefile.
> > > For some reason the top level make seems corrupt the file handle
> > > of the its sub-process. (redirected i/o no longer works in the
> > > sub-process). Note that my top level makefile is a very complex
> > > makefile, it probably works fine if you have a simple makefile.
> > > Fortunately, I stumble across a workaround; It turns out if you spawn
> > > the lower level make via the DOS shell, the problem goes away.
> > >
> > > e.g.
> > >
> > > low_level_target:
> > >         cd sub_dir && cmd /c make low_level_stuff;
> > >
> > > Hope this will save someone sometime...
> >
> > Without further data as to used versions, this will hardly help anyone.
> >  make-3.79.1-7
> > using a "very complex makefile" (whatever that is) on multiple directory
> > levels under bash, and I have no problems...
> > How did you deduce that make is corrupting a file handle?
>
> The low level make runs a configure script, which
> uses a "here document", like so
>
> cat >outfile <<EOF
> stuff
> stuf
> EOF
>
> The outfile is empty after the above command is done.
> (note: the low level make is just compiling the standard gnu "patch"
> source, there is nothing special about this target)
> Unfortunately I have not come up with a minimin test case yet, sorry.
> The dos shell workaround do work, however.


I forgot to add, two more data points
a) If you cd to the low level directory, and run the low level make directly,
   it also works...
b) disabling the default make rule, (i.e make -r), also seems to make a   
   difference.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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