summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-12-18 06:57:25 -0500
committerDaniil Baturin <daniil@baturin.org>2015-12-18 06:57:25 -0500
commita0eefcc5e54fee72074a9d1dc993e251c8b897ad (patch)
tree448ea5cc0cf52b835db8b84cab6e0beb4fc677e7 /Makefile
parent8688ace193d7a41e60fdf5ec5d092c7f31870207 (diff)
downloadvyos-build-a0eefcc5e54fee72074a9d1dc993e251c8b897ad.tar.gz
vyos-build-a0eefcc5e54fee72074a9d1dc993e251c8b897ad.zip
Extend the makefile.
Split the 'iso' target into 'prepare' and 'iso' so it's possible to debug the preparation stage without having to start an actual ISO build. Add build and clean stages. Also add 'purge' target that "factory resets" the build environment. Add some tsun-tsun feel to the build log.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 23 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 19021376..1ded0c8a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,12 @@
+build_dir := build
+
.PHONY: all
all:
@echo "Make what specifically?"
@echo "The most common target is 'iso'"
-.PHONY: iso
-iso:
+.PHONY: prepare
+prepare:
@echo "Starting VyOS ISO image build"
@scripts/check-build-env
@@ -13,6 +15,23 @@ iso:
@scripts/live-build-config
cp -r data/includes.chroot/* build/config/includes.chroot/
- @echo "The rest is not yet implemented ;)"
+.PHONY: iso
+.ONESHELL:
+iso: prepare
+ @echo "It's not like I'm building this specially for you or anything!"
+ cd $(build_dir)
+ lb build 2>&1 | tee build.log
+ @echo "VyOS ISO build successful"
+
+.PHONY: clean
+.ONESHELL:
+clean:
+ cd $(build_dir)
+ lb clean
+
+ rm -f config/binary config/bootstrap config/chroot config/common config/source
+ rm -f build.log
- @echo "ISO build successful"
+.PHONY: purge
+purge:
+ rm -rf build/*