Skip to content

Commit e866628

Browse files
committed
Makefile cleanup
1 parent 7603793 commit e866628

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

Makefile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,39 +80,35 @@ hadolint:
8080
shellcheck:
8181
@$(ROOT_DIR)/tools/shellcheck -e SC1091 jenkins-support *.sh tests/test_helpers.bash tools/hadolint tools/shellcheck .ci/publish.sh
8282

83-
# Build targets depending on the current OS and architecture
83+
# Build all targets with on the current OS and architecture
8484
build: check-reqs
8585
@set -x; $(bake_base_cli) --set '*.platform=$(OS)/$(ARCH)' $(shell make --silent list)
8686

8787
# Build targets depending on the architecture (Linux only, no multiarch for Windows)
8888
buildarch-%: check-reqs
8989
@$(bake_base_cli) --set '*.platform=linux/$*' $(shell make --silent listarch-$*)
9090

91-
# Build a specific target with the current architecture
91+
# Build a specific target with the current OS and architecture
9292
build-%: check-reqs
9393
@$(call check_image,$*)
9494
@set -x; $(bake_base_cli) --set '*.platform=$(OS)/$(ARCH)' '$*'
9595

9696
# Show all targets
9797
show:
98-
@$(bake_base_cli) --progress=quiet all --print | jq
98+
@make show-all
9999

100100
# Show a specific target
101101
show-%:
102102
@$(bake_base_cli) --progress=quiet '$*' --print | jq
103103

104104
# List tags of all targets
105105
tags:
106-
@make show | jq -r ' .target | to_entries[] | .key as $$name | .value.tags[] | "\(.) (\($$name))"' | LC_ALL=C sort -u
106+
@make tags-all
107107

108108
# List tags of a specific target
109109
tags-%:
110110
@make show-$* | jq -r ' .target | to_entries[] | .key as $$name | .value.tags[] | "\(.) (\($$name))"' | LC_ALL=C sort -u
111111

112-
# List all platforms
113-
platforms:
114-
@make show | jq -r ' .target | to_entries[] | .key as $$name | .value.platforms[] | "\($$name):\(.)"' | LC_ALL=C sort -u
115-
116112
# List platforms of a specific target
117113
platforms-%:
118114
@make show-$* | jq -r ' .target | to_entries[] | .key as $$name | .value.platforms[] | "\($$name):\(.)"' | LC_ALL=C sort -u
@@ -123,7 +119,7 @@ list: check-reqs
123119

124120
# Return the list of targets depending on the architecture (Linux only, no multiarch for Windows)
125121
listarch-%: check-reqs
126-
@make --silent show | jq -r '.target | path(.. | select(.platforms[] | contains("linux/$*"))?) | add'
122+
@set -x; make --silent show | jq -r '.target | path(.. | select(.platforms[] | contains("linux/$*"))?) | add'
127123

128124
# Ensure bats exists in the current folder
129125
bats:

0 commit comments

Comments
 (0)