Skip to content

Commit

Permalink
fix: consider LUA_PATH/LUA_CPATH when searching Lua packages
Browse files Browse the repository at this point in the history
  • Loading branch information
edubart committed Jan 31, 2024
1 parent 7932e52 commit ceafe97
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ distclean: depclean
env:
@echo $(LIBRARY_PATH)
@echo "export PATH='$(SRCDIR):$(TESTSDIR)/misc:${PATH}'"
@echo "export LUA_PATH_5_4='$(SRCDIR)/?.lua;$(TESTSDIR)/lua/?.lua;$${LUA_PATH_5_4:-;}'"
@echo "export LUA_CPATH_5_4='$(SRCDIR)/?.so;$${LUA_CPATH_5_4:-;}'"
@echo "export LUA_PATH_5_4='$(SRCDIR)/?.lua;$(TESTSDIR)/lua/?.lua;$${LUA_PATH_5_4:-$${LUA_PATH:-;}}'"
@echo "export LUA_CPATH_5_4='$(SRCDIR)/?.so;$${LUA_CPATH_5_4:-$${LUA_CPATH:-;}}'"

doc:
cd doc && doxygen Doxyfile
Expand Down
4 changes: 2 additions & 2 deletions tools/template/cartesi-machine-stored-hash.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
export LUA_PATH_5_4="ARG_LUA_PATH;${LUA_PATH_5_4:-;}"
export LUA_CPATH_5_4="ARG_LUA_CPATH;${LUA_CPATH_5_4:-;}"
export LUA_PATH_5_4="ARG_LUA_PATH;${LUA_PATH_5_4:-${LUA_PATH:-;}}"
export LUA_CPATH_5_4="ARG_LUA_CPATH;${LUA_CPATH_5_4:-${LUA_CPATH:-;}}"
lua5.4 "ARG_LUA_RUNTIME_PATH/cartesi-machine-stored-hash.lua" "$@"
4 changes: 2 additions & 2 deletions tools/template/cartesi-machine-tests.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
export LUA_PATH_5_4="ARG_LUA_PATH;${LUA_PATH_5_4:-;}"
export LUA_CPATH_5_4="ARG_LUA_CPATH;${LUA_CPATH_5_4:-;}"
export LUA_PATH_5_4="ARG_LUA_PATH;${LUA_PATH_5_4:-${LUA_PATH:-;}}"
export LUA_CPATH_5_4="ARG_LUA_CPATH;${LUA_CPATH_5_4:-${LUA_CPATH:-;}}"
export CARTESI_IMAGES_PATH="ARG_INSTALL_PATH"
lua5.4 "ARG_LUA_RUNTIME_PATH/cartesi-machine-tests.lua" "$@"
4 changes: 2 additions & 2 deletions tools/template/cartesi-machine.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
export LUA_PATH_5_4="ARG_LUA_PATH;${LUA_PATH_5_4:-;}"
export LUA_CPATH_5_4="ARG_LUA_CPATH;${LUA_CPATH_5_4:-;}"
export LUA_PATH_5_4="ARG_LUA_PATH;${LUA_PATH_5_4:-${LUA_PATH:-;}}"
export LUA_CPATH_5_4="ARG_LUA_CPATH;${LUA_CPATH_5_4:-${LUA_CPATH:-;}}"
export CARTESI_IMAGES_PATH="${CARTESI_IMAGES_PATH:-ARG_IMAGES_PATH}"
lua5.4 "ARG_LUA_RUNTIME_PATH/cartesi-machine.lua" "$@"
4 changes: 2 additions & 2 deletions tools/template/rollup-memory-range.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
export LUA_PATH_5_4="ARG_LUA_PATH;${LUA_PATH_5_4:-;}"
export LUA_CPATH_5_4="ARG_LUA_CPATH;${LUA_CPATH_5_4:-;}"
export LUA_PATH_5_4="ARG_LUA_PATH;${LUA_PATH_5_4:-${LUA_PATH:-;}}"
export LUA_CPATH_5_4="ARG_LUA_CPATH;${LUA_CPATH_5_4:-${LUA_CPATH:-;}}"
lua5.4 "ARG_LUA_RUNTIME_PATH/rollup-memory-range.lua" "$@"
4 changes: 2 additions & 2 deletions tools/template/uarch-riscv-tests.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
export LUA_PATH_5_4="ARG_LUA_PATH;${LUA_PATH_5_4:-;}"
export LUA_CPATH_5_4="ARG_LUA_CPATH;${LUA_CPATH_5_4:-;}"
export LUA_PATH_5_4="ARG_LUA_PATH;${LUA_PATH_5_4:-${LUA_PATH:-;}}"
export LUA_CPATH_5_4="ARG_LUA_CPATH;${LUA_CPATH_5_4:-${LUA_CPATH:-;}}"
lua5.4 "ARG_LUA_RUNTIME_PATH/uarch-riscv-tests.lua" "$@"

0 comments on commit ceafe97

Please sign in to comment.