dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] Add find_gnat to libgloss.exp


From: James Morrison
Subject: [patch] Add find_gnat to libgloss.exp
Date: Tue, 23 Nov 2004 09:21:15 -0500

 Hi,

  This patch adds a find_gnat function to libgloss to easily find gnatmake on
a given system.

--- libgloss.exp.old    2004-11-23 09:13:07.864067976 -0500
+++ libgloss.exp        2004-11-23 09:12:50.741670976 -0500
@@ -676,6 +676,25 @@ proc find_g++ {} {
     return $CC
 }
 
+proc find_gnat {} {
+    global tool_root_dir
+
+    if ![is_remote host] {
+       set file [lookfor_file $tool_root_dir gnatmake]
+       if { $file == "" } {
+           set file [lookfor_file $tool_root_dir gcc/gnatmake]
+       }
+       if { $file != "" } {
+           set CC "$file -B[file dirname $file]/"
+       } else {
+           set CC [transform gnatmake]
+       }
+    } else {
+       set CC [transform gnatmake]
+    }
+    return $CC
+}
+
 proc find_g77 {} {
     global tool_root_dir
 
Jim




reply via email to

[Prev in Thread] Current Thread [Next in Thread]