delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/28/05:36:05

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: <16230394.1083144846247.JavaMail.sargon@mac.com>
Date: Wed, 28 Apr 2004 11:34:06 +0200
From: Daniel Clausen <sargon AT mac DOT com>
To: Dave Korn <dk AT artimi DOT com>, cygwin AT cygwin DOT com
Subject: RE: zsh & make
Mime-Version: 1.0
X-IsSubscribed: yes

Hi

On Tuesday, April 27, 2004, at 05:55PM, Dave Korn <dk AT artimi DOT com> wrote:

[snip]

>  For debugging it, you might be able to get something useful like this:
>
>> COMPONENT_NAME = $(shell basename `pwd | tee i-was-here-.txt`)

While trying to change our Makefiles the way you suggested,
I staggered over a bigger problem, which I tried to isolate
and make reproducable.

The problem that occurs is that when reading lines over a pipe
and do something with them, zsh stops after some lines and
just hangs, while bash works w/o any problems.


The following script creates a primitive directory-tree structure
with a Makefile in every directory.

#!/usr/bin/bash
#
# Usage: $0 <prefix> <remaining_depth> <splittingFactor>

if [ $# != 3 ] ;then
   echo "Usage: <prefix> <remaining_depth> <splittingFactor>"
   exit 1
fi

n=0

while [ $n -lt $3 ] ;do
   echo "Creating $1/$n"
   mkdir $1/$n
   echo "Hello" >$1/$n/Makefile
   
   if [ $2 -gt 1 ] ;then
      $0 $1/$n $[$2-1] $3
   fi
   
   n=$[n+1]
done
# END OF SCRIPT


Invoke like this:
mkdir tree
./createTree.sh tree 3 3


Now, I execute this command:

find tree -name Makefile | while read line ;do
echo $line
cp $line $line.1
done



When running this under zsh, it treats between 8 and 20 Makefiles and
then just hangs. (and I have to 'kill -9' the shell) Running it under
bash works just fine. (or try other "4 4" instead of "3 3" when creating
the tree-structure if by chance it treats all 27 Makefiles)


I think this shows the fundamental problem of my make-problems as well.
As long as this doesn't work, I don't even have to bother with make.


Can anyone reproduce this behaviour? I'm using the latest of the greatest
of cygwin on a Win2k machine.

Regards,

Daniel


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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