[Bug c/18035] New: target "gcc-no-fixedincludes" in Makefile doesn't check for proper return value of sub-make

2004-10-16 Thread hugo at hugovil dot com
When I run these commands to install gcc (in a separate build directory):

-
make prefix=/mnt/hvlinux/static install-no-fixedincludes 1> make.log 2>&1
echo "Return value of Make = ${?}"
-

the return value is zero. But if I check the log (make.log), I can see that 
there was an error in one of the sub-make called. The reason is that the shell 
code in the "gcc-no-fixedincludes" target doesn't check if the sub-make return 
value is valid, and continues anyway whatever the return code is. The value 
returned by the sub-make command is 2 in my case. Here is the part of the 
Makefile that causes that:


# Install the gcc headers files, but not the fixed include files,
# which Cygnus is not allowed to distribute.  This rule is very
# dependent on the workings of the gcc Makefile.in.
.PHONY: gcc-no-fixedincludes
gcc-no-fixedincludes:
@if [ -f ./gcc/Makefile ]; then \
  rm -rf gcc/tmp-include; \
  mv gcc/include gcc/tmp-include 2>/dev/null; \
  mkdir gcc/include; \
  cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
  touch gcc/stmp-fixinc gcc/include/fixed; \
  rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
  r=`${PWD_COMMAND}`; export r; \
  s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
  $(SET_LIB_PATH) \
  (cd ./gcc && \
   $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
  echo "return-code-test: error=$${?}"; \
  rm -rf gcc/include; \
  mv gcc/tmp-include gcc/include 2>/dev/null; \
else true; fi


-- 
   Summary: target "gcc-no-fixedincludes" in Makefile doesn't check
for proper return value of sub-make
   Product: gcc
   Version: 3.4.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: c
    AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hugo at hugovil dot com
CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: 3.4.2
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18035


[Bug c/18035] target "gcc-no-fixedincludes" in Makefile doesn't check for proper return value of sub-make

2004-10-16 Thread hugo at hugovil dot com

--- Additional Comments From hugo at hugovil dot com  2004-10-16 16:20 ---
Created an attachment (id=7364)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7364&action=view)
Output of make with the failure in a sub-make not handled correctly


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18035


[Bug bootstrap/18035] target "gcc-no-fixedincludes" in Makefile doesn't check for proper return value of sub-make

2004-10-16 Thread hugo at hugovil dot com

--- Additional Comments From hugo at hugovil dot com  2004-10-16 18:00 ---
This happens after I have successfully configured and built gcc. But the reason 
why the error happens is not important for me right now. My concern is that an 
error occured during gcc installation, but the make return code doesn't reflect 
that error. And by looking at the gcc-no-fixedincludes target, you will see that 
the error code returned by "$(MAKE) $(GCC_FLAGS_TO_PASS) install" is never 
verified for validity.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18035


[Bug bootstrap/18035] target "gcc-no-fixedincludes" in Makefile doesn't check for proper return value of sub-make

2004-10-21 Thread hugo at hugovil dot com

--- Additional Comments From hugo at hugovil dot com  2004-10-22 02:58 ---
I found the cause for the error, but there is still a problem with the GCC build 
system.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18035