summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2024-03-02 04:49:28 +0000
committerAndrew Clayton <a.clayton@nginx.com>2024-03-09 01:40:24 +0000
commitd23812b8f4376ab05af701e07ad16ff7b1d3bbea (patch)
treeabe811ea93cd7e0bdb0c61dea94855eb3f8fa24c
parent15072fbde9b7d451aa4fde815d59a7454604036c (diff)
downloadunit-d23812b8f4376ab05af701e07ad16ff7b1d3bbea.tar.gz
unit-d23812b8f4376ab05af701e07ad16ff7b1d3bbea.tar.bz2
Allow to disable -Werror at 'make' time
Having -Werror enabled all the time when developing can be a nuisance, allow to disable it by passing E=0 to make, e.g $ make E=0 ... This will set -Wno-error overriding the previously set -Werror. Co-developed-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r--auto/make8
1 files changed, 8 insertions, 0 deletions
diff --git a/auto/make b/auto/make
index 1d54ab40..6c6d7e94 100644
--- a/auto/make
+++ b/auto/make
@@ -63,6 +63,14 @@ ifeq (\$D,1)
CFLAGS += -O0
endif
+# Optionally disable -Werror with
+# make E=0 ...
+E := 1
+
+ifeq (\$E,0)
+ CFLAGS += -Wno-error
+endif
+
END
fi