Re: [PATCH 4/4] catch syscall -- try 4 -- Build system, testcase and documentation

Daniel Jacobowitz
2009-02-01T19:50:16Z

On Sun, Jan 25, 2009 at 10:30:36PM -0200, SÃ©rgio Durigan JÃºnior wrote:
> -HFILES_NO_SRCDIR = osf-share/cma_debug_client.h \
> +HFILES_NO_SRCDIR = osf-share/cma_debug_client.h linux-tdep.h \

Space there, not tab please.

> @@ -844,11 +857,38 @@ generated_files = config.h observer.h observer.inc ada-lex.c \
> $(COMPILE) $<
> $(POSTCOMPILE)
>
> -all: gdb$(EXEEXT) $(CONFIG_ALL)
> +all: gdb$(EXEEXT) $(CONFIG_ALL) xml-syscall-copy
> @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
> .PHONY: all-tui
> all-tui: $(TUI)$(EXEEXT)
>
> +xml-syscall-copy:
> + if [ "`cd $(srcdir) && pwd`" != "`pwd`" ] ; then \
> + mkdir -p ./$(XML_SYSCALLS_DIR) ; \
> + list='$(XML_SYSCALLS_FILES)' ; \
> + for file in $$list ; do \
> + f=$(srcdir)/$(XML_SYSCALLS_DIR)/$$file ; \
> + if test -f $$f ; then \
> + $(INSTALL_DATA) $$f \
> + ./$(XML_SYSCALLS_DIR) ; \
> + fi ; \
> + done ; \
> + fi ;

Why is this necessary? Is it for running GDB from the build
directory? If that's it, please add a comment.

Also, this and xml-syscall-install need a ".PHONY:" since they are not
the names of real files.

> +# Until "catch syscall" is implemented on other targets...
> +if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
> + continue
> +}
> +
> +# This shall be updated whenever 'catch syscall' is implemented
> +# on some architecture.
> +#if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"]
> +if { ![istarget "i\[34567\]86-*-linux*"]
> + && ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"] } {
> + continue
> +}

Or you can test at runtime: if it prints out "not supported on this
target yet" then issue an UNSUPPORTED and skip the rest of the test.

--
Daniel Jacobowitz
CodeSourcery