From c9940be923f60e0fe8348aea212f02cebb6ddb81 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 11 May 2015 21:18:05 +0200 Subject: ghdldrv: support absolute path with --elab-run. Implement ticket 51. --- src/ghdldrv/ghdldrv.adb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/ghdldrv') diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb index a9470b7..f7860b9 100644 --- a/src/ghdldrv/ghdldrv.adb +++ b/src/ghdldrv/ghdldrv.adb @@ -1003,7 +1003,7 @@ package body Ghdldrv is Success : Boolean; Run_Arg : Natural; begin - Set_Elab_Units ("-elab-run", Args, Run_Arg); + Set_Elab_Units ("--elab-run", Args, Run_Arg); Setup_Compiler (False); Bind; @@ -1012,8 +1012,12 @@ package body Ghdldrv is else Link (Add_Std => True, Disp_Only => False); Delete_File (Filelist_Name.all, Success); - My_Spawn ('.' & Directory_Separator & Output_File.all, - Args (Run_Arg .. Args'Last)); + if Is_Absolute_Path (Output_File.all) then + My_Spawn (Output_File.all, Args (Run_Arg .. Args'Last)); + else + My_Spawn ('.' & Directory_Separator & Output_File.all, + Args (Run_Arg .. Args'Last)); + end if; end if; end Perform_Action; -- cgit