Skip to content

Commit

Permalink
Fix Makefile path for Lua 5.1.5
Browse files Browse the repository at this point in the history
The Lua GitHub repository doesn't have the 5.1.5 tag, and the code
downloaded from https://www.lua.org/ftp has different directory layout.
  • Loading branch information
xxyzz committed Apr 12, 2023
1 parent 64222f7 commit 2c1bd08
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ def use_bundled_lua(path, macros):

# Parse .o files from 'makefile'
makefile = os.path.join(path, "makefile")
if libname == 'lua51':
# Lua 5.1.5 source code is downloaded from lua.org/ftp
makefile = os.path.join(path, "src", "Makefile")
match_var = re.compile(r"(CORE|AUX|LIB|ALL)_O\s*=(.*)").match
is_indented = re.compile(r"\s+").match

Expand Down Expand Up @@ -300,7 +303,7 @@ def use_bundled_lua(path, macros):
os.path.splitext(obj_file)[0] + '.c' if obj_file != 'lj_vm.o' else 'lj_vm.s'
for obj_file in obj_files
]
if 'lua52' in path:
if libname == 'lua52':
lua_sources.extend(['lbitlib.c', 'lcorolib.c', 'lctype.c'])
src_dir = os.path.dirname(makefile)
ext_libraries = [
Expand Down

0 comments on commit 2c1bd08

Please sign in to comment.