aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Mortier <mort@cantab.net>2019-05-01 10:48:49 +0100
committerRichard Mortier <mort@cantab.net>2019-05-01 10:48:49 +0100
commita5a10d59830e24c089f16efb314679230f2cc5ab (patch)
tree335f0d0e67f2604676a47627a21082083e7e7705
parente0899536105fe52b954b6e18b0383f3be279f867 (diff)
downloaddocker-abuild-a5a10d59830e24c089f16efb314679230f2cc5ab.tar.bz2
docker-abuild-a5a10d59830e24c089f16efb314679230f2cc5ab.tar.xz
make: decouple building images from script
-rw-r--r--Makefile14
1 files 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