new String'(Name_Buffer (1 .. Name_Len));
Test_If_Relative_Path
(New_Args (Last_New),
- Parent => Data.Dir_Path);
+ Parent => Data.Dir_Path,
+ Including_Non_Switch => False);
end if;
Current := Element.Next;
begin
Test_If_Relative_Path
- (New_Args (1), Parent => Data.Dir_Path);
+ (New_Args (1),
+ Parent => Data.Dir_Path,
+ Including_Non_Switch => False);
Add_Arguments
(Configuration_Pragmas_Switch (Arguments_Project) &
New_Args & The_Saved_Gcc_Switches.all);
for J in 1 .. Gcc_Switches.Last loop
Test_If_Relative_Path
- (Gcc_Switches.Table (J), Parent => Dir_Path);
+ (Gcc_Switches.Table (J),
+ Parent => Dir_Path,
+ Including_Non_Switch => False);
end loop;
for J in 1 .. Saved_Gcc_Switches.Last loop
Test_If_Relative_Path
- (Saved_Gcc_Switches.Table (J), Parent => Current_Work_Dir);
+ (Saved_Gcc_Switches.Table (J),
+ Parent => Current_Work_Dir,
+ Including_Non_Switch => False);
end loop;
end;
end if;
---------------------------
procedure Test_If_Relative_Path
- (Switch : in out String_Access;
- Parent : String_Access;
- Including_L_Switch : Boolean := True)
+ (Switch : in out String_Access;
+ Parent : String_Access;
+ Including_L_Switch : Boolean := True;
+ Including_Non_Switch : Boolean := True)
is
begin
if Switch /= null then
end if;
end if;
- else
+ elsif Including_Non_Switch then
if not Is_Absolute_Path (Sw) then
if Parent = null or else Parent'Length = 0 then
Do_Fail
end Mains;
procedure Test_If_Relative_Path
- (Switch : in out String_Access;
- Parent : String_Access;
- Including_L_Switch : Boolean := True);
+ (Switch : in out String_Access;
+ Parent : String_Access;
+ Including_L_Switch : Boolean := True;
+ Including_Non_Switch : Boolean := True);
-- Test if Switch is a relative search path switch.
-- If it is, fail if Parent is null, otherwise prepend the path with
-- Parent. This subprogram is only called when using project files.