From 876bf7fea6d17e2d5025edc35ef102a4b6665576 Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Mon, 30 Nov 2015 16:52:42 -0500 Subject: Add bind only option (-b) to make command (-m). --- src/ghdldrv/ghdldrv.adb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/ghdldrv/ghdldrv.adb') diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb index afea5d4..3aacf72 100644 --- a/src/ghdldrv/ghdldrv.adb +++ b/src/ghdldrv/ghdldrv.adb @@ -1248,6 +1248,9 @@ package body Ghdldrv is -- Command Make. type Command_Make is new Command_Comp with record + -- Bind only; don't link + Flag_Bind_Only : Boolean; + -- Disp dependences during make. Flag_Depend_Unit : Boolean; @@ -1288,6 +1291,7 @@ package body Ghdldrv is is begin Disp_Long_Help (Command_Comp (Cmd)); + Put_Line (" -b Bind only; don't link"); Put_Line (" -f Force recompilation of work units"); Put_Line (" -Mu Disp unit dependences (human format)"); end Disp_Long_Help; @@ -1295,6 +1299,7 @@ package body Ghdldrv is procedure Init (Cmd : in out Command_Make) is begin Init (Command_Comp (Cmd)); + Cmd.Flag_Bind_Only := False; Cmd.Flag_Depend_Unit := False; Cmd.Flag_Force := False; end Init; @@ -1304,7 +1309,10 @@ package body Ghdldrv is Arg : String; Res : out Option_Res) is begin - if Option = "-Mu" then + if Option = "-b" then + Cmd.Flag_Bind_Only := True; + Res := Option_Ok; + elsif Option = "-Mu" then Cmd.Flag_Depend_Unit := True; Res := Option_Ok; elsif Option = "-f" then @@ -1523,8 +1531,10 @@ package body Ghdldrv is New_Line; end if; Bind; - Link (Add_Std => True, Disp_Only => False); - Delete_File (Filelist_Name.all, Success); + if not Cmd.Flag_Bind_Only then + Link (Add_Std => True, Disp_Only => False); + Delete_File (Filelist_Name.all, Success); + end if; end if; exception when Errorout.Compilation_Error => -- cgit