[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make -k returns zero exit status even for included Makefile failures
From: |
Bob Byrnes |
Subject: |
make -k returns zero exit status even for included Makefile failures |
Date: |
Sun, 1 Feb 2004 22:42:37 -0500 |
Consider the following ...
----------------------------------------
shell> uname -a
Linux wildcard.curl.com 2.4.20-18.9 #1 Thu May 29 07:08:16 EDT 2003 i686 i686
i386 GNU/Linux
shell> make --version
GNU Make 3.80
Copyright (C) 2002 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.
shell> cat Makefile
all:
nonexistent: /no-such-file
false
include nonexistent
----------------------------------------
If I run GNU make without any options, it fails and returns a nonzero
exit status:
----------------------------------------
shell> make ; echo "make exit status = $?"
Makefile:13: nonexistent: No such file or directory
make: *** No rule to make target `/no-such-file', needed by `nonexistent'.
Stop.
make exit status = 2
----------------------------------------
I think this behavior is correct.
However, if I use make -k, it returns a zero exit status:
----------------------------------------
shell> make -k ; echo "make exit status = $?"
Makefile:13: nonexistent: No such file or directory
make: *** No rule to make target `/no-such-file', needed by `nonexistent'.
make: Failed to remake makefile `nonexistent'.
make: Nothing to be done for `all'.
make exit status = 0
----------------------------------------
This seems like a bug. IMO, make -k should only allow extra work to be
done, but should never alter the exit status, and it seems wrong for the
last example to have apparently "succeeded."
--
Bob Byrnes e-mail: address@hidden
Curl Corporation phone: 617-761-1238
1 Cambridge Center, 10th Floor fax: 617-761-1201
Cambridge, MA 02142-1612
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- make -k returns zero exit status even for included Makefile failures,
Bob Byrnes <=