Mail Archives: cygwin/2004/04/28/05:36:05
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 -