Move all commonly modified variables to config.mk

This commit is contained in:
Alex D. 2024-10-14 09:22:51 +00:00
parent 2e80cbb967
commit bd1dcc8ab0
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
2 changed files with 5 additions and 9 deletions

View File

@ -1,7 +1,5 @@
include config.mk
.DEFAULT_GOAL := all
# Disabled due to https://github.com/containers/buildah/issues/5581
#REPO_STAMP := push-stamp
#REPO_PATH := repo/
@ -17,9 +15,6 @@ include config.mk
# oci:${REPO_PATH}:$*:latest
# touch $@
MANIFEST_FILE = ${IMAGE_DIR}/manifest.json
BUILD_INSTRUCTIONS = Containerfile
# Autogenerated lists
CONTAINERS := $(shell find ./ -name '${BUILD_INSTRUCTIONS}' -exec 'dirname' '{}' ';' | cut -d'/' -f2-)
IMAGE_DIRS := $(addsuffix /${IMAGE_DIR},${CONTAINERS})
@ -31,9 +26,6 @@ MANIFESTS := $(addsuffix /${MANIFEST_FILE},${CONTAINERS})
# Inserting literal commas into function calls without interpreting them as delimiters
, := ,
# Build all containers in order by default
all: unified
unified: $(MANIFESTS) # $(REPO_STAMPS)
localbuild: $(BUILD_IDS)
@ -48,7 +40,7 @@ localbuild: $(BUILD_IDS)
%/${BUILD_ID_OUT}: %/${BUILD_INSTRUCTIONS}
buildah build \
--jobs 0 \
--network=none \
--network=${CONTAINER_NETWORK} \
--logfile=$*/${BUILD_LOG} \
-t $*:latest \
--iidfile $@ \

View File

@ -1,5 +1,9 @@
IMAGE_DIR := image
BUILD_ID_OUT := build_id
BUILD_LOG := build_log
MANIFEST_FILE := ${IMAGE_DIR}/manifest.json
BUILD_INSTRUCTIONS := Containerfile
CONTAINER_NETWORK := host
.DEFAULT_GOAL := unified
include */config.mk