I have tested this change on Linux, Solaris and HPUX, and it appears
to behave correctly on all three.
--Andrew Black
Log:
* makefile.common (TEEOPTS): Always tee output to [EMAIL PROTECTED], prevent
setting of LOGFILE from breaking result capturing. (Reimplementation
of rev 463535, reverted in rev 463850 due to loss of return code from
compile/link commands)
* makefile.rules (%.o: %(AS_EXT), %.o: %.cpp, %: %.o, %: %.cpp):
Add $(TEEOPTS) to compile/link line so that output is routed to log
files. (Reverts rev 463850, which reverted rev 463535)
------------------------------------------------------------------------
Index: etc/config/makefile.common
===================================================================
--- etc/config/makefile.common (revision 464511)
+++ etc/config/makefile.common (working copy)
@@ -141,10 +141,13 @@
# file to write log of the build to
LOGFILE = /dev/null
-# if LOGFILE is being created, tee command output into it
+# if LOGFILE is not being created, tee command output into target.log
+# otherwise, tee command output into both target.log and LOGFILE.
# IMPORTANT: $(TEEOPTS) must be last on the command line
-ifneq ($(LOGFILE),/dev/null)
- TEEOPTS = 2>&1 | tee -a $(LOGFILE)
+ifeq ($(LOGFILE),/dev/null)
+ TEEOPTS = 2>&1 ; cache=$$?; (echo $$cache > /dev/null) | tee
[EMAIL PROTECTED]; (exit $$cache)
+else
+ TEEOPTS = 2>&1 ; cache=$$?; (echo $$cache > /dev/null) | tee [EMAIL PROTECTED]
| tee -a $(LOGFILE); (exit $$cache)
endif
# determine the name of the results file against which to compute
regressions
Index: etc/config/makefile.rules
===================================================================
--- etc/config/makefile.rules (revision 464511)
+++ etc/config/makefile.rules (working copy)
@@ -60,16 +60,16 @@
ifneq ($(AS_EXT),".")
%.o: %$(AS_EXT)
- $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< $(TEEOPTS)
endif # ifneq ($(AS_EXT),".")
endif # ifneq ($(AS_EXT),)
%.o: %.cpp
- $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< $(TEEOPTS)
%: %.o
- $(LD) $< -o $@ $(LDFLAGS) $(LDLIBS)
+ $(LD) $< -o $@ $(LDFLAGS) $(LDLIBS) $(TEEOPTS)
# disable compilation and linking in the same step
# %: %.cpp
@@ -78,7 +78,7 @@
# compile and link in one step to eliminate the space overhead of .o
files
%: %.cpp
- $(CXX) $< -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(LDLIBS)
+ $(CXX) $< -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(LDLIBS)
$(TEEOPTS)
endif # eq ($(NO_DOT_O),)
Index: etc/config/src/libc_decl.sh
===================================================================
--- etc/config/src/libc_decl.sh (revision 464511)
+++ etc/config/src/libc_decl.sh (working copy)
@@ -275,7 +275,7 @@
continue
fi
- if [ "$hdr_base" == math ] ; then
+ if [ "$hdr_base" = "math" ] ; then
lib=m
else
lib=c