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