From a5a10d59830e24c089f16efb314679230f2cc5ab Mon Sep 17 00:00:00 2001 From: Richard Mortier Date: Wed, 1 May 2019 10:48:49 +0100 Subject: make: decouple building images from script --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6b70879..fd5a59d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ -.DEFAULT: build +.DEFAULT: dabuild -IMG = mor1/abuild +ORG = mor1 +IMG = $(ORG)/dabuild VOLS = bin etc lib sbin usr var # BRANCHES := $(shell \ # curl -s https://api.github.com/repos/alpinelinux/aports/branches \ @@ -13,12 +14,17 @@ VOLS = bin etc lib sbin usr var ## let's just manually specify some tags for now TAGS = 2.6 2.7 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 edge -.PHONY: build -build: $(patsubst %, build-%, $(TAGS)) +.PHONY: all +all: images dabuild + +dabuild: dabuild.in sed 's!%%ABUILD_VOLUMES%%!$(VOLS)!;s!%%ABUILD_IMAGE%%!$(IMG)!' \ dabuild.in >| dabuild chmod +x dabuild +.PHONY: images +images: $(patsubst %, build-%, $(TAGS)) + .PHONY: build-% build-%: sed 's/%%ALPINE_TAG%%/$*/' Dockerfile.in >| Dockerfile -- cgit v1.2.3