Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .emmyrc.json

This file was deleted.

8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Luarocks path for amalg and other tools
LUAROCKS_PATH := $(shell luarocks path --lr-path 2>/dev/null)

# Default target
.PHONY: all
all: format lint test build
Expand All @@ -22,12 +25,11 @@ test-matrix-%:
test-%:
./run_tests.sh $*


build/amalg.cache: src/bitn/init.lua
@echo "Generating amalgamation cache..."
@mkdir -p build
@if command -v amalg.lua >/dev/null 2>&1; then \
LUA_PATH="./src/?.lua;./src/?/init.lua;$(LUA_PATH)" lua -lamalg src/bitn/init.lua && mv amalg.cache build || exit 1; \
LUA_PATH="./?.lua;./?/init.lua;./src/?.lua;./src/?/init.lua;$(LUAROCKS_PATH)" lua -lamalg src/bitn/init.lua && mv amalg.cache build || exit 1; \
echo "Generated amalg.cache"; \
else \
echo "Error: amalg not found."; \
Expand All @@ -41,7 +43,7 @@ build/amalg.cache: src/bitn/init.lua
build: build/amalg.cache
@echo "Building single-file distribution..."
@if command -v amalg.lua >/dev/null 2>&1; then \
LUA_PATH="./src/?.lua;./src/?/init.lua;$(LUA_PATH)" amalg.lua -o build/bitn.lua -C ./build/amalg.cache || exit 1;\
LUA_PATH="./?.lua;./?/init.lua;./src/?.lua;./src/?/init.lua;$(LUAROCKS_PATH)" amalg.lua -o build/bitn.lua -C ./build/amalg.cache || exit 1;\
echo "Built build/bitn.lua"; \
VERSION=$$(git describe --exact-match --tags 2>/dev/null || echo "dev"); \
if [ "$$VERSION" != "dev" ]; then \
Expand Down
4 changes: 2 additions & 2 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ echo
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

# Add repository root to Lua's package path
# This allows require() to find modules in the src/tests directories
lua_path="$script_dir/?.lua;$script_dir/?/init.lua;$script_dir/src/?.lua;$script_dir/src/?/init.lua;$script_dir/tests/?.lua;$LUA_PATH"
# This allows require() to find modules in the src/vendor directories
lua_path="$script_dir/?.lua;$script_dir/?/init.lua;$script_dir/src/?.lua;$script_dir/src/?/init.lua;$script_dir/vendor/?.lua;$LUA_PATH"

# Parse command line arguments to determine which modules to run
default_modules=("bit16" "bit32" "bit64")
Expand Down
Loading