help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gnu Make 3.79.1 - gives errors while removing files i.e. using make clea


From: Crazy Coder
Subject: Gnu Make 3.79.1 - gives errors while removing files i.e. using make clean
Date: 23 May 2004 02:40:46 -0700

Hi, 

        I'm using the following - Gnu Make 3.79.1, Gnu Bash 2.05b.0 on Red
Hat 8.0
and have a question regarding the Gnu Make.


I have a Makefile with the following lines.
------------------------------------------------------------------------
t1:
        test -e foo1 && rm foo1

and i dont have a file foo1 in my current directory.
when i run make t1 it dies with an error (pls see below.)

My question is why do I get an error when I'm checking to see if the
file foo1
exists first before calling rm ?

Any help is appreciated.

Thanks.

Yashesh Bhatia.

address@hidden

p.s.

address@hidden yvb]$ ls -l /usr/bin/make /usr/bin/gmake
lrwxrwxrwx    1 root     root            4 May  6 00:53 /usr/bin/gmake
-> make
-rwxr-xr-x    1 root     root       144887 Jun 24  2002 /usr/bin/make


------------------------------------------------------------------------

address@hidden tmp]$ uname -a
Linux localhost.localdomain 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002
i686 i686 i386 GNU/Linux

address@hidden tmp]$ bash --version
GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.

address@hidden tmp]$ make --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i386-redhat-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <address@hidden>.



------------------------------------------------------------------------

address@hidden tmp]$ cat Makefile
t1:
        test -e foo1 && rm foo1

address@hidden tmp]$ ls foo1
ls: foo1: No such file or directory

address@hidden tmp]$ make -n t1
test -e foo1 && rm foo1

address@hidden tmp]$ make t1
test -e foo1 && rm foo1
make: *** [t1] Error 1



address@hidden tmp]$ make -d t1
.
.
.
Must remake target `t1'.
test -e foo1 && rm foo1
Putting child 0x080738f0 (t1) PID 8428 on the chain.
Live child 0x080738f0 (t1) PID 8428
Got a SIGCHLD; 1 unreaped children.
Reaping losing child 0x080738f0 PID 8428
make: *** [t1] Error 1
Removing child 0x080738f0 PID 8428  from chain.




------------------------------------------------------------------------

address@hidden tmp]$ cat Makefile
t1:
        test -e foo1 || rm foo1

address@hidden tmp]$ make -n t1
test -e foo1 || rm foo1

address@hidden tmp]$ ls foo1
ls: foo1: No such file or directory

address@hidden tmp]$ make t1
test -e foo1 || rm foo1
rm: cannot lstat `foo1': No such file or directory
make: *** [t1] Error 1


address@hidden tmp]$ make -d t1
.
.
.
Must remake target `t1'.
test -e foo1 || rm foo1
Putting child 0x080738f0 (t1) PID 8430 on the chain.
Live child 0x080738f0 (t1) PID 8430
rm: cannot lstat `foo1': No such file or directory
Got a SIGCHLD; 1 unreaped children.
Reaping losing child 0x080738f0 PID 8430
make: *** [t1] Error 1
Removing child 0x080738f0 PID 8430  from chain.
address@hidden tmp]$


reply via email to

[Prev in Thread] Current Thread [Next in Thread]