diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -2,6 +2,13 @@ | |||
2 | ROOT = . | 2 | ROOT = . |
3 | -include config.mk | 3 | -include config.mk |
4 | 4 | ||
5 | # Default programs | ||
6 | CC ?= cc | ||
7 | CODESPELL ?= codespell | ||
8 | CPPCHECK ?= cppcheck | ||
9 | GAWK ?= gawk | ||
10 | SCAN_BUILD ?= scan-build | ||
11 | |||
5 | ifneq ($(HAVE_MAN),no) | 12 | ifneq ($(HAVE_MAN),no) |
6 | MAN_TARGET = man | 13 | MAN_TARGET = man |
7 | endif | 14 | endif |
@@ -357,18 +364,24 @@ extras: all | |||
357 | 364 | ||
358 | .PHONY: cppcheck | 365 | .PHONY: cppcheck |
359 | cppcheck: clean | 366 | cppcheck: clean |
360 | cppcheck --force --error-exitcode=1 --enable=warning,performance . | 367 | $(CPPCHECK) --force --error-exitcode=1 --enable=warning,performance \ |
368 | -i src/firejail/checkcfg.c -i src/firejail/main.c . | ||
369 | |||
370 | # For cppcheck 1.x; see .github/workflows/check-c.yml | ||
371 | .PHONY: cppcheck-old | ||
372 | cppcheck-old: clean | ||
373 | $(CPPCHECK) --force --error-exitcode=1 --enable=warning,performance . | ||
361 | 374 | ||
362 | .PHONY: scan-build | 375 | .PHONY: scan-build |
363 | scan-build: clean | 376 | scan-build: clean |
364 | scan-build $(MAKE) | 377 | $(SCAN_BUILD) --status-bugs $(MAKE) |
365 | 378 | ||
366 | # TODO: Old codespell versions (such as v2.1.0 in CI) have issues with | 379 | # TODO: Old codespell versions (such as v2.1.0 in CI) have issues with |
367 | # contrib/syscalls.sh | 380 | # contrib/syscalls.sh |
368 | .PHONY: codespell | 381 | .PHONY: codespell |
369 | codespell: | 382 | codespell: |
370 | @printf 'Running %s...\n' $@ | 383 | @printf 'Running %s...\n' $@ |
371 | @codespell --ignore-regex 'Manuel|UE|als|chage|creat|doas|ether|isplay|readby|[Ss]hotcut' \ | 384 | @$(CODESPELL) --ignore-regex 'Manuel|UE|als|chage|creat|doas|ether|isplay|readby|[Ss]hotcut' \ |
372 | -S *.d,*.gz,*.o,*.so \ | 385 | -S *.d,*.gz,*.o,*.so \ |
373 | -S COPYING,m4 \ | 386 | -S COPYING,m4 \ |
374 | -S ./contrib/syscalls.sh \ | 387 | -S ./contrib/syscalls.sh \ |