aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-02-23 18:09:05 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-02-24 18:50:43 -0300
commit93d623fdf9bee70bfae50168ac163825361f38e0 (patch)
tree4d944eee9eebdfc7c639577a685769c470a93a01 /Makefile
parentprofiles: drop paths already in wusc (#6218) (diff)
downloadfirejail-93d623fdf9bee70bfae50168ac163825361f38e0.tar.gz
firejail-93d623fdf9bee70bfae50168ac163825361f38e0.tar.zst
firejail-93d623fdf9bee70bfae50168ac163825361f38e0.zip
build: allow overriding certain tools
Allow overriding the following tools at configure-time and build-time: * codespell * cppcheck * gawk * scan-build For example, instead of hardcoding `gawk`, enable overriding it at configure-time with: ./configure GAWK=/path/to/gawk To override it for a single `make` invocation: make GAWK=/path/to/gawk Also, add default values for the programs that are not found (rather than leaving the variables empty), to make error messages clearer when trying to run them: $ make CPPCHECK= cppcheck-old [...] force --error-exitcode=1 --enable=warning,performance . make: force: No such file or directory $ make CPPCHECK=cppcheck cppcheck-old [...] cppcheck --force --error-exitcode=1 --enable=warning,performance . make: cppcheck: No such file or directory
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 808a9beac..e46eb4949 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,13 @@
2ROOT = . 2ROOT = .
3-include config.mk 3-include config.mk
4 4
5# Default programs
6CC ?= cc
7CODESPELL ?= codespell
8CPPCHECK ?= cppcheck
9GAWK ?= gawk
10SCAN_BUILD ?= scan-build
11
5ifneq ($(HAVE_MAN),no) 12ifneq ($(HAVE_MAN),no)
6MAN_TARGET = man 13MAN_TARGET = man
7endif 14endif
@@ -357,18 +364,18 @@ extras: all
357 364
358.PHONY: cppcheck 365.PHONY: cppcheck
359cppcheck: clean 366cppcheck: clean
360 cppcheck --force --error-exitcode=1 --enable=warning,performance . 367 $(CPPCHECK) --force --error-exitcode=1 --enable=warning,performance .
361 368
362.PHONY: scan-build 369.PHONY: scan-build
363scan-build: clean 370scan-build: clean
364 scan-build $(MAKE) 371 $(SCAN_BUILD) $(MAKE)
365 372
366# TODO: Old codespell versions (such as v2.1.0 in CI) have issues with 373# TODO: Old codespell versions (such as v2.1.0 in CI) have issues with
367# contrib/syscalls.sh 374# contrib/syscalls.sh
368.PHONY: codespell 375.PHONY: codespell
369codespell: 376codespell:
370 @printf 'Running %s...\n' $@ 377 @printf 'Running %s...\n' $@
371 @codespell --ignore-regex 'Manuel|UE|als|chage|creat|doas|ether|isplay|readby|[Ss]hotcut' \ 378 @$(CODESPELL) --ignore-regex 'Manuel|UE|als|chage|creat|doas|ether|isplay|readby|[Ss]hotcut' \
372 -S *.d,*.gz,*.o,*.so \ 379 -S *.d,*.gz,*.o,*.so \
373 -S COPYING,m4 \ 380 -S COPYING,m4 \
374 -S ./contrib/syscalls.sh \ 381 -S ./contrib/syscalls.sh \