diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-04-03 02:24:44 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-04-30 19:53:25 +0200 |
commit | a82aaca13dabe61316e6393d321300dd451341b6 (patch) | |
tree | 881c145aafcd11cb4c7f13bb52a33f81323a9699 /Makefile | |
parent | acaa21bc4a6f4cbac10247f43688157d03002246 (diff) |
Makefile: Use bash(1) with -Eeuo pipefail
sh(1) is not enough for the complex pipelines we're using.
Especially the one for clang-tidy(1) doesn't fail when the linter
fails. There's probably a workaround using sh(1), but is it worth
it? If so, maybe someone can help writing it.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -28,6 +28,9 @@ # ######################################################################## +SHELL := /bin/bash -Eeuo pipefail + + MAKEFLAGS += --no-print-directory MAKEFLAGS += --warn-undefined-variables @@ -331,8 +334,7 @@ $(_UNITS_c): $$(@D) | $(MAN) -P cat -l - \ | sed '/^[^ ]/d' \ | sed 's/^ //' \ - >$@ \ - || exit $$? + >$@ $(_UNITS_o): $(_SRCDIR)/%.o: $(_SRCDIR)/%.c $(info CC $@) @@ -371,7 +373,7 @@ lint := $(foreach x,$(linters),lint-$(x)) $(_LINT_clang-tidy): %.lint.clang-tidy.touch: %.c $(info LINT (clang-tidy) $@) $(CLANG-TIDY) $(CLANG-TIDYFLAGS) $< -- $(CPPFLAGS) $(CFLAGS) 2>&1 \ - | sed '/generated\.$$/d' || exit $$? + | sed '/generated\.$$/d' touch $@ $(_LINT_iwyu): %.lint.iwyu.touch: %.c @@ -413,7 +415,7 @@ lint: $(lint) # The sed removes the lines "Content-type: text/html\n\n" $(_HTMLPAGES): $(_HTMLDIR)/%.html: $(MANDIR)/% | $$(@D)/. $(info MAN2HTML $@) - $(MAN2HTML) $(MAN2HTMLFLAGS) $< | sed -e 1,2d >$@ || exit $$? + $(MAN2HTML) $(MAN2HTMLFLAGS) $< | sed -e 1,2d >$@ $(_HTMLDIRS): %/.: | $$(dir %). $(_HTMLDIR)/. |