awesomewm.d.tl/justfile

50 lines
1.0 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
# TODO : how to run a debugger on Teal code?
debug:
{{ lua }} debug.lua build/awesomewm.d.tl/init.lua
debug-gen:
cyan gen --output set_paths.lua --gen-compat "off" set_paths.tl
sed -i 's/"src\/awesomewm.d.tl"/"build\/awesomewm.d.tl"/g' set_paths.lua
stylua set_paths.lua