If generating a .err file fails, remove it.

This commit is contained in:
Ian Lance Taylor 2007-11-14 18:37:00 +00:00
parent a18f2bd699
commit eb01e199fd
2 changed files with 4 additions and 0 deletions

View file

@ -134,6 +134,7 @@ debug_msg.err: debug_msg.o odr_violation1.o odr_violation2.o gcctestdir/ld
@if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o 2>$@; \ @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o 2>$@; \
then \ then \
echo 1>&2 "Link of debug_msg.o should have failed"; \ echo 1>&2 "Link of debug_msg.o should have failed"; \
rm -f $@; \
exit 1; \ exit 1; \
fi fi
@ -146,6 +147,7 @@ undef_symbol.err: undef_symbol_main.o undef_symbol.so gcctestdir/ld
@if $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so 2>$@; \ @if $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so 2>$@; \
then \ then \
echo 1>&2 "Link of undef_symbol_test should have failed"; \ echo 1>&2 "Link of undef_symbol_test should have failed"; \
rm -f $@; \
exit 1; \ exit 1; \
fi fi

View file

@ -1220,6 +1220,7 @@ uninstall-am: uninstall-info-am
@GCC_TRUE@@NATIVE_LINKER_TRUE@ @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o 2>$@; \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o 2>$@; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ then \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ then \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ echo 1>&2 "Link of debug_msg.o should have failed"; \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ echo 1>&2 "Link of debug_msg.o should have failed"; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ rm -f $@; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exit 1; \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exit 1; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ fi @GCC_TRUE@@NATIVE_LINKER_TRUE@ fi
@ -1232,6 +1233,7 @@ uninstall-am: uninstall-info-am
@GCC_TRUE@@NATIVE_LINKER_TRUE@ @if $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so 2>$@; \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ @if $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so 2>$@; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ then \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ then \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ echo 1>&2 "Link of undef_symbol_test should have failed"; \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ echo 1>&2 "Link of undef_symbol_test should have failed"; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ rm -f $@; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exit 1; \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exit 1; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ fi @GCC_TRUE@@NATIVE_LINKER_TRUE@ fi