diff options
author | Daniil Baturin <daniil@baturin.org> | 2015-12-18 06:57:25 -0500 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2015-12-18 06:57:25 -0500 |
commit | a0eefcc5e54fee72074a9d1dc993e251c8b897ad (patch) | |
tree | 448ea5cc0cf52b835db8b84cab6e0beb4fc677e7 /Makefile | |
parent | 8688ace193d7a41e60fdf5ec5d092c7f31870207 (diff) | |
download | vyos-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-- | Makefile | 27 |
1 files changed, 23 insertions, 4 deletions
@@ -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/* |