44 lines
868 B
Makefile
44 lines
868 B
Makefile
lua_version := "5.4"
|
|
lua := "lua" + " -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:
|
|
{{ lua }} build/awesomewm.d.tl/init.lua
|
|
|
|
# TODO : how to run a debugger on Teal code?
|
|
debug:
|
|
{{ lua }} debug.lua src/awesomewm.d.tl/init.lua
|