1
2# the base of where these containers will appear
3REGISTRY := registry.gitlab.com/xen-project/xen
4CONTAINERS = $(subst .dockerfile,,$(wildcard */*.dockerfile))
5
6help:
7	@echo "Builds containers for building Xen based on different distros"
8	@echo "To build one run 'make DISTRO/VERSION'. Available containers:"
9	@$(foreach file,$(sort $(CONTAINERS)),echo ${file};)
10	@echo "To push container builds, set the env var PUSH"
11
12%: %.dockerfile ## Builds containers
13	docker build -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D)
14	@if [ ! -z $${PUSH+x} ]; then \
15		docker push $(REGISTRY)/$(@D):$(@F); \
16	fi
17
18.PHONY: all
19all: $(CONTAINERS)
20