]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/Makefile.in
Fix powerpc-power8.exp test with new mnemonics
[thirdparty/binutils-gdb.git] / gdb / testsuite / Makefile.in
index 8d46fe15be4128af4cb7bd260c3563b7b11737f6..2c0482cef1b09a5aef6bf35604e17f9a5a994249 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile for regression testing the GNU debugger.
-# Copyright 1992-2019 Free Software Foundation, Inc.
+# Copyright 1992-2021 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
@@ -28,14 +28,13 @@ program_transform_name = @program_transform_name@
 build_canonical = @build@
 host_canonical = @host@
 target_canonical = @target@
+enable_libctf = @enable_libctf@
 
 SHELL = @SHELL@
 EXEEXT = @EXEEXT@
 SUBDIRS = @subdirs@
 RPATH_ENVVAR = @RPATH_ENVVAR@
 
-EXTRA_RULES = @EXTRA_RULES@
-
 CC=@CC@
 
 EXPECT = `if [ "$${READ1}" != "" ] ; then \
@@ -52,6 +51,7 @@ RUNTESTFLAGS =
 
 FORCE_PARALLEL =
 
+GDB_DEBUG =
 GDBSERVER_DEBUG =
 
 # Default number of iterations that we will use to run the testsuite
@@ -95,8 +95,8 @@ TARGET_FLAGS_TO_PASS = \
         "RUNTEST=$(RUNTEST)" \
         "RUNTESTFLAGS=$(RUNTESTFLAGS)"
 
-all: $(EXTRA_RULES)
-       @echo "Nothing to be done for all..."
+all:
+       @:
 
 .NOEXPORT:
 INFODIRS=doc
@@ -116,26 +116,27 @@ uninstall: force
 # Bare `site.exp' is used as a target here if user requests it explicitly.
 # $(RUNTEST) is looking up `site.exp' only in the current directory.
 
-$(abs_builddir)/site.exp site.exp: ./config.status Makefile
-       @echo "Making a new config file..."
-       -@rm -f ./tmp?
-       @touch site.exp
-       -@mv site.exp site.bak
-       @echo "## these variables are automatically generated by make ##" > ./tmp0
-       @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
-       @echo "# add them to the last section" >> ./tmp0
-       @echo "set host_triplet ${host_canonical}" >> ./tmp0
-       @echo "set target_alias $(target_alias)" >> ./tmp0
-       @echo "set target_triplet ${target_canonical}" >> ./tmp0
-       @echo "set build_triplet ${build_canonical}" >> ./tmp0
-       @echo "set srcdir ${abs_srcdir}" >> ./tmp0
-       @echo "set tool gdb" >> ./tmp0
-       @echo 'source $${srcdir}/lib/append_gdb_boards_dir.exp' >> ./tmp0
-       @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
-               @cat ./tmp0 > site.exp
-       @cat site.bak | sed \
-                       -e '1,/^## All variables above are.*##/ d' >> site.exp
-       -@rm -f ./tmp?
+$(abs_builddir)/site.exp site.exp: Makefile
+       $(ECHO_GEN) \
+       rm -f ./tmp?; \
+       touch site.exp; \
+       mv site.exp site.bak; \
+       echo "## these variables are automatically generated by make ##" > ./tmp0; \
+       echo "# Do not edit here. If you wish to override these values" >> ./tmp0; \
+       echo "# add them to the last section" >> ./tmp0; \
+       echo "set host_triplet ${host_canonical}" >> ./tmp0; \
+       echo "set target_alias $(target_alias)" >> ./tmp0; \
+       echo "set target_triplet ${target_canonical}" >> ./tmp0; \
+       echo "set build_triplet ${build_canonical}" >> ./tmp0; \
+       echo "set srcdir ${abs_srcdir}" >> ./tmp0; \
+       echo "set tool gdb" >> ./tmp0; \
+       echo "set enable_libctf ${enable_libctf}" >> ./tmp0; \
+       echo 'source $${srcdir}/lib/append_gdb_boards_dir.exp' >> ./tmp0; \
+       echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0; \
+       cat ./tmp0 > site.exp; \
+       cat site.bak | sed \
+                       -e '1,/^## All variables above are.*##/ d' >> site.exp; \
+       rm -f ./tmp?
 
 installcheck:
 
