quickshell/Justfile

42 lines
1.3 KiB
Makefile
Raw Normal View History

builddir := 'build'
fmt:
2024-02-26 03:22:26 -08:00
find src -type f \( -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0 clang-format -i
lint:
2025-01-07 03:11:19 -08:00
find src -type f -name "*.cpp" -print0 | parallel -j$(nproc) -q0 --no-notice --will-cite --tty --bar clang-tidy --load={{ env_var("TIDYFOX") }}
2024-11-24 02:27:49 -08:00
lint-ci:
2025-01-07 03:11:19 -08:00
find src -type f -name "*.cpp" -print0 | parallel -j$(nproc) -q0 --no-notice --will-cite --tty clang-tidy --load={{ env_var("TIDYFOX") }}
lint-changed:
2025-01-07 03:11:19 -08:00
git diff --name-only HEAD | grep "^.*\.cpp\$" | parallel -j$(nproc) --no-notice --will-cite --tty --bar clang-tidy --load={{ env_var("TIDYFOX") }}
configure target='debug' *FLAGS='':
2024-02-26 03:35:07 -08:00
cmake -GNinja -B {{builddir}} \
2024-03-07 06:00:46 -08: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 06:00:46 -08:00
release: (configure "release") build
clean:
rm -f compile_commands.json
rm -rf {{builddir}}
run *ARGS='': build
{{builddir}}/src/quickshell {{ARGS}}
2024-03-02 05:05:45 -08:00
test *ARGS='': build
2024-03-04 05:04:29 -08:00
ctest --test-dir {{builddir}} --output-on-failure {{ARGS}}
2024-03-07 06:00:46 -08:00
install *ARGS='':
2024-03-04 05:04:29 -08:00
cmake --install {{builddir}} {{ARGS}}