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]
Other format: [Raw text]

mkconfig.sh: Portability fix


For the past month or so, make restrap has been randomly broken under cygwin.

I have traced it to tm.h and tconfig.h not always getting rebuilt correctly, though I really have no idea why it didn't work with make restrap, but was fine with a clean make bootstrap. Maybe it is just a sh bug under cygwin, nevertheless this patch fixes it and actually is a bit more readable, IMO.

OK?

Kelley Cook
2003-11-12  Kelley Cook  <kcook@gcc.gnu.org>

	* mkconfig.sh:  Rewrite case/esac as if/fi.

*** gcc-orig/gcc/mkconfig.sh	Sat Jun 21 01:20:05 2003
--- gcc-snapshot/gcc/mkconfig.sh	Wed Nov 12 12:57:00 2003
***************
*** 77,97 ****
  # defined but neither GENERATOR_FILE nor USED_FOR_TARGET is defined.
  # (Much of this is temporary.)
  
! case $output in
!     tconfig.h )
! 	cat >> ${output}T <<EOF
! #define USED_FOR_TARGET
! EOF
!     ;;
!     tm.h )
!         cat >> ${output}T <<EOF
! #if defined IN_GCC && !defined GENERATOR_FILE && !defined USED_FOR_TARGET
! # include "insn-constants.h"
! # include "insn-flags.h"
! #endif
! EOF
!     ;;
! esac
  
  # Add multiple inclusion protection guard, part two.
  echo "#endif /* ${header_guard} */" >> ${output}T
--- 77,91 ----
  # defined but neither GENERATOR_FILE nor USED_FOR_TARGET is defined.
  # (Much of this is temporary.)
  
! if [ "X$output" = "Xtconfig.h" ]; then 
!   echo '#define USED_FOR_TARGET' >> ${output}T
! fi
! if [ "X$output" = "Xtm.h" ]; then 
!   echo '#if defined IN_GCC && !defined GENERATOR_FILE && !defined USED_FOR_TARGET' >> ${output}T
!   echo '# include "insn-constants.h"' >> ${output}T
!   echo '# include "insn-flags.h"' >> ${output}T
!   echo '#endif' >> ${output}T
! fi
  
  # Add multiple inclusion protection guard, part two.
  echo "#endif /* ${header_guard} */" >> ${output}T

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