57 lines
1.1 KiB
Makefile
57 lines
1.1 KiB
Makefile
lua_version := "5.4"
|
|
lua := "lua" + " -l set_paths"
|
|
|
|
tl := "tl run" + " -l set_paths"
|
|
|
|
rocks_tree := "lua_modules"
|
|
rockspec_file := "rockspecs/awesomewm.d.tl-dev-1.rockspec"
|
|
|
|
lua_targets := `find src/ -type f -iname '*.lua' | xargs` + " " + `ls *.lua | xargs`
|
|
teal_targets := `find src/ types/ -type f -iname '*.tl' | xargs`
|
|
|
|
install:
|
|
luarocks \
|
|
--lua-version {{ lua_version }} \
|
|
install \
|
|
--tree {{ rocks_tree }} \
|
|
--only-deps \
|
|
{{ rockspec_file }}
|
|
|
|
uninstall:
|
|
rm -rf {{ rocks_tree }}
|
|
|
|
check-lua *FLAGS:
|
|
luacheck {{ lua_targets }} {{ FLAGS }}
|
|
|
|
check-teal:
|
|
cyan check {{ teal_targets }}
|
|
|
|
check-format:
|
|
stylua --check {{ lua_targets }}
|
|
|
|
check: check-lua check-format check-teal
|
|
|
|
build:
|
|
cyan build
|
|
|
|
clean:
|
|
rm -rf build
|
|
|
|
run:
|
|
{{ tl }} src/awesomewm.d.tl/init.tl
|
|
|
|
validate:
|
|
cd generated && cyan \
|
|
check \
|
|
--global-env-def "global_env" \
|
|
awesomerc.tl
|
|
# `find . -type f -iname '*.d.tl' | xargs`
|
|
|
|
test PATTERN="_spec":
|
|
busted --pattern={{ PATTERN }}
|
|
|
|
# Requires a patched version of luacov (https://github.com/lunarmodules/luacov/issues/98#issuecomment-1530491759)
|
|
coverage:
|
|
busted --run=coverage
|
|
luacov
|