summaryrefslogtreecommitdiff
path: root/src/ghdldrv
diff options
context:
space:
mode:
Diffstat (limited to 'src/ghdldrv')
-rw-r--r--src/ghdldrv/ghdlcomp.adb24
-rw-r--r--src/ghdldrv/ghdldrv.adb28
-rw-r--r--src/ghdldrv/ghdllocal.adb34
-rw-r--r--src/ghdldrv/ghdllocal.ads3
4 files changed, 42 insertions, 47 deletions
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb
index ba755af..ef81487 100644
--- a/src/ghdldrv/ghdlcomp.adb
+++ b/src/ghdldrv/ghdlcomp.adb
@@ -34,7 +34,6 @@ with Libraries;
with Std_Package;
with Files_Map;
with Version;
-with Default_Pathes;
package body Ghdlcomp is
@@ -451,14 +450,14 @@ package body Ghdlcomp is
is
pragma Unreferenced (Cmd);
begin
- return Name = "--dispconfig";
+ return Name = "--dispconfig" or else Name = "--disp-config";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Dispconfig) return String
is
pragma Unreferenced (Cmd);
begin
- return "--dispconfig Disp tools path";
+ return "--disp-config Disp tools path";
end Get_Short_Help;
procedure Perform_Action (Cmd : in out Command_Dispconfig;
@@ -469,27 +468,12 @@ package body Ghdlcomp is
pragma Unreferenced (Cmd);
begin
if Args'Length /= 0 then
- Error ("--dispconfig does not accept any argument");
+ Error ("--disp-config does not accept any argument");
raise Errorout.Option_Error;
end if;
- Put ("command line prefix (--PREFIX): ");
- if Prefix_Path = null then
- Put_Line ("(not set)");
- else
- Put_Line (Prefix_Path.all);
- end if;
- Setup_Libraries (False);
-
- Put ("environment prefix (GHDL_PREFIX): ");
- if Prefix_Env = null then
- Put_Line ("(not set)");
- else
- Put_Line (Prefix_Env.all);
- end if;
+ Disp_Config_Prefixes;
- Put_Line ("default prefix: " & Default_Pathes.Prefix);
- Put_Line ("actual prefix: " & Prefix_Path.all);
Put_Line ("command_name: " & Ada.Command_Line.Command_Name);
Put_Line ("default library pathes:");
for I in 2 .. Get_Nbr_Pathes loop
diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb
index be905f1..1eab18d 100644
--- a/src/ghdldrv/ghdldrv.adb
+++ b/src/ghdldrv/ghdldrv.adb
@@ -801,34 +801,8 @@ package body Ghdldrv is
New_Line;
- Put ("command line prefix (--PREFIX): ");
- if Switch_Prefix_Path = null then
- Put_Line ("(not set)");
- else
- Put_Line (Switch_Prefix_Path.all);
- end if;
-
- Put ("environment prefix (GHDL_PREFIX): ");
- if Prefix_Env = null then
- Put_Line ("(not set)");
- else
- 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)");
- else
- Put_Line (Exec_Prefix.all);
- end if;
-
- New_Line;
+ Disp_Config_Prefixes;
- Put_Line ("library prefix: " & Lib_Prefix_Path.all);
- Put ("library directory: ");
- Put_Line (Get_Machine_Path_Prefix);
Locate_Tools;
Put ("compiler path: ");
Put_Line (Compiler_Path.all);
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index a1d94bd..ce061e2 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -418,6 +418,40 @@ package body Ghdllocal is
end if;
end Setup_Libraries;
+ procedure Disp_Config_Prefixes
+ is
+ use Ada.Text_IO;
+ begin
+ Put ("command line prefix (--PREFIX): ");
+ if Switch_Prefix_Path = null then
+ Put_Line ("(not set)");
+ else
+ Put_Line (Switch_Prefix_Path.all);
+ end if;
+
+ Put ("environment prefix (GHDL_PREFIX): ");
+ if Prefix_Env = null then
+ Put_Line ("(not set)");
+ else
+ 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)");
+ else
+ Put_Line (Exec_Prefix.all);
+ end if;
+
+ New_Line;
+
+ Put_Line ("library prefix: " & Lib_Prefix_Path.all);
+ Put ("library directory: ");
+ Put_Line (Get_Machine_Path_Prefix);
+ end Disp_Config_Prefixes;
+
procedure Disp_Library_Unit (Unit : Iir)
is
use Ada.Text_IO;
diff --git a/src/ghdldrv/ghdllocal.ads b/src/ghdldrv/ghdllocal.ads
index 2c7018a..d64846f 100644
--- a/src/ghdldrv/ghdllocal.ads
+++ b/src/ghdldrv/ghdllocal.ads
@@ -90,6 +90,9 @@ package Ghdllocal is
-- Get Prefix_Path, but with 32 added if -m32 is requested
function Get_Machine_Path_Prefix return String;
+ -- Subprocedure for --disp-config: display prefixes.
+ procedure Disp_Config_Prefixes;
+
-- Setup standard libaries path. If LOAD is true, then load them now.
procedure Setup_Libraries (Load : Boolean);