Nico Huber submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
manibuilder/anita: Factor things out into Makefile.anita

The anita-based NetBSD targets need noisy, per-target handling.
Factor it out into another Makefile.

Change-Id: I0a3ca751b42f1ca8c05d93eb9740bb0ee5cc6d09
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52483
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
---
M util/manibuilder/Makefile
A util/manibuilder/Makefile.anita
2 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/util/manibuilder/Makefile b/util/manibuilder/Makefile
index c0d1eff..5b58b05 100644
--- a/util/manibuilder/Makefile
+++ b/util/manibuilder/Makefile
@@ -12,30 +12,7 @@
stem = $(word 1,$(subst :,$(spc),$(subst \:,$(spc),$(1))))
ident = $(subst :,_,$(subst \:,_,$(1)))

-PKGSRC_MIRROR = http://cdn.netbsd.org/
-NETBSD_MIRROR = http://ftp.de.netbsd.org/
-
-anita\:8.2-amd64-build: PKGSRC_PATH=pub/pkgsrc/packages/NetBSD/amd64/8.2/All
-anita\:8.2-amd64-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-8.2/amd64/
-anita\:8.2-amd64-build: QEMU_DISK_SIZE=2G
-anita\:8.2-amd64-build: QEMU_MEM_SIZE=256M
-
-anita\:7.1-amd64-build: PKGSRC_PATH=pub/pkgsrc/packages/NetBSD/amd64/7.1/All
-anita\:7.1-amd64-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-7.1/amd64/
-anita\:7.1-amd64-build: QEMU_DISK_SIZE=1G
-anita\:7.1-amd64-build: QEMU_MEM_SIZE=128M
-
-anita\:7.1-i386-build: PKGSRC_PATH=pub/pkgsrc/packages/NetBSD/i386/7.1/All
-anita\:7.1-i386-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-7.1/i386/
-anita\:7.1-i386-build: QEMU_DISK_SIZE=1G
-anita\:7.1-i386-build: QEMU_MEM_SIZE=128M
-
-$(addsuffix -build,$(ANITA_TAGS)): %-build: Dockerfile.anita anita-wrapper.sh
- $(QUIET_SETUP)docker build . -f $< -t mani/$* \
- --build-arg PKG_PATH=$(PKGSRC_MIRROR)$(PKGSRC_PATH) \
- --build-arg INST_IMG=$(NETBSD_MIRROR)$(NETBSD_IMAGE) \
- --build-arg DISK_SIZE=$(QEMU_DISK_SIZE) \
- --build-arg MEM_SIZE=$(QEMU_MEM_SIZE)
+include Makefile.anita

define build_template
Dockerfile.$(call ident,$(1)): Dockerfile.$(call stem,$(1)) mani-wrapper.sh
diff --git a/util/manibuilder/Makefile.anita b/util/manibuilder/Makefile.anita
new file mode 100644
index 0000000..e795194
--- /dev/null
+++ b/util/manibuilder/Makefile.anita
@@ -0,0 +1,24 @@
+PKGSRC_MIRROR = http://cdn.netbsd.org/
+NETBSD_MIRROR = http://ftp.de.netbsd.org/
+
+anita\:8.2-amd64-build: PKGSRC_PATH=pub/pkgsrc/packages/NetBSD/amd64/8.2/All
+anita\:8.2-amd64-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-8.2/amd64/
+anita\:8.2-amd64-build: QEMU_DISK_SIZE=2G
+anita\:8.2-amd64-build: QEMU_MEM_SIZE=256M
+
+anita\:7.1-amd64-build: PKGSRC_PATH=pub/pkgsrc/packages/NetBSD/amd64/7.1/All
+anita\:7.1-amd64-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-7.1/amd64/
+anita\:7.1-amd64-build: QEMU_DISK_SIZE=1G
+anita\:7.1-amd64-build: QEMU_MEM_SIZE=128M
+
+anita\:7.1-i386-build: PKGSRC_PATH=pub/pkgsrc/packages/NetBSD/i386/7.1/All
+anita\:7.1-i386-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-7.1/i386/
+anita\:7.1-i386-build: QEMU_DISK_SIZE=1G
+anita\:7.1-i386-build: QEMU_MEM_SIZE=128M
+
+$(addsuffix -build,$(ANITA_TAGS)): %-build: Dockerfile.anita anita-wrapper.sh
+ $(QUIET_SETUP)docker build . -f $< -t mani/$* \
+ --build-arg PKG_PATH=$(PKGSRC_MIRROR)$(PKGSRC_PATH) \
+ --build-arg INST_IMG=$(NETBSD_MIRROR)$(NETBSD_IMAGE) \
+ --build-arg DISK_SIZE=$(QEMU_DISK_SIZE) \
+ --build-arg MEM_SIZE=$(QEMU_MEM_SIZE)

To view, visit change 52483. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I0a3ca751b42f1ca8c05d93eb9740bb0ee5cc6d09
Gerrit-Change-Number: 52483
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged