Aller au contenu

shell_makefile.mk

1. Overridable variables

Note

you can use/override/extend these variables in your own Makefile.

1.1 SHELLCHECK

This variable must be specifically overriden BEFORE incuding any common makefiles

shellcheck linter configuration:
AUTO    => auto-download shellcheck tool
(empty) => disable shellcheck linter
(path)  => disable auto-download and use this binary
  • Default: AUTO

1.2 SHELLCHECK_ARGS

shellcheck linter extra options
  • Default: (empty)

1.3 SHELLCHECK_URL

shellcheck download url
  • Default: https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz

1.4 SHELLCHECK_FILES

shellcheck files to check
(by default, all *.sh files are checked)
  • Default: $(shell find "$(ROOT_DIR)" -type f -name "*.sh" |grep -v "^$(ROOT_DIR)/\.tools/" |grep -v "^$(ROOT_DIR)/\.tmp/" |grep "[a-zA-Z0-9]" |xargs)

2. Targets ready to use

Note

You can't override these targets but you can use them!

2.1 lint_shellcheck

Lint the code with shellcheck