]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Makefile: Use bash(1) with -Eeuo pipefail
authorAlejandro Colomar <alx.manpages@gmail.com>
Sun, 3 Apr 2022 00:24:44 +0000 (02:24 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Sat, 30 Apr 2022 17:53:25 +0000 (19:53 +0200)
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>
Makefile

index 60a8a3a0eb534225d62105502ba4b4e3b3f94720..38ea89c697bd21a0ae5ab61f4f46f1ae8a16e13a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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)/.