diff options
| author | Joe Carstairs <me@joeac.net> | 2026-07-02 09:41:07 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-07-02 09:41:07 +0100 |
| commit | 5fd15c706b2f05b20f6441d07c68141d93e30ca8 (patch) | |
| tree | d0138f3033e5cf797e20c7558c534733775db5e3 /make/container.mk | |
| parent | 5bd502c72f79ebfb466c8378e48138596ff453fb (diff) | |
build_module only requires Dockerfile if one exists
Diffstat (limited to 'make/container.mk')
| -rw-r--r-- | make/container.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/make/container.mk b/make/container.mk index 84a6483..5d8a47b 100644 --- a/make/container.mk +++ b/make/container.mk @@ -7,10 +7,11 @@ REGISTRY_USER := joeac container_image_name = $(REGISTRY_DOMAIN)/$(REGISTRY_USER)/$(CONTAINER_PREFIX)joeac.net-$(module) is_containerised = $(filter $(COMPOSE_SERVICES),$(module)) +has_dockerfile = $(shell test -f $(module).Dockerfile) define build_module_rule = .PHONY: build_$(module) -build_$(module): $(if $(is_containerised),make_$(module) $(module).Dockerfile) +build_$(module): $(if $(is_containerised),make_$(module) $(if $(has_dockerfile),$(module).Dockerfile)) $(if $(is_containerised),\ IMAGE_PREFIX="$(IMAGE_PREFIX)" podman-compose build $(module)) endef |
