help-make
[Top][All Lists]
Advanced

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

gmake keeps going when it shouldn't?


From: Stephen O'Loughlin
Subject: gmake keeps going when it shouldn't?
Date: Thu, 13 Aug 2009 10:55:24 +0200

Say I have a makefile with the following...

file4.txt: file3.txt
        xterm -e "sleep 4 ; touch file4.txt"

file1.txt:
        xterm -e "sleep 4 ; touch file1.txt"

file2.txt: file1.txt
        xterm -e "sleep 4 ; touch file2.txt"

file3.txt: file2.txt
        xterm -e "sleep 4 ; touch file3.txt"


This makefile creates four files file[1-4].txt by launching an xterm,
waiting for 4 seconds, and then touching the appropriate file.  Now if
I close one of the xterms during the waiting period, the touch command
doesn't get executed and the file isn't created, so you'd expect that
make would stop.  However it doesn't stop and keeps building the
remaining targets.  So if for example I killed the xterm that was
supposed to build file2.txt.  I would end up with file1.txt, file3.txt
and file4.txt, which isn't what I would expect or what I want.

Any ideas?

Thanks.




reply via email to

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