# 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
# 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
# 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
#
#
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))
#
$(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}
#