]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
crossbuild: update makefiles for new file locations
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Wed, 21 Jun 2023 09:35:22 +0000 (10:35 +0100)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Wed, 1 May 2024 23:02:52 +0000 (00:02 +0100)
Makefile
scripts/docker/crossbuild.mk [moved from scripts/docker/crossbuild/crossbuild.mk with 93% similarity]

index f9904bfc95666dafb6fe394d57fcba8be6f67fa9..77bb24bb99a0ebe9e191a72a15c74af0431da356 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ endif
 #  there's no point in requiring the developer to run configure
 #  *before* making packages.
 #
-ifeq "$(filter deb rpm pkg_version crossbuild freeradius-server-%,$(MAKECMDGOALS))" ""
+ifeq "$(filter deb rpm pkg_version crossbuild.% freeradius-server-%,$(MAKECMDGOALS))" ""
   $(if $(wildcard Make.inc),,$(error Missing 'Make.inc' Run './configure [options]' and retry))
   include Make.inc
 else
@@ -114,9 +114,7 @@ PROTOCOLS    := \
 #  If we're building packages or crossbuilding, just do that.
 #  Don't try to do a local build.
 #
-ifeq "$(filter deb rpm pkg_version freeradius-server-%,$(MAKECMDGOALS))" ""
-  ifeq "$(findstring crossbuild,$(MAKECMDGOALS))" ""
-
+ifeq "$(filter deb rpm pkg_version crossbuild.% freeradius-server-%,$(MAKECMDGOALS))" ""
 
 #
 #  Include all of the autoconf definitions into the Make variable space
@@ -553,7 +551,7 @@ whitespace:
 #  Include the crossbuild make file only if we're cross building
 #
 ifneq "$(findstring crossbuild,$(MAKECMDGOALS))" ""
-  include scripts/docker/crossbuild/crossbuild.mk
+  include scripts/docker/crossbuild.mk
 endif
 
 #
similarity index 93%
rename from scripts/docker/crossbuild/crossbuild.mk
rename to scripts/docker/crossbuild.mk
index 3569ee1d63459d6e2cb77da0bab111c508673ee0..933c4dc3392441cc932d3f1aea5e942f5f74600e 100644 (file)
@@ -13,14 +13,20 @@ else
 #
 CB_COMMON:=centos7 debian10 ubuntu18
 
-# Where the docker "build-" directories are
-DT:=scripts/docker
+# Top level of where all crossbuild and docker files are
+CB_DIR:=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
 
-# Location of this makefile, and where to put stamp files
-DD:=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
+# Where the docker directories are
+DT:=$(CB_DIR)/build
+
+# Where to put stamp files and logs
+DD:=$(CB_DIR)/crossbuild
+
+# Location of top-level m4 template
+DOCKER_TMPL:=$(CB_DIR)/m4/Dockerfile.m4
 
 # List of all the docker images (sorted for "crossbuild.info")
-CB_IMAGES:=$(sort $(patsubst $(DT)/build-%,%,$(wildcard $(DT)/build-*)))
+CB_IMAGES:=$(sort $(patsubst $(DT)/%,%,$(wildcard $(DT)/*)))
 
 # Location of the .git dir (may be different for e.g. submodules)
 GITDIR:=$(shell perl -MCwd -e 'print Cwd::abs_path shift' $$(git rev-parse --git-dir))
@@ -124,7 +130,7 @@ crossbuild.${1}.status:
 #
 $(DD)/stamp-image.${1}:
        ${Q}echo "BUILD ${1} ($(CB_IPREFIX)/${1}) > $(DD)/build.${1}"
-       ${Q}docker build $(NO_CACHE) $(DT)/build-${1} -f $(DT)/build-${1}/Dockerfile.deps -t $(CB_IPREFIX)/${1} >$(DD)/build.${1} 2>&1
+       ${Q}docker build $(NO_CACHE) $(DT)/${1} -f $(DT)/${1}/Dockerfile.cb -t $(CB_IPREFIX)/${1} >$(DD)/build.${1} 2>&1
        ${Q}touch $(DD)/stamp-image.${1}
 
 #