This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch to move hardcoded language testsuite targets


This patch moves the hardcoding of language testsuite targets (one of
the residual bugs limiting the ability to drop in front end
directories) out of gcc/Makefile.in, in the way indicated by Mark
Mitchell in <http://gcc.gnu.org/ml/gcc-patches/2003-08/msg02061.html>.
I haven't touched the QMTest parts since Mark indicated that would be
done when the QMTest support is ready to test more than G++
<http://gcc.gnu.org/ml/gcc-patches/2003-06/msg00438.html>.  Note that
some languages (Ada and treelang) have their own test rules already in
the subdirectory Make-lang.in files, rather than using the common
Dejagnu rule, so those languages aren't affected beyond removing a now
obsolete comment about the centralised rules in treelang/Make-lang.in.

Bootstrapped with no regressions on i686-pc-linux-gnu.  OK to commit?

gcc:
2003-11-14  Joseph S. Myers  <jsm@polyomino.org.uk>

	* Makefile.in (lang_checks): Add.
	(check-c++, check-f77, check-java, check-g++, check=g77,
	check-objc): Remove hardcoded targets.
	* doc/sourcebuild.texi: Document testsuite hooks.

gcc/cp:
2003-11-14  Joseph S. Myers  <jsm@polyomino.org.uk>

	* Make-lang.in (check-g++, lang_checks): Add.

gcc/f:
2003-11-14  Joseph S. Myers  <jsm@polyomino.org.uk>

	* Make-lang.in (check-f77, lang_checks): Add.

gcc/java:
2003-11-14  Joseph S. Myers  <jsm@polyomino.org.uk>

	* Make-lang.in (check-java): Add.

gcc/objc:
2003-11-14  Joseph S. Myers  <jsm@polyomino.org.uk>

	* Make-lang.in (check-objc, lang_checks): Add.

gcc/treelang:
2003-11-14  Joseph S. Myers  <jsm@polyomino.org.uk>

	* Make-lang.in: Remove obsolete comment.

diff -ruN GCC.orig/gcc/Makefile.in GCC/gcc/Makefile.in
--- GCC.orig/gcc/Makefile.in	2003-11-10 10:23:58.000000000 +0000
+++ GCC/gcc/Makefile.in	2003-11-14 19:43:05.000000000 +0000
@@ -380,6 +380,7 @@
 xm_file_list=@xm_file_list@
 xm_include_list=@xm_include_list@
 xm_defines=@xm_defines@
+lang_checks=check-gcc
 lang_opt_files=@lang_opt_files@ $(srcdir)/c.opt $(srcdir)/common.opt
 lang_specs_files=@lang_specs_files@
 lang_tree_files=@lang_tree_files@
@@ -3253,10 +3254,6 @@
 
 CHECK_TARGETS = check-gcc @check_languages@
 
-check-c++ : check-g++
-check-f77 : check-g77
-check-java :
-
 check: $(CHECK_TARGETS)
 
 # The idea is to parallelize testing of multilibs, for example:
@@ -3264,7 +3261,8 @@
 # will run 3 concurrent sessions of check-gcc, eventually testing
 # all 10 combinations.  GNU make is required, as is a shell that expands
 # alternations within braces.
