Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 41870 invoked from network); 18 Oct 2006 22:00:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Oct 2006 22:00:37 -0000 Received: (qmail 41255 invoked by uid 500); 18 Oct 2006 22:00:37 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 41195 invoked by uid 500); 18 Oct 2006 22:00:37 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 41184 invoked by uid 99); 18 Oct 2006 22:00:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 15:00:37 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 15:00:35 -0700 Received: from qxvcexch01.ad.quovadx.com (qxvcexch01.ad.quovadx.com [192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.6) with ESMTP id k9ILxaeq031747 for ; Wed, 18 Oct 2006 21:59:36 GMT Received: from [10.151.18.27] ([10.70.10.34]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 18 Oct 2006 16:00:15 -0600 Message-ID: <4536A3AE.2080102@roguewave.com> Date: Wed, 18 Oct 2006 15:59:10 -0600 From: Martin Sebor User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: svn commit: r463535 - in /incubator/stdcxx/trunk: etc/config/makefile.common etc/config/makefile.rules util/cmdopt.cpp util/display.cpp util/output.cpp util/runall.cpp util/target.h References: <20061013004936.5235E1A981A@eris.apache.org> <45300BE8.6010403@roguewave.com> <4530172B.9020801@roguewave.com> <453691F5.4050405@roguewave.com> In-Reply-To: <453691F5.4050405@roguewave.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Oct 2006 22:00:15.0424 (UTC) FILETIME=[CAC73400:01C6F300] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Andrew Black wrote: [...] > I believe the attached patch might be an option that doesn't rely on > bash, though it has a slight inelegant feel to it. In particular, the > part reading '(echo $$cache > /dev/null)' is a hack to keep bash from > losing the cache variable in the pipeline (perhaps 'export cache' should > be used instead?). I'm not sure I understand what this does. The pipe takes the stdout of the echo $cache >/dev/null command, not that of the prior command. Doesn't that lose the output of the compiler? Martin > 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 $@.log, 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 $@.log; (exit $$cache) > +else > + TEEOPTS = 2>&1 ; cache=$$?; (echo $$cache > /dev/null) | tee $@.log | 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