From 57155a6b9f923f7f86b4ce168b4ba318c1d75f5a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 7 Apr 2021 03:19:27 +0300 Subject: Makefile: best practices --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a9a743c..fe94cd5 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ # Basically a collection of really small shell scripts. MAKEFLAGS += --no-builtin-rules --no-builtin-variables --warn-undefined-variables +unexport MAKEFLAGS .DEFAULT_GOAL := all .DELETE_ON_ERROR: .SUFFIXES: @@ -45,8 +46,6 @@ ifdef DOCKER_PASSWORD $(eval $(call noexpand,DOCKER_PASSWORD)) endif -curl := curl --silent --show-error --location --dump-header - --connect-timeout 20 - .PHONY: all all: build @@ -130,11 +129,13 @@ compose/push: check-push compose/build # The simple way to build multiarch repos is `docker buildx`. binfmt_image := docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d + .PHONY: fix-binfmt -# Re-register binfmt_misc formats with the F flag (required e.g. on Bionic): fix-binfmt: docker run --rm --privileged '$(call escape,$(binfmt_image))' +curl := curl --silent --show-error --location --dump-header - --connect-timeout 20 + buildx_url := https://github.com/docker/buildx/releases/download/$(BUILDX_VERSION)/buildx-$(BUILDX_VERSION).linux-amd64 .PHONY: buildx/install -- cgit v1.2.3