Skip to content

Commit

Permalink
core: add support for alternative installation locations
Browse files Browse the repository at this point in the history
This introduces the UBX_PATH environemnt variable, which can be used
to specify alternative installation paths. If defined, ubx will search
the colon separated list of directories for ubx headers and modules.

Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
  • Loading branch information
kmarkus committed Feb 4, 2020
1 parent bc8a5cb commit f0acaa7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions API_Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ This file tracks user visible API changes.

## v0.7.1

- core: add environment variable `UBX_PATH` that can be used to
specify alternative installation paths. If defined, ubx will search
the colon separated list of directories for ubx headers and modules.

- core: ffi: types: strip preprocessor directives from types that are
fed to the ffi. This is to allow include guards in these header
files.
Expand Down
5 changes: 4 additions & 1 deletion lua/ubx.lua.source
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ local load_files = {
}

-- possible file prefixes for above headers and libraries
local prefixes = { "/usr", "/usr/local" }
local prefixes = {
unpack(utils.split(os.getenv("UBX_PATH") or "", ':')),
"/usr", "/usr/local"
}

local function find_prefix()
for _,pf in ipairs(prefixes) do
Expand Down

0 comments on commit f0acaa7

Please sign in to comment.