Skip to content

Commit

Permalink
Simplify Makefile: Don't query for default LUA_PATH
Browse files Browse the repository at this point in the history
All Lua versions since at least Lua 5.1 replace ";;" in $LUA_PATH and $LUA_CPATH
with the default value. Use this instead of trying to query the default path so
that we can prepend something.

If $LUA_PATH is empty, we end up with ";;" in the new value, so the default path
is added. If $LUA_PATH is not empty, we add our own entry to it.

This also fixes a (theoretical) issue due to missing quoting on the path.

Signed-off-by: Uli Schlachter <psychon@znc.in>
  • Loading branch information
psychon committed Oct 24, 2016
1 parent 3651b81 commit 503c5c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Makefile
Expand Up @@ -57,8 +57,8 @@ clean :
check : all
cd .. && LD_LIBRARY_PATH=tests:$$LD_LIBRARY_PATH \
GI_TYPELIB_PATH=tests:$$GI_TYPELIB_PATH \
LUA_PATH=./?.lua\;`$(LUA) -e "print(package.path)"` \
LUA_CPATH=./?.so\;`$(LUA) -e "print(package.cpath)"` \
LUA_PATH="./?.lua;${LUA_PATH};" \
LUA_CPATH="./?.so;${LUA_CPATH};" \
$(LUA) tests/test.lua

$(REGRESS) : regress.o
Expand Down

0 comments on commit 503c5c5

Please sign in to comment.