This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: Don't have gcc_build write a logfile



There's no reason to have gcc_build write out a logfile -- users can
do this with the usual shell redirection operators.  And the use of
`tee' screws up error-handling throughout the script.  What was I
thinking?

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2000-11-21  Mark Mitchell  <mark@codesourcery.com>

	* gcc_build: Remove code to put information in a log file.

Index: gcc_build
===================================================================
RCS file: /cvs/gcc/egcs/contrib/gcc_build,v
retrieving revision 1.8
diff -c -p -r1.8 gcc_build
*** gcc_build	2000/11/12 00:29:37	1.8
--- gcc_build	2000/11/21 19:15:59
*************** update_gcc() {
*** 127,133 ****
      changedir ${DESTINATION}
  
      # Update the tree
!     (./contrib/gcc_update | tee -a ${LOGFILE}) || \
  	error "Could not update GCC"
  }
  
--- 127,133 ----
      changedir ${DESTINATION}
  
      # Update the tree
!     ./contrib/gcc_update || \
  	error "Could not update GCC"
  }
  
*************** configure_gcc() {
*** 146,153 ****
      changedir ${OBJDIR}
  
      # Configure the tree.
!     (eval ${DESTINATION}/configure ${CONFIGURE_OPTIONS} 2>&1 | 
!         tee -a ${LOGFILE}) || \
  	error "Could not configure the compiler"
  }
  
--- 146,152 ----
      changedir ${OBJDIR}
  
      # Configure the tree.
!     eval ${DESTINATION}/configure ${CONFIGURE_OPTIONS} || \
  	error "Could not configure the compiler"
  }
  
*************** bootstrap_gcc() {
*** 160,167 ****
      changedir ${OBJDIR}
  
      # Bootstrap the compiler
!     (eval ${MAKE} ${MAKE_BOOTSTRAP_OPTIONS} bootstrap 2>&1 |
! 	tee -a ${LOGFILE}) || \
  	error "Could not bootstrap the compiler"
  }
  
--- 159,165 ----
      changedir ${OBJDIR}
  
      # Bootstrap the compiler
!     eval ${MAKE} ${MAKE_BOOTSTRAP_OPTIONS} bootstrap || \
  	error "Could not bootstrap the compiler"
  }
  
*************** test_gcc() {
*** 174,181 ****
      changedir ${OBJDIR}
  
      echo "Running tests...  This will take a while."
!     (${MAKE} -k check 2>&1 | tee -a ${LOGFILE})
!     (${DESTINATION}/contrib/test_summary | tee -a ${LOGFILE})
  }
  
  # Export the GCC source tree.
--- 172,179 ----
      changedir ${OBJDIR}
  
      echo "Running tests...  This will take a while."
!     ${MAKE} -k check
!     ${DESTINATION}/contrib/test_summary
  }
  
  # Export the GCC source tree.
*************** install_gcc() {
*** 202,209 ****
      # Go to the object directory.
      changedir ${OBJDIR}
  
!     (${MAKE} install 2>&1 | tee -a ${LOGFILE}) || \
! 	error "Installation failed"
  }
  
  ########################################################################
--- 200,206 ----
      # Go to the object directory.
      changedir ${OBJDIR}
  
!     ${MAKE} install || error "Installation failed"
  }
  
  ########################################################################
*************** DESTINATION="${HOME}/dev/gcc"
*** 225,232 ****
  # object directory.
  OBJDIR="objdir"
  
- # The file where information will be logged.
- LOGFILE=${HOME}/build-gcc.$$.log
  # The file where the tarred up sources will be placed.
  TARFILE="${HOME}/dev/gcc.tgz"
  
--- 222,227 ----
*************** done
*** 285,295 ****
  if [ ${CHECKOUT} -ne 0 ] && [ ${UPDATE} -ne 0 ]; then
      error "Cannot checkout and update simultaneously"
  fi
- 
- # Remove any old logfiles.
- rm -f ${LOGFILE}
- # Tell the user where to find the logfile.
- echo "gcc_build: The logfile for this run is ${LOGFILE}"
  
  # Checkout the tree.
  if [ ${CHECKOUT} -ne 0 ]; then
--- 280,285 ----

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]