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>
This commit is contained in:
Andrew Clayton 2024-03-02 04:49:28 +00:00
parent 15072fbde9
commit d23812b8f4

View file

@ -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