manibuilder: Move environment overrides into new Makefile.env
Change-Id: I7e1db64ab04c99a472770123865589278778e5f3
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/73775
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/util/manibuilder/Makefile b/util/manibuilder/Makefile
index 5611de8..3ae1e15 100644
--- a/util/manibuilder/Makefile
+++ b/util/manibuilder/Makefile
@@ -16,6 +16,7 @@
ident = $(subst /,_,$(subst :,_,$(subst \:,_,$(1))))
+include Makefile.env
include Makefile.anita
# $(1): mani tag
@@ -45,14 +46,6 @@
[ $$(docker image ls -q mani/$*) ] \
|| $(MAKE) $*-build $(if $(QUIET_SETUP),>/dev/null 2>/dev/null)
-$(ALMALINUX_TAGS) $(filter centos%,$(MULTIARCH_TAGS)): CC=cc
-djgpp\:6.1.0: CC=ccache i586-pc-msdosdjgpp-gcc
-djgpp\:6.1.0: STRIP=i586-pc-msdosdjgpp-strip
-djgpp\:6.1.0: LIBS_BASE=../
-djgpp\:6.1.0: MAKEARGS+=strip CONFIG_JLINK_SPI=no
-$(filter alpine% centos%,$(MULTIARCH_TAGS)): MAKEARGS+=CONFIG_JLINK_SPI=no
-$(filter %-xenial %-stretch,$(MULTIARCH_TAGS)): MAKEARGS+=CONFIG_JLINK_SPI=no
-$(filter centos%,$(MULTIARCH_TAGS)): MAKEARGS+=WARNERROR=no
$(ALL_TAGS): export QUIET_SETUP=$(QUIET_TEST)
$(ALL_TAGS): export TEST_REMOTE?=$(if $(TEST_LOCAL),\
git://mani-git/flashrom.git,\
diff --git a/util/manibuilder/Makefile.env b/util/manibuilder/Makefile.env
new file mode 100644
index 0000000..6a352f3
--- /dev/null
+++ b/util/manibuilder/Makefile.env
@@ -0,0 +1,15 @@
+# No ccache
+$(ALMALINUX_TAGS) $(filter centos\:%, $(MULTIARCH_TAGS)): CC=cc
+
+# DJGPP is very special
+djgpp\:6.1.0: CC=ccache i586-pc-msdosdjgpp-gcc
+djgpp\:6.1.0: STRIP=i586-pc-msdosdjgpp-strip
+djgpp\:6.1.0: LIBS_BASE=../
+djgpp\:6.1.0: MAKEARGS+=strip CONFIG_JLINK_SPI=no
+
+# Compiler doesn't like simplified initializers, e.g. `= { 0 };`
+$(filter centos\:%, $(MULTIARCH_TAGS)): MAKEARGS+=WARNERROR=no
+
+# No libjaylink
+$(filter alpine\:% centos\:%, $(MULTIARCH_TAGS)): MAKEARGS+=CONFIG_JLINK_SPI=no
+$(filter %-xenial %-stretch, $(MULTIARCH_TAGS)): MAKEARGS+=CONFIG_JLINK_SPI=no