aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/makeutl.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2008-04-08 09:02:32 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-04-08 09:02:32 +0200
commit7d903840966cbd9360b26507ced43c07a0868976 (patch)
tree6027c7be9ec83e412bc4c7ca376ecafac718f219 /gcc/ada/makeutl.adb
parentfbfc8ef033ca65cf960fbfe045b49fea24a4b81e (diff)
downloadgcc-7d903840966cbd9360b26507ced43c07a0868976.zip
gcc-7d903840966cbd9360b26507ced43c07a0868976.tar.gz
gcc-7d903840966cbd9360b26507ced43c07a0868976.tar.bz2
* makeutl.adb (Path_Or_File_Name): New function
From-SVN: r134071
Diffstat (limited to 'gcc/ada/makeutl.adb')
-rw-r--r--gcc/ada/makeutl.adb36
1 files changed, 32 insertions, 4 deletions
diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb
index 773256d..63b975c 100644
--- a/gcc/ada/makeutl.adb
+++ b/gcc/ada/makeutl.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -23,7 +23,7 @@
-- --
------------------------------------------------------------------------------
-with Ada.Command_Line; use Ada.Command_Line;
+with Debug;
with Osint; use Osint;
with Output; use Output;
with Prj.Ext;
@@ -31,6 +31,10 @@ with Prj.Util;
with Snames; use Snames;
with Table;
+with Ada.Command_Line; use Ada.Command_Line;
+
+with GNAT.Directory_Operations; use GNAT.Directory_Operations;
+
with System.Case_Util; use System.Case_Util;
with System.HTable;
@@ -41,7 +45,7 @@ package body Makeutl is
Index : Int;
end record;
-- Identify either a mono-unit source (when Index = 0) or a specific unit
- -- in a multi-unit source.
+ -- (index = 1's origin index of unit) in a multi-unit source.
-- There follow many global undocumented declarations, comments needed ???
@@ -271,7 +275,17 @@ package body Makeutl is
if N /= No_Name then
Write_Str ("""");
- Write_Name (N);
+
+ declare
+ Name : constant String := Get_Name_String (N);
+ begin
+ if Debug.Debug_Flag_F and then Is_Absolute_Path (Name) then
+ Write_Str (File_Name (Name));
+ else
+ Write_Str (Name);
+ end if;
+ end;
+
Write_Str (""" ");
end if;
@@ -545,6 +559,20 @@ package body Makeutl is
Marks.Set (K => (File => Source_File, Index => Index), E => True);
end Mark;
+ -----------------------
+ -- Path_Or_File_Name --
+ -----------------------
+
+ function Path_Or_File_Name (Path : Path_Name_Type) return String is
+ Path_Name : constant String := Get_Name_String (Path);
+ begin
+ if Debug.Debug_Flag_F then
+ return File_Name (Path_Name);
+ else
+ return Path_Name;
+ end if;
+ end Path_Or_File_Name;
+
---------------------------
-- Test_If_Relative_Path --
---------------------------