[PATCH] Get rid of configure scripts in testsuite subdirectories

Mark Kettenis kettenis@chello.nl
Sat Jan 4 15:38:00 GMT 2003


Whoo, this appears to speed up the configure process considerably.
Thanks Daniel for the suggestion.  We still have configure scripts in
the subdirectories that are only included conditionally.  Getting rid
of those is a bit more complicated, and perhaps not worth the trouble.
The testsuite runs as before on my i386-unknown-freebsd4.7 system.

Committed.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* configure.in: Call AC_CONFIG_HEADER.  Don't call
	AC_CONFIG_SUBDIRS on gdb.arch, gdb.asm, gdb.base gdb.c++ gdb.java,
	gdb.disasm, gdb.mi, gdb.threads and gdb.trace.  Call
	AC_CHECK_HEADERS on pthread.h.  Put Makefiles in the
	aforementioned directories in the AC_OUPUT call.
	* config.hin: New file.
	* gdb.mi/gdb669.exp, gdb.mi/mi-pthreads.exp,
	gdb.mi/mi1-pthreads.exp, gdb.threads/gcore-thread.exp,
	gdb.threads/killed.exp, gdb.threads/print-threads.exp,
	gdb.threads/pthreads.exp, gdb.threads/schedlock.exp: Make sure we
	pass -I$objdir instead of -I$objdir/$subdir in compilation.
	* gdb.arch/configure.in, gdb.arch/configure, gdb.asm/configure.in,
	gdb.asm/configure, gdb.base/configure.in, gdb.base/configure,
	gdb.c++/configure.in, gdb.c++/configure, gdb.disasm/configure.in,
	gdb.disasm/configure, gdb.java/configure.in, gdb.java/configure,
	gdb.mi/configure.in, gdb.mi/configure, gdb.mi/config.in,
	gdb.threads/configure.in, gdb.threads/configure,
	gdb.threads/config.in, gdb.trace/configure.in,
	gdb.trace/configure: Removed.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/configure.in,v
retrieving revision 1.7
diff -u -p -r1.7 configure.in
--- configure.in 4 Jan 2003 00:43:24 -0000 1.7
+++ configure.in 4 Jan 2003 15:26:27 -0000
@@ -21,14 +21,13 @@
 
 AC_PREREQ(2.13)
 AC_INIT(gdb.base)
+AC_CONFIG_HEADER(config.h:config.hin)
 
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
 
-# Directories to use in all configurations.
-AC_CONFIG_SUBDIRS(gdb.arch gdb.asm gdb.base gdb.c++ gdb.java gdb.disasm)
-AC_CONFIG_SUBDIRS(gdb.mi gdb.threads gdb.trace)
+# Directories that need to be configured in all configurations.
 configdirs=
 
 # Add HP-specific tests when appropriate.
@@ -109,7 +108,11 @@ else
 fi
 AC_SUBST(RPATH_ENVVAR)
 
+AC_CHECK_HEADERS(pthread.h)
+
 AC_EXEEXT
 
 AC_CONFIG_SUBDIRS($configdirs)
-AC_OUTPUT(Makefile)
+AC_OUTPUT([Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
+  gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
+  gdb.threads/Makefile gdb.trace/Makefile])
Index: gdb.mi/gdb669.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb669.exp,v
retrieving revision 1.2
diff -u -p -r1.2 gdb669.exp
--- gdb.mi/gdb669.exp 25 Sep 2002 16:08:43 -0000 1.2
+++ gdb.mi/gdb669.exp 4 Jan 2003 15:26:27 -0000
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -178,7 +178,7 @@ set testfile "pthreads"
 set srcfile "$testfile.c"
 set binfile "$objdir/$subdir/$testfile"
 
