diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-07-14 08:21:18 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-07-14 08:21:18 +0200 |
commit | 8db5c10786bca404c5d1e129090ea9fea25531d2 (patch) | |
tree | 1232a7f9a6e4cd42bccad5f1228a2f20fc16d5e0 /src/ghdldrv/ghdllocal.adb | |
parent | 8fd9e4a314bec9a3dc4a260b00d2ed7f589d74c0 (diff) | |
download | ghdl-8db5c10786bca404c5d1e129090ea9fea25531d2.tar.gz ghdl-8db5c10786bca404c5d1e129090ea9fea25531d2.tar.bz2 ghdl-8db5c10786bca404c5d1e129090ea9fea25531d2.zip |
Add commands to build vpi modules (WIP)
Diffstat (limited to 'src/ghdldrv/ghdllocal.adb')
-rw-r--r-- | src/ghdldrv/ghdllocal.adb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb index 15facb867..906bdc046 100644 --- a/src/ghdldrv/ghdllocal.adb +++ b/src/ghdldrv/ghdllocal.adb @@ -198,6 +198,11 @@ package body Ghdllocal is return Pathname'First - 1; end Get_Basename_Pos; + function Is_Basename (Pathname : String) return Boolean is + begin + return Get_Basename_Pos (Pathname) < Pathname'First; + end Is_Basename; + -- Simple lower case conversion, used to compare with "bin". function To_Lower (S : String) return String is @@ -336,7 +341,7 @@ package body Ghdllocal is -- If the command name is a relative path, deduce prefix from it -- and current path. - if Get_Basename_Pos (Prog_Path) >= Prog_Path'First then + if not Is_Basename (Prog_Path) then if Is_Executable_File (Prog_Path) then Set_Prefix_From_Program_Path (Get_Current_Dir & Directory_Separator & Prog_Path); |