* lib/old-dejagnu.exp (old-dejagnu): support `Additional sources:'
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Tue, 13 Oct 1998 07:52:27 +0000 (07:52 +0000)
committerAlexandre Oliva <oliva@gcc.gnu.org>
Tue, 13 Oct 1998 07:52:27 +0000 (07:52 +0000)
From-SVN: r23039

gcc/testsuite/ChangeLog
gcc/testsuite/lib/old-dejagnu.exp

index 774b13d2a381b23dfea5b4265085ea986994914c..33e1c14628d2d74b38db1f490595a1040fa52239 100644 (file)
@@ -1,3 +1,7 @@
+1998-10-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * lib/old-dejagnu.exp (old-dejagnu): support `Additional sources:'
+
 1998-10-12  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * g++.old-deja/g++.pt/explicit74.C: New test.  Explicit
index 95126492e4de5e321199fbec469080e5774b0c52..1b28b5acd33c9f85c16ab5b872920528f11d60de 100644 (file)
@@ -225,6 +225,16 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } {
        lappend cflags "additional_flags=$cflagsx"
     }
 
+    set tmp [lindex [grep $prog "Additional sources: .*"] 0]
+    regsub -all "\n\[^\n\]+(\n|$)" $tmp "\n" tmp
+    set tmp [string trim $tmp]
+    if ![string match "" $tmp] then {
+       regsub "^.*Additional.*sources:" $tmp "" tmp
+       regsub -all " " $tmp " [file dirname $prog]/" tmp
+       lappend cflags "additional_flags=$tmp"
+       verbose "Adding sources $tmp"
+    }
+
     lappend cflags "compiler=$compiler"
 
     regsub -all "\[./\]" "$name" "-" output;