From 3979b25dcf137600b6ba7ccd361ae78515c012e8 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 6 Oct 2022 12:08:40 -0400 Subject: T3664: initial implementation of the build flavor system --- Makefile | 72 +++------------------------------------------------------------- 1 file changed, 3 insertions(+), 69 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2b57ff79..74b17c7c 100644 --- a/Makefile +++ b/Makefile @@ -7,34 +7,11 @@ all: @echo "Make what specifically?" @echo "The most common target is 'iso'" -.PHONY: check_build_config -check_build_config: - @scripts/check-config - -.PHONY: prepare -prepare: - @set -e - @echo "Starting VyOS ISO image build" - - rm -rf build/config/* - mkdir -p build/config - cp -r data/live-build-config/* build/config/ - @scripts/live-build-config - @scripts/import-local-packages - - @scripts/make-version-file - - @scripts/build-flavour - .PHONY: iso .ONESHELL: -iso: check_build_config clean prepare - @echo "It's not like I'm building this specially for you or anything!" - cd $(build_dir) +iso: clean set -o pipefail - lb build 2>&1 | tee build.log; if [ $$? -ne 0 ]; then exit 1; fi - cd .. - @scripts/copy-image + @./build-vyos-image iso exit 0 .PHONY: prepare-package-env @@ -44,50 +21,6 @@ prepare-package-env: @scripts/pbuilder-config @scripts/pbuilder-setup -.PHONY: AWS -.ONESHELL: -AWS: clean prepare - @set -e - @echo "It's not like I'm building this specially for you or anything!" - mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d - cp tools/cloud-init/AWS/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ - cp tools/cloud-init/AWS/cloud-init.list.chroot build/config/package-lists/ - cp -f tools/cloud-init/AWS/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ - cd $(build_dir) - lb build 2>&1 | tee build.log - cd .. - @scripts/copy-image - -.PHONY: vep4600 -.ONESHELL: -vep4600: check_build_config clean prepare - @set -e - @echo "It's not like I'm building this specially for you or anything!" - mkdir -p build/config/includes.chroot/etc/systemd/network - mkdir -p build/config/includes.chroot/usr/share/initramfs-tools/hooks - cp tools/dell/90-vep.chroot build/config/hooks/live/ - cp tools/dell/vep4600/*.link build/config/includes.chroot/etc/systemd/network/ - cp tools/dell/vep-hook build/config/includes.chroot/usr/share/initramfs-tools/hooks/ - cd $(build_dir) - lb build 2>&1 | tee build.log - cd .. - @scripts/copy-image - -.PHONY: vep1400 -.ONESHELL: -vep1400: check_build_config clean prepare - @set -e - @echo "It's not like I'm building this specially for you or anything!" - mkdir -p build/config/includes.chroot/etc/systemd/network - mkdir -p build/config/includes.chroot/usr/share/initramfs-tools/hooks - cp tools/dell/90-vep.chroot build/config/hooks/live/ - cp tools/dell/vep1400/*.link build/config/includes.chroot/etc/systemd/network/ - cp tools/dell/vep-hook build/config/includes.chroot/usr/share/initramfs-tools/hooks/ - cd $(build_dir) - lb build 2>&1 | tee build.log - cd .. - @scripts/copy-image - .PHONY: checkiso .ONESHELL: checkiso: @@ -125,6 +58,7 @@ testraid: checkiso .ONESHELL: clean: @set -e + mkdir -p $(build_dir) cd $(build_dir) lb clean -- cgit v1.2.3