-set options [list debug incdir=$subdir]
+set options [list debug incdir=$objdir]
 if  {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options]
      != "" } {
   gdb_suppress_entire_file \
Index: gdb.mi/mi-pthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-pthreads.exp,v
retrieving revision 1.3
diff -u -p -r1.3 mi-pthreads.exp
--- gdb.mi/mi-pthreads.exp 25 Sep 2002 16:08:43 -0000 1.3
+++ gdb.mi/mi-pthreads.exp 4 Jan 2003 15:26:27 -0000
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -204,7 +204,7 @@ set testfile "pthreads"
 set srcfile "$testfile.c"
 set binfile "$objdir/$subdir/$testfile"
 
-set options [list debug incdir=$subdir]
+set options [list debug incdir=$objdir]
 if  {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options]
      != "" } {
   gdb_suppress_entire_file \
Index: gdb.mi/mi1-pthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi1-pthreads.exp,v
retrieving revision 1.1
diff -u -p -r1.1 mi1-pthreads.exp
--- gdb.mi/mi1-pthreads.exp 1 Oct 2002 16:01:37 -0000 1.1
+++ gdb.mi/mi1-pthreads.exp 4 Jan 2003 15:26:27 -0000
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -204,7 +204,7 @@ set testfile "pthreads"
 set srcfile "$testfile.c"
 set binfile "$objdir/$subdir/$testfile"
 
-set options [list debug incdir=$subdir]
+set options [list debug incdir=$objdir]
 if  {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options]
      != "" } {
   gdb_suppress_entire_file \
Index: gdb.threads/gcore-thread.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/gcore-thread.exp,v
retrieving revision 1.1
diff -u -p -r1.1 gcore-thread.exp
--- gdb.threads/gcore-thread.exp 9 Jan 2002 00:37:41 -0000 1.1
+++ gdb.threads/gcore-thread.exp 4 Jan 2003 15:26:27 -0000
@@ -41,7 +41,7 @@ if [istarget "*-*-linux"] then {
 set why_msg "unrecognized error"
 foreach lib {-lpthreads -lpthread -lthread} {
     set options "debug"
-    lappend options "incdir=${objdir}/${subdir}"
+    lappend options "incdir=${objdir}"
     lappend options "libs=$lib"
     set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
     switch -regexp -- $ccout {
Index: gdb.threads/killed.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/killed.exp,v
retrieving revision 1.2
diff -u -p -r1.2 killed.exp
--- gdb.threads/killed.exp 5 Sep 2002 19:45:11 -0000 1.2
+++ gdb.threads/killed.exp 4 Jan 2003 15:26:27 -0000
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -66,7 +66,7 @@ set testfile "killed"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}/${subdir}"]] != "" } {
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
 
Index: gdb.threads/print-threads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/print-threads.exp,v
retrieving revision 1.1
diff -u -p -r1.1 print-threads.exp
--- gdb.threads/print-threads.exp 23 Aug 2002 20:32:02 -0000 1.1
+++ gdb.threads/print-threads.exp 4 Jan 2003 15:26:27 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2002, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ if [istarget "*-*-linux*"] then {
 set why_msg "unrecognized error"
 foreach lib $possible_libs {
     set options "debug"
-    lappend options "incdir=${objdir}/${subdir}"
+    lappend options "incdir=${objdir}"
     lappend options "libs=$lib"
     set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
     switch -regexp -- $ccout {
Index: gdb.threads/pthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/pthreads.exp,v
retrieving revision 1.8
diff -u -p -r1.8 pthreads.exp
--- gdb.threads/pthreads.exp 29 Aug 2002 22:36:52 -0000 1.8
+++ gdb.threads/pthreads.exp 4 Jan 2003 15:26:27 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ if [istarget "*-*-linux"] then {
     set target_cflags ""
 }
 
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}/${subdir}"]] != "" } {
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
 
Index: gdb.threads/schedlock.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/schedlock.exp,v
retrieving revision 1.1
diff -u -p -r1.1 schedlock.exp
--- gdb.threads/schedlock.exp 23 Aug 2002 20:32:02 -0000 1.1
+++ gdb.threads/schedlock.exp 4 Jan 2003 15:26:27 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2002, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ if [istarget "*-*-linux*"] then {
 set why_msg "unrecognized error"
 foreach lib $possible_libs {
     set options "debug"
-    lappend options "incdir=${objdir}/${subdir}"
+    lappend options "incdir=${objdir}"
     lappend options "libs=$lib"
     set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
     switch -regexp -- $ccout {



More information about the Gdb-patches mailing list