Compare commits

..

3 Commits

Author SHA1 Message Date
joeac f39c4a51dd adds empty build, push rules 2026-07-02 09:35:47 +01:00
joeac 8e857abf29 Merge branch 'main' of https://git.joeac.net/joeac/joeac.net 2026-07-02 09:34:38 +01:00
joeac a2d7299e72 tidy Makefile 2026-07-02 09:23:33 +01:00
2 changed files with 13 additions and 20 deletions
+4 -14
View File
@@ -1,10 +1,5 @@
include make/vars.mk include make/vars.mk
#############
# FUNCTIONS #
#############
install_submake_file = $(shell [ -f "$(module)/install.mk" ] && echo "$(module)/install.mk") install_submake_file = $(shell [ -f "$(module)/install.mk" ] && echo "$(module)/install.mk")
define make_module_rule = define make_module_rule =
@@ -39,11 +34,6 @@ uninstall_$(module): uninstall_openrc_$(module) uninstall_dyndns_$(module)
) )
endef endef
#########
# RULES #
#########
.PHONY: all .PHONY: all
all: $(ENV_RULES) $(MAKE_RULES) $(BUILD_RULES) $(PUSH_RULES) all: $(ENV_RULES) $(MAKE_RULES) $(BUILD_RULES) $(PUSH_RULES)
@@ -63,12 +53,12 @@ $(foreach module,$(MODULES),$(eval $(install_module_rule)))
$(foreach module,$(MODULES),$(eval $(reinstall_module_rule))) $(foreach module,$(MODULES),$(eval $(reinstall_module_rule)))
$(foreach module,$(MODULES),$(eval $(uninstall_module_rule))) $(foreach module,$(MODULES),$(eval $(uninstall_module_rule)))
.PHONY: clean
clean:
$(foreach module,$(MAKE_MODULES),$(MAKE) --directory=$(module) clean;)
include make/container.mk include make/container.mk
include make/openrc.mk include make/openrc.mk
include make/nginx.mk include make/nginx.mk
include make/crontab.mk include make/crontab.mk
include make/dyndns.mk include make/dyndns.mk
.PHONY: clean
clean:
$(foreach module,$(MAKE_MODULES),$(MAKE) --directory=$(module) clean;)
+9 -6
View File
@@ -6,21 +6,24 @@ REGISTRY_DOMAIN := git.joeac.net
REGISTRY_USER := joeac REGISTRY_USER := joeac
container_image_name = $(REGISTRY_DOMAIN)/$(REGISTRY_USER)/$(CONTAINER_PREFIX)joeac.net-$(module) container_image_name = $(REGISTRY_DOMAIN)/$(REGISTRY_USER)/$(CONTAINER_PREFIX)joeac.net-$(module)
is_containerised = $(filter $(COMPOSE_SERVICES),$(module))
define build_module_rule = define build_module_rule =
.PHONY: build_$(module) .PHONY: build_$(module)
build_$(module): make_$(module) $(module).Dockerfile build_$(module): $(if $(is_containerised),make_$(module) $(module).Dockerfile)
IMAGE_PREFIX="$(IMAGE_PREFIX)" podman-compose build $(module) $(if $(is_containerised),\
IMAGE_PREFIX="$(IMAGE_PREFIX)" podman-compose build $(module))
endef endef
define push_module_rule = define push_module_rule =
.PHONY: push_$(module) .PHONY: push_$(module)
push_$(module): login_registry build_$(module) push_$(module): $(if $(is_containerised),login_registry build_$(module))
podman push $(container_image_name) $(if $(is_containerised),\
podman push $(container_image_name))
endef endef
$(foreach module,$(COMPOSE_SERVICES),$(eval $(call build_module_rule))) $(foreach module,$(MODULES),$(eval $(call build_module_rule)))
$(foreach module,$(COMPOSE_SERVICES),$(eval $(call push_module_rule))) $(foreach module,$(MODULES),$(eval $(call push_module_rule)))
.PHONY: login_registry .PHONY: login_registry
login_registry: login_registry: