Fix for makefile bug - tests regardless of what was built

Tim Josling tej@melbpc.org.au
Sat Mar 4 20:00:00 GMT 2000


Currently if you type "make check" the makefile tries to test
every language, even programs that weren't copnfigured. This
patch chanegs the behaviour so that only C plus any other
languages that were configured will get tested. This was just a
matter of moving the makefile fragments into the Make-lang
fragments for the relevant languages.

Tim Josling

---------------->>> here are the diffs
diff -Nrc3p egcs-20000228/gcc/ChangeLog
egcs-20000228.new/gcc/ChangeLog
*** egcs-20000228/gcc/ChangeLog Wed Mar  1 19:33:24 2000
--- egcs-20000228.new/gcc/ChangeLog     Wed Mar  1 19:59:06 2000
***************
*** 1,3 ****
--- 1,8 ----
+ Wed 1 Mar 20:07:03 2000 Tim Josling <tej@melbpc.org.au>
+ 
+       * moved tests (check:, check-*) to Make-lang.in for each
language
+       other than C.
+ 
  Mon Feb 28 22:11:12 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
  
        * sh.h (DWARF_LINE_MIN_INSTR_LENGTH): Define.
diff -Nrc3p egcs-20000228/gcc/Makefile.in
egcs-20000228.new/gcc/Makefile.in
*** egcs-20000228/gcc/Makefile.in       Wed Mar  1 19:33:24 2000
--- egcs-20000228.new/gcc/Makefile.in   Wed Mar  1 19:57:14 2000
*************** site.exp: ./config.status Makefile
*** 2800,2808 ****
                -e '1,/^## All variables above are.*##/ d' >>
site.exp
        -@rm -f ./tmp?
  
! CHECK_TARGETS = check-gcc check-g++ check-g77 check-objc
  
! check: $(CHECK_TARGETS)
  
  testsuite/site.exp: site.exp
        if [ -d testsuite ]; then \
--- 2800,2809 ----
                -e '1,/^## All variables above are.*##/ d' >>
site.exp
        -@rm -f ./tmp?
  
! #CHECK_TARGETS = check-gcc check-g++ check-g77 check-objc 
! # other targets than C moved to Make-lang.in for each target
  
! check: check-gcc
  
  testsuite/site.exp: site.exp
        if [ -d testsuite ]; then \
*************** testsuite/site.exp: site.exp
*** 2813,2828 ****
        rm -rf testsuite/site.exp
        cp site.exp testsuite/site.exp
  
- check-g++: testsuite/site.exp
-       -rootme=`pwd`; export rootme; \
-       srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
-       cd testsuite; \
-       EXPECT=${EXPECT} ; export EXPECT ; \
-       if [ -f $${rootme}/../expect/expect ] ; then  \
-          TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ;
pwd` ; \
-           export TCL_LIBRARY ; fi ; \
-       $(RUNTEST) --tool g++ $(RUNTESTFLAGS)
- 
  check-gcc: testsuite/site.exp
        -rootme=`pwd`; export rootme; \
        srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
--- 2814,2819 ----
*************** check-gcc: testsuite/site.exp
*** 2832,2857 ****
           TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ;
pwd` ; \
           export TCL_LIBRARY ; fi ; \
        $(RUNTEST) --tool gcc $(RUNTESTFLAGS)
- 
- check-g77: testsuite/site.exp
-       -rootme=`pwd`; export rootme; \
-       srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
-       cd testsuite; \
-       EXPECT=${EXPECT} ; export EXPECT ; \
-       if [ -f $${rootme}/../expect/expect ] ; then  \
-          TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ;
pwd` ; \
-          export TCL_LIBRARY ; fi ; \
-       $(RUNTEST) --tool g77 $(RUNTESTFLAGS)
- 
- check-objc: testsuite/site.exp
-       -rootme=`pwd`; export rootme; \
-       srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
-       cd testsuite; \
-       EXPECT=${EXPECT} ; export EXPECT ; \
-       if [ -f $${rootme}/../expect/expect ] ; then  \
-          TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ;
pwd` ; \
-           export TCL_LIBRARY ; fi ; \
-       $(RUNTEST) --tool objc $(RUNTESTFLAGS)
  
  # These exist for maintenance purposes.
  
--- 2823,2828 ----
diff -Nrc3p egcs-20000228/gcc/cp/ChangeLog
egcs-20000228.new/gcc/cp/ChangeLog
*** egcs-20000228/gcc/cp/ChangeLog      Wed Mar  1 19:33:28 2000
--- egcs-20000228.new/gcc/cp/ChangeLog  Wed Mar  1 19:52:11 2000
***************
*** 1,3 ****
--- 1,8 ----
+ 2000-03-01  Tim Josling <tej@melbpc.org.au>
+ 
+       * Make-lang.in: moved check (test) make fragment here so
it is
+       only executed if c++ is configured.
+ 
  2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
  
        * search.c (protected_accessible_p): Also allow the
