From 1baa860c2d1877b35af93f1e0d89bdd26b4b04f7 Mon Sep 17 00:00:00 2001 From: Ivan Davidov Date: Wed, 4 May 2016 21:38:11 +0300 Subject: [PATCH] Added helper 'make' target which automatically produces 'tar.xz' source archive. The 'tar.xz' format will replace the current 'zip' format. --- .gitignore | 4 +--- src/Makefile | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 074f16988..ec9b6840f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,9 +6,7 @@ /src/source/** /src/work/** -/src/*.iso -/src/*.img -/src/*.log +/src/minimal_linux_live* /docs/mdbook /docs/book/** diff --git a/src/Makefile b/src/Makefile index f7bd1fabe..39ce03ef8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -27,12 +27,23 @@ qemu: @echo "Launching QEMU..." @if [ "$(shell uname -m)" = "x86_64" ]; then sh qemu64.sh; else sh qemu32.sh; fi +src: + @echo "Generating source archive..." + @rm -f minimal_linux_live_*_src.tar.xz + @mkdir -p work + @sh 01_prepare_src.sh 1>/dev/null + @$(eval DATE_PARSED := $(shell LANG=en_US ; date +"%d-%b-%Y")) + @cd work/src && tar -cpf - `ls -A` | xz - > ../../minimal_linux_live_$(DATE_PARSED)_src.tar.xz && cd ../.. + @echo "Source archive: minimal_linux_live_$(DATE_PARSED)_src.tar.xz" + help: @echo "" @echo " make all clean the workspace and then generate \"minimal_linux_live.iso\"" @echo "" @echo " make clean remove all generated files" @echo "" + @echo " make src generate 'tar.xz' source archive" + @echo "" @echo " make qemu run \"Minimal Linux Live\" in qemu" @echo "" @echo " make help this is the default target"