summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2020-05-01 16:48:07 +0200
committerSebastiaan van Stijn <github@gone.nl>2020-05-01 16:48:07 +0200
commita4400d328c5a040193483d03d7691a6f79d49bf1 (patch)
tree42fa75d748cfec2f39c303c6220c2300886d4fbf /Makefile
parentfd784ce7c10376247c08dae2083c07ea6300588f (diff)
downloaddocker-a4400d328c5a040193483d03d7691a6f79d49bf1.tar.gz
Makefile: remove empty targets, and slight refactor
The empty `binary:`, `dynbinary:`, and `cross:` targets at the top were only useful to provide the description for `make help`. This patch splits the actual `binary`, `dynbinary`, and `cross` targets to separate lines, introducing some slight duplicated code, but making it slightly easier to read (and removing the "empty" targets). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 9 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 67a6fa5652..4ad8c8ab85 100644
--- a/Makefile
+++ b/Makefile
@@ -168,15 +168,9 @@ VERSION_AUTOGEN_ARGS = --build-arg VERSION --build-arg DOCKER_GITCOMMIT --build-
default: binary
-all: build ## validate all checks, build linux binaries, run all tests\ncross build non-linux binaries and generate archives
+all: build ## validate all checks, build linux binaries, run all tests,\ncross build non-linux binaries, and generate archives
$(DOCKER_RUN_DOCKER) bash -c 'hack/validate/default && hack/make.sh'
-binary: ## build statically linked linux binaries
-dynbinary: ## build dynamically linked linux binaries
-cross: ## cross build the binaries for darwin, freebsd and\nwindows
-
-cross: BUILD_OPTS += --build-arg CROSS=true --build-arg DOCKER_CROSSPLATFORMS
-
# This is only used to work around read-only bind mounts of the source code into
# binary build targets. We end up mounting a tmpfs over autogen which allows us
# to write build-time generated assets even though the source is mounted read-only
@@ -184,7 +178,14 @@ cross: BUILD_OPTS += --build-arg CROSS=true --build-arg DOCKER_CROSSPLATFORMS
autogen:
mkdir -p autogen
-binary dynbinary cross: buildx autogen
+binary: buildx autogen ## build statically linked linux binaries
+ $(BUILD_CMD) $(BUILD_OPTS) --output=bundles/ --target=$@ $(VERSION_AUTOGEN_ARGS) .
+
+dynbinary: buildx autogen ## build dynamically linked linux binaries
+ $(BUILD_CMD) $(BUILD_OPTS) --output=bundles/ --target=$@ $(VERSION_AUTOGEN_ARGS) .
+
+cross: BUILD_OPTS += --build-arg CROSS=true --build-arg DOCKER_CROSSPLATFORMS
+cross: buildx autogen ## cross build the binaries for darwin, freebsd and\nwindows
$(BUILD_CMD) $(BUILD_OPTS) --output=bundles/ --target=$@ $(VERSION_AUTOGEN_ARGS) .
bundles: