Date: Tue, 22 Oct 96 15:32:55 BST Message-Id: <9610221432.AA20384@leopard.proteon.com> From: Neil Jarvis To: eliz AT is DOT elta DOT co DOT il Cc: djgpp-workers AT delorie DOT com Subject: Bug in Make 3.75 Reply-To: Neil DOT Jarvis AT proteon DOT com Mime-Version: 1.0 (generated by tm-edit 7.43) Content-Type: text/plain; charset=US-ASCII Eli, There is a bug in the new port of make, version 3.75 (Newly downloaded from ftp.simtel.net). When a rule's actions are being executed, and a particular action returns an errorcode which is ignore (by placing '-' in front of the command), all subsequent actions inherit the bad error code, and the make fails. An example should make it all clear. Below is a short C program, ret_code.c, that returns the error code that is passed as its first parameters. The makefile target 'all' calls this program twice, the first time ignoring an error level 1, and then again with an error level of 0. The 'all' target should exit with a global error level of 0, indicating a pass. **************************************** ret_code.c **************************************** int main(int argc, char **argv) { if (argc == 1) return 0; else return (atoi(argv[1])); } **************************************** makefile **************************************** all: -ret_code 1 ret_code 0 **************************************** Under DJGPP V2.01, make (3.75) generates the following incorrect output: > make ret_code 1 make.exe: [all] Error 1 (ignored) ret_code 0 make.exe: *** [all] Error 1 <<< This is wrong > **************************************** Under SunOS 4.1.3, GNU make (3.74) generates the following correct output: > make ret_code 1 make.exe: [all] Error 1 (ignored) ret_code 0 > **************************************** This bug prevents anyone rebuilding binutils-2.7, using the V2.01 distribution. The libiberty library makefile has a rule that relies on an action generating an error, which is ignored, and the error output is processed to complete the target. This doesn't work.... Hope this can be fixed soon, as I am trying to rebuild a debug version of 'ar.exe' to investigate why it does not work on a networked drive..... Cheers, -- Neil Jarvis, Proteon International R&D, York, UK. (Neil DOT Jarvis AT proteon DOT com)