access if
diff -Nrc3p egcs-20000228/gcc/cp/Make-lang.in
egcs-20000228.new/gcc/cp/Make-lang.in
*** egcs-20000228/gcc/cp/Make-lang.in   Wed Mar  1 19:33:28 2000
--- egcs-20000228.new/gcc/cp/Make-lang.in       Wed Mar  1
19:48:42 2000
*************** c++.distdir:
*** 311,313 ****
--- 311,328 ----
          ln $$file ../../tmp/cp/inc >/dev/null 2>&1 \
           || cp $$file ../../tmp/cp/inc; \
        done
+ 
+ # tests
+ 
+ check: check-g++
+ 
+ check-g++: testsuite/site.exp
+       -rootme=`pwd`; export rootme; \
+       srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
+       cd testsuite; \
+       EXPECT=${EXPECT} ; export EXPECT ; \
+       if [ -f $${rootme}/../expect/expect ] ; then  \
+          TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ;
pwd` ; \
+           export TCL_LIBRARY ; fi ; \
+       $(RUNTEST) --tool g++ $(RUNTESTFLAGS)
+ 
diff -Nrc3p egcs-20000228/gcc/f/ChangeLog
egcs-20000228.new/gcc/f/ChangeLog
*** egcs-20000228/gcc/f/ChangeLog       Wed Mar  1 19:33:30 2000
--- egcs-20000228.new/gcc/f/ChangeLog   Wed Mar  1 19:54:03 2000
***************
*** 1,3 ****
--- 1,8 ----
+ 2000-03-01  Tim Josling <tej@melbpc.org.au>
+ 
+       * Make-lang.in: moved check (test) make fragment here so
it is
+       only executed if fortran is configured.
+ 
  Sun Feb 27 16:40:33 2000  Richard Kenner 
<kenner@vlsi1.ultra.nyu.edu>
  
        * com.c (ffecom_arrayref_): Convert args to size_binop to
proper type.
diff -Nrc3p egcs-20000228/gcc/f/Make-lang.in
egcs-20000228.new/gcc/f/Make-lang.in
*** egcs-20000228/gcc/f/Make-lang.in    Wed Mar  1 19:33:30 2000
--- egcs-20000228.new/gcc/f/Make-lang.in        Wed Mar  1
19:53:02 2000
***************
*** 1,5 ****
  # Top level makefile fragment for GNU Fortran.          
-*-makefile-*-
! #   Copyright (C) 1995, 1996, 1997, 1998 Free Software
Foundation, Inc.
  
  #This file is part of GNU Fortran.
  
--- 1,5 ----
  # Top level makefile fragment for GNU Fortran.          
-*-makefile-*-
! #   Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software
Foundation, Inc.
  
  #This file is part of GNU Fortran.
  
*************** f77.distdir: f77.rebuilt
*** 461,463 ****
--- 461,478 ----
            $(LN_S) $$file ../tmp/f; \
          done; \
        fi
+ 
+ #tests
+ 
+ check: check-g77
+ 
+ check-g77: testsuite/site.exp
+       -rootme=`pwd`; export rootme; \
+       srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
+       cd testsuite; \
+       EXPECT=${EXPECT} ; export EXPECT ; \
+       if [ -f $${rootme}/../expect/expect ] ; then  \
+          TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ;
pwd` ; \
+          export TCL_LIBRARY ; fi ; \
+       $(RUNTEST) --tool g77 $(RUNTESTFLAGS)
+ 
diff -Nrc3p egcs-20000228/gcc/objc/ChangeLog
egcs-20000228.new/gcc/objc/ChangeLog
*** egcs-20000228/gcc/objc/ChangeLog    Thu Jan  1 10:00:00 1970
--- egcs-20000228.new/gcc/objc/ChangeLog        Wed Mar  1
19:51:53 2000
***************
*** 0 ****
--- 1,5 ----
+ 2000-03-01  Tim Josling <tej@melbpc.org.au>
+ 
+       * Make-lang.in: moved check (test) make fragment here so
it is
+       only executed if objc is configured.
+ 
diff -Nrc3p egcs-20000228/gcc/objc/Make-lang.in
egcs-20000228.new/gcc/objc/Make-lang.in
*** egcs-20000228/gcc/objc/Make-lang.in Tue Sep 14 17:46:09 1999
--- egcs-20000228.new/gcc/objc/Make-lang.in     Wed Mar  1
19:47:50 2000
***************
*** 1,5 ****
  # Top level makefile fragment for GNU Objective-C
! #   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
  
  #This file is part of GNU CC.
  
--- 1,5 ----
  # Top level makefile fragment for GNU Objective-C
! #   Copyright (C) 1997, 1998, 2000 Free Software Foundation,
Inc.
  
  #This file is part of GNU CC.
  
*************** objc.distdir: $(srcdir)/objc/objc-parse.
*** 165,167 ****
--- 165,180 ----
        for file in *[0-9a-zA-Z+]; do \
          ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file
../tmp/objc; \
        done
+ 
+ check: check-objc
+ 
+ check-objc: testsuite/site.exp
+       -rootme=`pwd`; export rootme; \
+       srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
+       cd testsuite; \
+       EXPECT=${EXPECT} ; export EXPECT ; \
+       if [ -f $${rootme}/../expect/expect ] ; then  \
+          TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ;
pwd` ; \
+           export TCL_LIBRARY ; fi ; \
+       $(RUNTEST) --tool objc $(RUNTESTFLAGS)
+


More information about the Gcc-patches mailing list