From: Matthew Newton Date: Wed, 21 Jun 2023 09:35:22 +0000 (+0100) Subject: crossbuild: update makefiles for new file locations X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43cbfb04b73d2295b0537a750ff980b9b06b3762;p=thirdparty%2Ffreeradius-server.git crossbuild: update makefiles for new file locations --- diff --git a/Makefile b/Makefile index f9904bfc95..77bb24bb99 100644 --- 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 # diff --git a/scripts/docker/crossbuild/crossbuild.mk b/scripts/docker/crossbuild.mk similarity index 93% rename from scripts/docker/crossbuild/crossbuild.mk rename to scripts/docker/crossbuild.mk index 3569ee1d63..933c4dc339 100644 --- a/scripts/docker/crossbuild/crossbuild.mk +++ b/scripts/docker/crossbuild.mk @@ -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} #