mkconfig.sh: Portability fix
Christopher Faylor
cgf@redhat.com
Wed Nov 12 23:26:00 GMT 2003
On Wed, Nov 12, 2003 at 01:17:14PM -0500, Kelley Cook wrote:
>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?
I sure would like to know why this is borken under cygwin. It seems
like a fairly simple construct which should work fine, AFAICT.
cgf
>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
More information about the Gcc-patches
mailing list