@@ -157,22 +158,24 @@ CHECK_TARGET = $(if $(RACY_ITER),$(addsuffix -racy,$(CHECK_TARGET_TMP)),$(CHECK_
 check: all $(abs_builddir)/site.exp
        $(MAKE) $(CHECK_TARGET)
 
-check-read1:
+check-read1: read1.so expect-read1
        $(MAKE) READ1="1" check
 
 # Check whether we need to print the timestamp for each line of
 # status.
 TIMESTAMP = $(if $(TS),| $(srcdir)/print-ts.py $(if $(TS_FORMAT),$(TS_FORMAT),),)
 
+gdb_debug = $(if $(GDB_DEBUG),GDB_DEBUG=$(GDB_DEBUG) ; export GDB_DEBUG ;,)
 gdbserver_debug = $(if $(GDBSERVER_DEBUG),GDBSERVER_DEBUG=$(GDBSERVER_DEBUG) ; export GDBSERVER_DEBUG ;,)
 
+
 # All the hair to invoke dejagnu.  A given invocation can just append
 # $(RUNTESTFLAGS)
 DO_RUNTEST = \
        rootme=`pwd`; export rootme; \
        srcdir=${srcdir} ; export srcdir ; \
        EXPECT=${EXPECT} ; export EXPECT ; \
-       EXEEXT=${EXEEXT} ; export EXEEXT ; $(gdbserver_debug) \
+       EXEEXT=${EXEEXT} ; export EXEEXT ;  $(gdb_debug) $(gdbserver_debug) \
         $(RPATH_ENVVAR)=$$rootme/../../expect:$$rootme/../../libstdc++:$$rootme/../../tk/unix:$$rootme/../../tcl/unix:$$rootme/../../bfd:$$rootme/../../opcodes:$$$(RPATH_ENVVAR); \
        export $(RPATH_ENVVAR); \
        if [ -f $${rootme}/../../expect/expect ] ; then  \
@@ -206,7 +209,7 @@ check-single-racy:
        -rm -rf cache racy_outputs temp
        mkdir -p racy_outputs; \
        racyiter="$(RACY_ITER)"; \
-       test "x$$racyiter" == "x" && \
+       test "x$$racyiter" = "x" && \
          racyiter=$(DEFAULT_RACY_ITER); \
        if test $$racyiter -lt 2 ; then \
          echo "RACY_ITER must be at least 2."; \
@@ -236,7 +239,7 @@ check-parallel:
 check-parallel-racy:
        -rm -rf cache racy_outputs temp
        racyiter="$(RACY_ITER)"; \
-       test "x$$racyiter" == "x" && \
+       test "x$$racyiter" = "x" && \
          racyiter=$(DEFAULT_RACY_ITER); \
        if test $$racyiter -lt 2 ; then \
          echo "RACY_ITER must be at least 2."; \
@@ -345,14 +348,14 @@ clean mostlyclean:
 
 distclean maintainer-clean realclean: clean
        -rm -f *~ core
-       -rm -f Makefile config.status *-init.exp
+       -rm -f Makefile *-init.exp
        -rm -fr *.log summary detail *.plog *.sum *.psum site.*
 
-Makefile : Makefile.in config.status $(host_makefile_frag)
-       $(SHELL) config.status
+Makefile : Makefile.in ../config.status $(host_makefile_frag)
+       cd .. && $(SHELL) ./config.status testsuite/Makefile
 
-config.status: configure
-       $(SHELL) config.status --recheck
+lib/pdtrace: pdtrace.in ../config.status
+       cd .. && $(SHELL) ./config.status testsuite/lib/pdtrace
 
 TAGS: force
        find $(srcdir) -name '*.exp' -print | \
@@ -362,23 +365,23 @@ TAGS: force
 
 # Build the expect wrapper script that preloads the read1.so library.
 expect-read1:
-       @echo Making expect-read1
-       @rm -f expect-read1-tmp
-       @touch expect-read1-tmp
-       @echo "# THIS FILE IS GENERATED -*- buffer-read-only: t -*- \n" >>expect-read1-tmp
-       @echo "# vi:set ro: */\n\n" >>expect-read1-tmp
-       @echo "# To regenerate this file, run:\n" >>expect-read1-tmp
-       @echo "#      make clean; make/\n" >>expect-read1-tmp
-       @echo "export LD_PRELOAD=`pwd`/read1.so" >>expect-read1-tmp
-       @echo 'exec expect "$$@"' >>expect-read1-tmp
-       @chmod +x expect-read1-tmp
-       @mv expect-read1-tmp expect-read1
+       $(ECHO_GEN) \
+       rm -f expect-read1-tmp; \
+       touch expect-read1-tmp; \
+       echo "# THIS FILE IS GENERATED -*- buffer-read-only: t -*- \n" >>expect-read1-tmp; \
+       echo "# vi:set ro: */\n\n" >>expect-read1-tmp; \
+       echo "# To regenerate this file, run:\n" >>expect-read1-tmp; \
+       echo "#      make clean; make/\n" >>expect-read1-tmp; \
+       echo "export LD_PRELOAD=`pwd`/read1.so" >>expect-read1-tmp; \
+       echo 'exec expect "$$@"' >>expect-read1-tmp; \
+       chmod +x expect-read1-tmp; \
+       mv expect-read1-tmp expect-read1
 
 # Build the read1.so preload library.  This overrides the `read'
 # function, making it read one byte at a time.  Running the testsuite
 # with this catches racy tests.
 read1.so: lib/read1.c
-       $(CC) -o $@ ${srcdir}/lib/read1.c -Wall -g -shared -fPIC $(CFLAGS)
+       $(ECHO_CC) $(CC) -o $@ ${srcdir}/lib/read1.c -Wall -g -shared -fPIC $(CFLAGS)
 
 # Build the read1 machinery.
 .PHONY: read1
@@ -386,3 +389,4 @@ read1: read1.so expect-read1
 
 # Disable implicit make rules.
 include $(srcdir)/../disable-implicit-rules.mk
+include $(srcdir)/../silent-rules.mk