-check-gcc//% check-g++//% check-g77//% check-objc//%: site.exp
+lang_checks_parallel = $(lang_checks:=//%)
+$(lang_checks_parallel): site.exp
 	target=`echo "$@" | sed 's,//.*,,'`; \
 	variant=`echo "$@" | sed 's,^[^/]*//,,'`; \
 	vardots=`echo "$$variant" | sed 's,/,.,g'`; \
@@ -3279,7 +3277,7 @@
 	-rm -f $@
 	sed '/set tmpdir/ s|testsuite|$(TESTSUITEDIR)|' < site.exp > $@
 
-check-g++ check-gcc check-g77 check-objc: check-% : $(TESTSUITEDIR)/site.exp
+$(lang_checks): check-% : $(TESTSUITEDIR)/site.exp
 	-(rootme=`${PWD_COMMAND}`; export rootme; \
 	srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
 	cd $(TESTSUITEDIR); \
diff -ruN GCC.orig/gcc/cp/Make-lang.in GCC/gcc/cp/Make-lang.in
--- GCC.orig/gcc/cp/Make-lang.in	2003-10-20 21:47:10.000000000 +0000
+++ GCC/gcc/cp/Make-lang.in	2003-11-14 19:44:03.000000000 +0000
@@ -118,6 +118,9 @@
 
 generated-manpages:: cp/g++.1
 
+check-c++ : check-g++
+lang_checks += check-g++
+
 #
 # Install hooks:
 # cc1plus is installed elsewhere as part of $(COMPILERS).
diff -ruN GCC.orig/gcc/doc/sourcebuild.texi GCC/gcc/doc/sourcebuild.texi
--- GCC.orig/gcc/doc/sourcebuild.texi	2003-10-28 10:10:45.000000000 +0000
+++ GCC/gcc/doc/sourcebuild.texi	2003-11-14 19:50:13.000000000 +0000
@@ -551,7 +551,9 @@
 deprecated).  Some hooks are defined by using a double-colon rule for
 @code{@var{hook}}, rather than by using a target of form
 @code{@var{lang}.@var{hook}}.  These hooks are called ``double-colon
-hooks'' below.
+hooks'' below.  It also adds any testsuite targets that can use the
+standard rule in @file{gcc/Makefile.in} to the variable
+@code{lang_checks}.
 
 @table @code
 @item all.build
diff -ruN GCC.orig/gcc/f/Make-lang.in GCC/gcc/f/Make-lang.in
--- GCC.orig/gcc/f/Make-lang.in	2003-11-04 12:55:02.000000000 +0000
+++ GCC/gcc/f/Make-lang.in	2003-11-14 19:44:16.000000000 +0000
@@ -152,6 +152,9 @@
 dvi:: $(docobjdir)/g77.dvi
 generated-manpages:: $(docobjdir)/g77.1
 
+check-f77 : check-g77
+lang_checks += check-g77
+
 # g77 documentation.
 $(docobjdir)/g77.info: $(srcdir)/f/g77.texi $(srcdir)/f/bugs.texi \
 		$(srcdir)/f/ffe.texi $(srcdir)/f/invoke.texi \
diff -ruN GCC.orig/gcc/java/Make-lang.in GCC/gcc/java/Make-lang.in
--- GCC.orig/gcc/java/Make-lang.in	2003-11-04 12:55:02.000000000 +0000
+++ GCC/gcc/java/Make-lang.in	2003-11-14 19:39:18.000000000 +0000
@@ -167,6 +167,8 @@
 	$(docobjdir)/gij.1 $(docobjdir)/jv-convert.1 \
 	$(docobjdir)/rmic.1 $(docobjdir)/rmiregistry.1
 
+check-java :
+
 # Install hooks:
 # jc1, gcj, jvgenmain, and gcjh are installed elsewhere as part
 # of $(COMPILERS).
diff -ruN GCC.orig/gcc/objc/Make-lang.in GCC/gcc/objc/Make-lang.in
--- GCC.orig/gcc/objc/Make-lang.in	2003-10-20 21:47:14.000000000 +0000
+++ GCC/gcc/objc/Make-lang.in	2003-11-14 19:44:36.000000000 +0000
@@ -106,6 +106,8 @@
 objc.tags: force
 	cd $(srcdir)/objc; etags *.y *.c *.h
 
+lang_checks += check-objc
+
 #
 # Install hooks:
 # cc1obj is installed elsewhere as part of $(COMPILERS).
diff -ruN GCC.orig/gcc/treelang/Make-lang.in GCC/gcc/treelang/Make-lang.in
--- GCC.orig/gcc/treelang/Make-lang.in	2003-11-04 12:55:04.000000000 +0000
+++ GCC/gcc/treelang/Make-lang.in	2003-11-14 19:46:43.000000000 +0000
@@ -271,7 +271,6 @@
 #	not here yet sorry not sure if this is needed or not???
 
 # test hook
-# the other languages are hard coded in the main makefile.in - that seems to be wrong
 
 check-treelang: treelang.check
 

-- 
Joseph S. Myers
jsm@polyomino.org.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]