From e5264fe54cae7c9c7f0754728af9fbd3277262ec Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Sun, 18 Feb 2018 22:10:46 +0000 Subject: [PATCH] add dist target --- .gitignore | 1 + Makefile | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 77015e4..f5232ad 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build *.pfs0 *.nacp *.nro +*.bz2 diff --git a/Makefile b/Makefile index f037d37..ad29a37 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,13 @@ -MAKEFILES := $(shell find . -mindepth 2 -name Makefile) - -all: - @for i in $(MAKEFILES); do $(MAKE) -C `dirname $$i` || exit 1; done; - -clean: - @for i in $(MAKEFILES); do $(MAKE) -C `dirname $$i` clean || exit 1; done; +MAKEFILES := $(shell find . -mindepth 2 -name Makefile) + +DATESTRING := $(shell date +%Y)$(shell date +%m)$(shell date +%d) + +all: + @for i in $(MAKEFILES); do $(MAKE) -C `dirname $$i` || exit 1; done; + +clean: + @rm -f *.bz2 + @for i in $(MAKEFILES); do $(MAKE) -C `dirname $$i` clean || exit 1; done; + +dist: clean + @tar -cvjf switch-examples-$(DATESTRING).tar.bz2 *