From ca70b7b6af4420f015cd8bc6523d57c29bf7f0ad Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 9 Oct 2017 14:22:10 +0100 Subject: [PATCH] Update pkg/Makefile and test/pkg/Makefile based on tools/Makefile Using explicit targets is cleaner and easier to follow. Also add `forcepush` to pkg and test/pkg and make `push` explicit. The `dirs` phony was non-existent in all three cases. Likewise `$(DIR)` wasn't used in that way in pkg or test/pkg and is nolonger used in that way in tools. Finally, `clean` was bogus in all cases (tools cleaned a thing which never exists and pkg and test/pkg were a syntax error). Signed-off-by: Ian Campbell --- pkg/Makefile | 9 ++++++--- test/pkg/Makefile | 9 ++++++--- tools/Makefile | 19 ++++++++++++++----- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/pkg/Makefile b/pkg/Makefile index e1a0140e4..0a893c414 100644 --- a/pkg/Makefile +++ b/pkg/Makefile @@ -1,12 +1,15 @@ DIRS = $(shell find . -maxdepth 1 -mindepth 1 -type d) -.PHONY: clean dirs $(DIRS) +.PHONY: push force-push tag forcetag show-tag clean # TODO(ijc) once all switch to `linuxkit pkg` update this to: # linuxkit pkg [--force] $$d # linuxkit pkg show-tag $$d push: - @set -e; for d in $(DIRS); do make -C "$$d"; done + @set -e; for d in $(DIRS); do make -C "$$d" push; done + +forcepush: + @set -e; for d in $(DIRS); do make -C "$$d" forcepush; done tag: @set -e; for d in $(DIRS); do make -C "$$d" tag; done @@ -17,4 +20,4 @@ forcetag: show-tag: @set -e; for d in $(DIRS); do make -C "$$d" show-tag; done -clean: ; +clean: diff --git a/test/pkg/Makefile b/test/pkg/Makefile index 6fa8efb5f..3fe596255 100644 --- a/test/pkg/Makefile +++ b/test/pkg/Makefile @@ -1,8 +1,11 @@ DIRS = $(shell find . -maxdepth 1 -mindepth 1 -type d) -.PHONY: clean dirs $(DIRS) +.PHONY: push forcepush tag forcetag show-tag clean push: - @set -e; for d in $(DIRS); do make -C "$$d"; done + @set -e; for d in $(DIRS); do make -C "$$d" push; done + +forcepush: + @set -e; for d in $(DIRS); do make -C "$$d" forcepush; done tag: @set -e; for d in $(DIRS); do make -C "$$d" tag; done @@ -13,4 +16,4 @@ forcetag: show-tag: @set -e; for d in $(DIRS); do make -C "$$d" show-tag; done -clean: ; +clean: diff --git a/tools/Makefile b/tools/Makefile index 94894d076..3fe596255 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,10 +1,19 @@ DIRS = $(shell find . -maxdepth 1 -mindepth 1 -type d) -.PHONY: clean dirs $(DIRS) +.PHONY: push forcepush tag forcetag show-tag clean -push: $(DIRS) +push: + @set -e; for d in $(DIRS); do make -C "$$d" push; done -$(DIRS): - $(MAKE) -C $@ +forcepush: + @set -e; for d in $(DIRS); do make -C "$$d" forcepush; done + +tag: + @set -e; for d in $(DIRS); do make -C "$$d" tag; done + +forcetag: + @set -e; for d in $(DIRS); do make -C "$$d" forcetag; done + +show-tag: + @set -e; for d in $(DIRS); do make -C "$$d" show-tag; done clean: - rm -f hash