From 739f667e2d972a51790d8f23e9fd26f54f98293f Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Wed, 15 Aug 2018 02:14:32 +0000 Subject: [PATCH 1/4] [makefile] Rename Makefile to Makefile.work Signed-off-by: Ying Xie --- Makefile => Makefile.work | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Makefile => Makefile.work (100%) diff --git a/Makefile b/Makefile.work similarity index 100% rename from Makefile rename to Makefile.work From 073f67cf1052c9ee17f444f56d3930ffb5075bb9 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Wed, 15 Aug 2018 02:21:35 +0000 Subject: [PATCH 2/4] [makefile] Add new make file to avoid extra step * avoiding calling "make stretch" Signed-off-by: Ying Xie --- Makefile | 14 ++++++++++++++ README.md | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000000..c07ddc4a0e6 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +# SONiC make file + +%:: + @echo "+++ --- Making $@ --- +++" + BLDENV=stretch make -f Makefile.work stretch + make -f Makefile.work $@ + +stretch: + @echo "+++ Making $@ +++" + BLDENV=stretch make -f Makefile.work stretch + +clean reset init configure : + @echo "+++ Making $@ +++" + make -f Makefile.work $@ diff --git a/README.md b/README.md index e09c4e2c280..9b667661cd8 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ To build SONiC installer image and docker images, run the following commands: # Execute make configure once to configure ASIC make configure PLATFORM=[ASIC_VENDOR] - # build debian stretch required targets + # build debian stretch required targets (optional) BLDENV=stretch make stretch # build SONiC image From 34471a8e212f85ab5c1a226ecb5157bfeeb4b4a3 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Thu, 16 Aug 2018 15:58:42 +0000 Subject: [PATCH 3/4] [makefile] allow skipping "make stretch" Signed-off-by: Ying Xie --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index c07ddc4a0e6..6831be979b9 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,19 @@ # SONiC make file +NOSTRETCH ?= 0 + %:: @echo "+++ --- Making $@ --- +++" +ifeq ($(NOSTRETCH), 0) BLDENV=stretch make -f Makefile.work stretch +endif make -f Makefile.work $@ stretch: @echo "+++ Making $@ +++" +ifeq ($(NOSTRETCH), 0) BLDENV=stretch make -f Makefile.work stretch +endif clean reset init configure : @echo "+++ Making $@ +++" From 499f01f25cd941bc25364cb953b233bbcc977f3e Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Thu, 16 Aug 2018 16:22:54 +0000 Subject: [PATCH 4/4] [makefile] add all PHONY targets to pass through list Signed-off-by: Ying Xie --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6831be979b9..4bc42cd3728 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,6 @@ ifeq ($(NOSTRETCH), 0) BLDENV=stretch make -f Makefile.work stretch endif -clean reset init configure : +clean reset init configure showtag sonic-slave-build sonic-slave-bash : @echo "+++ Making $@ +++" make -f Makefile.work $@