diff options
author | Tristan Gingold | 2015-11-29 07:36:36 +0100 |
---|---|---|
committer | Tristan Gingold | 2015-11-30 08:02:16 +0100 |
commit | bc46c647a48f84d75f4fd9adcf9673cb1d581b5f (patch) | |
tree | 9a5016e1f8a5f4b3b200b6c015d6136d4e87ade9 /src | |
parent | 5e46a4e22a2a1438ee19fd4e964f4b3b2169ea1c (diff) | |
download | ghdl-bc46c647a48f84d75f4fd9adcf9673cb1d581b5f.tar.gz ghdl-bc46c647a48f84d75f4fd9adcf9673cb1d581b5f.tar.bz2 ghdl-bc46c647a48f84d75f4fd9adcf9673cb1d581b5f.zip |
Rework --dir command so that it could display ieee content.
Adjust doc.
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdldrv/ghdllocal.adb | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb index b79a06f..0072b37 100644 --- a/src/ghdldrv/ghdllocal.adb +++ b/src/ghdldrv/ghdllocal.adb @@ -596,6 +596,7 @@ package body Ghdllocal is is pragma Unreferenced (Cmd); begin + -- '-d' is for compatibility. return Name = "-d" or else Name = "--dir"; end Decode_Command; @@ -603,31 +604,22 @@ package body Ghdllocal is is pragma Unreferenced (Cmd); begin - return "-d or --dir Disp contents of the work library"; + return "--dir [LIBs] Disp contents of the libraries"; end Get_Short_Help; procedure Perform_Action (Cmd : in out Command_Dir; Args : Argument_List) is pragma Unreferenced (Cmd); begin - if Args'Length /= 0 then - Error ("command '-d' does not accept any argument"); - raise Option_Error; - end if; - - Flags.Bootstrap := True; - -- Load word library. - Libraries.Load_Std_Library; - Libraries.Load_Work_Library; - - Disp_Library (Std_Names.Name_Work); + Setup_Libraries (True); --- else --- for L in Libs'Range loop --- Id := Get_Identifier (Libs (L).all); --- Disp_Library (Id); --- end loop; --- end if; + if Args'Length = 0 then + Disp_Library (Std_Names.Name_Work); + else + for I in Args'Range loop + Disp_Library (Name_Table.Get_Identifier (Args (I).all)); + end loop; + end if; end Perform_Action; -- Command Find. |