quickshell/Justfile

36 lines
926 B
Makefile
Raw Permalink Normal View History

builddir := 'build'
fmt:
2024-02-26 11:22:26 +00:00
find src -type f \( -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0 clang-format -i
lint:
2024-02-26 11:22:26 +00:00
find src -type f -name "*.cpp" -print0 | parallel -q0 --eta clang-tidy --load={{ env_var("TIDYFOX") }}
configure target='debug' *FLAGS='':
2024-02-26 11:35:07 +00:00
cmake -GNinja -B {{builddir}} \
2024-03-07 14:00:46 +00:00
-DCMAKE_BUILD_TYPE={{ if target == "debug" { "Debug" } else { "RelWithDebInfo" } }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON {{FLAGS}}
ln -sf {{builddir}}/compile_commands.json compile_commands.json
_configure_if_clean:
@if ! [ -d {{builddir}} ]; then just configure; fi
build: _configure_if_clean
cmake --build {{builddir}}
2024-03-07 14:00:46 +00:00
release: (configure "release") build
clean:
rm -f compile_commands.json
rm -rf {{builddir}}
run *ARGS='': build
{{builddir}}/src/quickshell {{ARGS}}
2024-03-02 13:05:45 +00:00
test *ARGS='': build
2024-03-04 13:04:29 +00:00
ctest --test-dir {{builddir}} --output-on-failure {{ARGS}}
2024-03-07 14:00:46 +00:00
install *ARGS='':
2024-03-04 13:04:29 +00:00
cmake --install {{builddir}} {{ARGS}}