diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-07-09 05:22:45 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-07-09 05:22:45 +0200 |
commit | 757a76ead4a2cde8519a12ad10bfe19bd5984d18 (patch) | |
tree | 0d40eb3d533ec49f06522eeee1d675f9e7b4f2cd | |
parent | 0926686937d3c673f46cd0d5c770a7fd4744a47d (diff) | |
download | ghdl-757a76ead4a2cde8519a12ad10bfe19bd5984d18.tar.gz ghdl-757a76ead4a2cde8519a12ad10bfe19bd5984d18.tar.bz2 ghdl-757a76ead4a2cde8519a12ad10bfe19bd5984d18.zip |
ghdllocal: correctly disp GHDL_PREFIX in --disp-config.
-rw-r--r-- | src/ghdldrv/ghdllocal.adb | 10 | ||||
-rw-r--r-- | src/ghdldrv/ghdllocal.ads | 2 | ||||
-rw-r--r-- | src/ghdldrv/ghdlvpi.adb | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb index da421a62c..a49ed5301 100644 --- a/src/ghdldrv/ghdllocal.adb +++ b/src/ghdldrv/ghdllocal.adb @@ -258,7 +258,7 @@ package body Ghdllocal is end Set_Prefix_From_Program_Path; -- Extract Exec_Prefix from executable name. - procedure Set_Exec_Prefix + procedure Set_Exec_Prefix_From_Program_Name is use GNAT.Directory_Operations; Prog_Path : constant String := Ada.Command_Line.Command_Name; @@ -286,7 +286,7 @@ package body Ghdllocal is Set_Prefix_From_Program_Path (Exec_Path.all); Free (Exec_Path); end if; - end Set_Exec_Prefix; + end Set_Exec_Prefix_From_Program_Name; function Get_Version_Path return String is @@ -336,7 +336,7 @@ package body Ghdllocal is end if; -- Compute Exec_Prefix. - Set_Exec_Prefix; + Set_Exec_Prefix_From_Program_Name; -- Set prefix path. -- If not set by command line, try environment variable. @@ -406,6 +406,8 @@ package body Ghdllocal is Put_Line (Switch_Prefix_Path.all); end if; + Setup_Libraries (False); + Put ("environment prefix (GHDL_PREFIX): "); if Prefix_Env = null then Put_Line ("(not set)"); @@ -413,8 +415,6 @@ package body Ghdllocal is Put_Line (Prefix_Env.all); end if; - Setup_Libraries (False); - Put ("exec prefix (from program name): "); if Exec_Prefix = null then Put_Line ("(not found)"); diff --git a/src/ghdldrv/ghdllocal.ads b/src/ghdldrv/ghdllocal.ads index 553ebfda0..a5c6fb7ef 100644 --- a/src/ghdldrv/ghdllocal.ads +++ b/src/ghdldrv/ghdllocal.ads @@ -117,7 +117,7 @@ package Ghdllocal is procedure Setup_Libraries (Load : Boolean); -- Set Exec_Prefix from program name. Called by Setup_Libraries. - procedure Set_Exec_Prefix; + procedure Set_Exec_Prefix_From_Program_Name; -- Setup library, analyze FILES, and if SAVE_LIBRARY is set save the -- work library only diff --git a/src/ghdldrv/ghdlvpi.adb b/src/ghdldrv/ghdlvpi.adb index 8b79b98c6..fd470b0fb 100644 --- a/src/ghdldrv/ghdlvpi.adb +++ b/src/ghdldrv/ghdlvpi.adb @@ -38,7 +38,7 @@ package body Ghdlvpi is function Get_Vpi_Include_Dir return String is begin -- Compute install path - Ghdllocal.Set_Exec_Prefix; + Ghdllocal.Set_Exec_Prefix_From_Program_Name; return Ghdllocal.Exec_Prefix.all & Directory_Separator & "include"; end Get_Vpi_Include_Dir; @@ -48,7 +48,7 @@ package body Ghdlvpi is begin if Ghdllocal.Exec_Prefix = null then -- Compute install path (only once). - Ghdllocal.Set_Exec_Prefix; + Ghdllocal.Set_Exec_Prefix_From_Program_Name; end if; return Ghdllocal.Exec_Prefix.all & Directory_Separator & "lib"; |