Skip to content

Commit

Permalink
ci: cmake Makefile fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 22, 2023
1 parent d1b6127 commit a05782c
Showing 1 changed file with 110 additions and 74 deletions.
184 changes: 110 additions & 74 deletions cmake/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RESET:=\e[0m

help:
@echo -e "${BOLD}SYNOPSIS${RESET}"
@echo -e "\tmake <target> [NOCACHE=1]"
@echo -e "\tmake <target> [NOCACHE=1] [VERBOSE=1]"
@echo
@echo -e "${BOLD}DESCRIPTION${RESET}"
@echo -e "\ttest build inside docker container to have a reproductible build."
Expand Down Expand Up @@ -70,6 +70,31 @@ help:
@echo -e "\te.g. 'make alpine_cpp_build'"
@echo -e "\te.g. 'make archlinux_cpp_build'"
@echo
@echo -e "\tBuild using docker buildx with a platform specified."
@echo -e "\t${BOLD}<platform>_<stage>${RESET}: build <stage> docker images for ALL DISTROS."
@echo -e "\t${BOLD}<platform>_<distro>_<stage>${RESET}: build <stage> docker image for a specific distro."
@echo -e "\t${BOLD}save_<platform>_<stage>${RESET}: Save <stage> docker images for ALL DISTROS."
@echo -e "\t${BOLD}save_<platform>_<distro>_<stage>${RESET}: Save the <stage> docker image for a specific distro."
@echo -e "\t${BOLD}sh_<platform>_<distro>_<stage>${RESET}: run a container using the <stage> docker image specified (debug purpose)."
@echo -e "\t${BOLD}clean_<platform>_<distro>_<stage>${RESET}: Remove cache and docker image."
@echo -e "\t${BOLD}clean_platforms${RESET}: Remove ALL cache and docker image."
@echo
@echo -e "\tWith ${BOLD}<platform>${RESET}:"
@echo -e "\t\t${BOLD}amd64${RESET}: linux/amd64 (x86_64)"
@echo -e "\t\t${BOLD}386${RESET}: linux/386 (x86)"
@echo -e "\t\t${BOLD}arm${RESET}: linux/arm (armv7)"
@echo -e "\t\t${BOLD}arm64${RESET}: linux/arm64 (aarch64, arm64v8)"
@echo -e "\t\t${BOLD}mips${RESET}: linux/mips (mips 32bits)"
@echo -e "\t\t${BOLD}mipsle${RESET}: linux/mipsle (mips 32bits Little Endian)"
@echo -e "\t\t${BOLD}mips64${RESET}: linux/mips64 (mips 64bits)"
@echo -e "\t\t${BOLD}mips64le${RESET}: linux/mips64le (mips 64bits Little Endian)"
@echo -e "\t\t${BOLD}ppc64${RESET}: linux/ppc64 (PowerPC 64Bits)"
@echo -e "\t\t${BOLD}ppc64le${RESET}: linux/ppc64le (PowerPC 64Bits Little Endian)"
@echo -e "\t\t${BOLD}riscv64${RESET}: linux/riscv64 (RISC-V 64bits)"
@echo -e "\t\t${BOLD}s390x${RESET}: linux/s390x (IBM System/390x)"
@echo -e "\te.g. 'make amd64_ubuntu_test'"
@echo -e "\tDocker image unavailable: arm64_archlinux"
@echo
@echo -e "\tBuild using a toolchain."
@echo -e "\t${BOLD}<toolchain>_<toolchain_stage>${RESET}: build <stage> docker image for a specific toolchain target."
@echo -e "\t${BOLD}save_<toolchain>_<toolchain_stage>${RESET}: Save the <stage> docker image for a specific platform."
Expand Down Expand Up @@ -112,7 +137,6 @@ help:
@echo
@echo -e "\tGlobal targets."
@echo -e "\t${BOLD}clean${RESET}: Remove ALL caches and docker images."
@echo -e "\t${BOLD}clean_<distro>${RESET}: Remove cache and docker image for the specified distro."
@echo -e "\t${BOLD}distclean${RESET}: Remove everything."
@echo
@echo -e "\t${BOLD}NOCACHE=1${RESET}: use 'docker build --no-cache' when building container (default use cache)."
Expand Down Expand Up @@ -153,7 +177,6 @@ DOCKER_RUN_CMD := docker run --rm --init --net=host

# Currently supported distro
DISTROS := alpine archlinux centos debian fedora opensuse ubuntu system_deps
LANGUAGES := cpp python java dotnet

# $* stem
# $< first prerequist
Expand All @@ -164,6 +187,7 @@ LANGUAGES := cpp python java dotnet
###############
PRESTAGES := base swig

# Generate <distro>_<prestage> targets
define make-prestage-target =
#$$(info PRESTAGE: $1)
#$$(info Create targets: all_$1 $(addsuffix _$1, $(DISTROS)).)
Expand Down Expand Up @@ -204,8 +228,10 @@ $(foreach prestage,$(PRESTAGES),$(eval $(call make-prestage-target,$(prestage)))
############
## STAGES ##
############
LANGUAGES := cpp python java dotnet
STAGES := env devel build test install_env install_devel install_build install_test

# Generate <distro>_<lang>_<stage> targets
define make-stage-target =
#$$(info STAGE: $1)
#$$(info Create targets: all_$1 $(addsuffix _$1, $(DISTROS)).)
Expand Down Expand Up @@ -360,62 +386,67 @@ PLATFORMS := \
ppc64 ppc64le \
riscv64

# Generate <platform>_<distro>_<prestage> targets
define make-platform-prestage-target =
#$$(info PLATFORM: '$1' PRESTAGE: '$2')
#$$(info Create targets: $1_all_$2 $(addprefix $1_, $(addsuffix _$2, $(DISTROS))).)
targets_$1_$2 = $(addprefix $1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: $1_all_$2 $$(targets_$1_$2)
$1_all_$2: $$(targets_$1_$2)
#$$(info Create targets: $1_$2 $(addprefix $1_, $(addsuffix _$2, $(DISTROS))).)
targets_$1_$2 := $(addprefix $1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: $1_$2 $$(targets_$1_$2)
$1_$2: $$(targets_$1_$2)
$$(targets_$1_$2): $1_%_$2: docker/%/Dockerfile
#@docker image rm -f ${IMAGE}:$1_$$*_$2 2>/dev/null
${DOCKER_BUILDX_CMD} --platform linux/$1 --target=$2 --tag ${IMAGE}:$1_$$*_$2 -f $$< ..

#$$(info Create targets: save_$1_all_$2 $(addprefix save_$1_, $(addsuffix _$2, $(DISTROS))) (debug).)
save_targets_$1_$2 = $(addprefix save_$1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: save_$1_all_$2 $$(save_targets_$1_$2)
save_$1_all_$2: $$(save_targets_$1_$2)
#$$(info Create save targets: save_$1_$2 $(addprefix save_$1_, $(addsuffix _$2, $(DISTROS))) (debug).)
save_targets_$1_$2 := $(addprefix save_$1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: save_$1_$2 $$(save_targets_$1_$2)
save_$1_$2: $$(save_targets_$1_$2)
$$(save_targets_$1_$2): save_$1_%_$2: cache/$1/%/docker_$2.tar
cache/$1/%/docker_$2.tar: $1_%_$2
@rm -f $$@
mkdir -p cache/$1/$$*
docker save ${IMAGE}:$1_$$*_$2 -o $$@

#$$(info Create targets: $(addprefix sh_$1_, $(addsuffix _$2, $(DISTROS))) (debug).)
sh_targets_$1_$2 = $(addprefix sh_$1_, $(addsuffix _$2, $(DISTROS)))
#$$(info Create sh targets: $(addprefix sh_$1_, $(addsuffix _$2, $(DISTROS))) (debug).)
sh_targets_$1_$2 := $(addprefix sh_$1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: $$(sh_targets_$1_$2)
$$(sh_targets_$1_$2): sh_$1_%_$2: $1_%_$2
${DOCKER_RUN_CMD} --platform linux/$1 -it --name ${PROJECT}_${BUILD_SYSTEM}_$1_$$*_$2 ${IMAGE}:$1_$$*_$2

#$$(info Create targets: clean_$1_all_$2 $(addprefix clean_$1_, $(addsuffix _$2, $(DISTROS))).)
clean_targets_$1_$2 = $(addprefix clean_$1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: clean_$1_all_$2 $$(clean_targets_$1_$2)
clean_$1_all_$2: $$(clean_targets_$1_$2)
#$$(info Create clean targets: clean_$1_$2 $(addprefix clean_$1_, $(addsuffix _$2, $(DISTROS))).)
clean_targets_$1_$2 := $(addprefix clean_$1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: clean_$1_$2 $$(clean_targets_$1_$2)
clean_$1_$2: $$(clean_targets_$1_$2)
$$(clean_targets_$1_$2): clean_$1_%_$2:
docker image rm -f ${IMAGE}:$1_$$*_$2 2>/dev/null
rm -f cache/$1/$$*/docker_$2.tar
endef

# Generate <platform>_<distro>_<lang>_<stage> targets
define make-platform-stage-target =
#$$(info PLATFORM: '$1' STAGE: '$2')
#$$(info Create targets: $1_all_$2 $(addprefix $1_, $(addsuffix _$2, $(DISTROS))).)
targets_$1_$2 = $(addprefix $1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: $1_all_$2 $$(targets_$1_$2)
$1_all_$2: $$(targets_$1_$2)
#$$(info Create distro targets: $(addprefix $1_, $(addsuffix _$2, $(DISTROS))).)
targets_$1_$2 := $(addprefix $1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: $$(targets_$1_$2)
$$(targets_$1_$2): $1_%_$2: $(addprefix $1_%_, $(addsuffix _$2, $(LANGUAGES)))

#$$(info Create targets: $(addprefix $1_, $(addsuffix _$2, $(LANGUAGES))).)
targets_$1_$2 = $(addprefix $1_, $(addsuffix _$2, $(LANGUAGES)))
#$$(info Create language targets: $(addprefix $1_, $(addsuffix _$2, $(LANGUAGES))).)
targets_$1_$2 := $(addprefix $1_, $(addsuffix _$2, $(LANGUAGES)))
.PHONY: $$(targets_$1_$2)
$$(targets_$1_$2): $1_%_$2: $(addprefix $1_, $(addsuffix _$2, $(addsuffix _%, $(DISTROS))))

#$$(info Create targets: $(addprefix $1_, $(addsuffix _cpp_$2, $(DISTROS)))
cpp_targets_$1_$2 = $(addprefix $1_, $(addsuffix _cpp_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix $1_, $(addsuffix _dotnet_$2, $(DISTROS)))
dotnet_targets_$1_$2 = $(addprefix $1_, $(addsuffix _dotnet_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix $1_, $(addsuffix _java_$2, $(DISTROS)))
java_targets_$1_$2 = $(addprefix $1_, $(addsuffix _java_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix $1_, $(addsuffix _python_$2, $(DISTROS)))
python_targets_$1_$2 = $(addprefix $1_, $(addsuffix _python_$2, $(DISTROS)))
$$(targets_$1_$2): $1_%_$2: $(addprefix $1_, $(addsuffix _%_$2, $(DISTROS)))

#$$(info Create meta targets: $1_$2.)
.PHONY: $1_$2
$1_$2: $$(targets_$1_$2)

#$$(info Create cpp targets: $(addprefix $1_, $(addsuffix _cpp_$2, $(DISTROS))).)
cpp_targets_$1_$2 := $(addprefix $1_, $(addsuffix _cpp_$2, $(DISTROS)))
#$$(info Create dotnet targets: $(addprefix $1_, $(addsuffix _dotnet_$2, $(DISTROS))).)
dotnet_targets_$1_$2 := $(addprefix $1_, $(addsuffix _dotnet_$2, $(DISTROS)))
#$$(info Create java targets: $(addprefix $1_, $(addsuffix _java_$2, $(DISTROS))).)
java_targets_$1_$2 := $(addprefix $1_, $(addsuffix _java_$2, $(DISTROS)))
#$$(info Create python targets: $(addprefix $1_, $(addsuffix _python_$2, $(DISTROS))).)
python_targets_$1_$2 := $(addprefix $1_, $(addsuffix _python_$2, $(DISTROS)))
.PHONY: $$(cpp_targets_$1_$2) $$(dotnet_targets_$1_$2) $$(java_targets_$1_$2) $$(python_targets_$1_$2)

$$(cpp_targets_$1_$2): $1_%_cpp_$2: docker/%/cpp.Dockerfile %_base
Expand All @@ -431,57 +462,60 @@ $$(python_targets_$1_$2): $1_%_python_$2: docker/%/python.Dockerfile %_swig
#@docker image rm -f ${IMAGE}:$1_$$*_python_$2 2>/dev/null
${DOCKER_BUILD_CMD} --target=$2 --tag ${IMAGE}:$1_$$*_python_$2 -f $$< ..


#$$(info Create targets: save_$1_all_$2 $(addprefix save_$1_, $(addsuffix _$2, $(DISTROS))) (debug).)
save_targets_$1_$2 = $(addprefix save_$1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: save_$1_all_$2 $$(save_targets_$1_$2)
save_$1_all_$2: $$(save_targets_$1_$2)
#$$(info Create save targets: $(addprefix save_$1_, $(addsuffix _$2, $(DISTROS))).)
save_targets_$1_$2 := $(addprefix save_$1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: $$(save_targets_$1_$2)
save_$1_$2: $$(save_targets_$1_$2)
$$(save_targets_$1_$2): save_$1_%_$2: $(addprefix save_$1_%_, $(addsuffix _$2, $(LANGUAGES)))

#$$(info Create targets: $(addprefix save_$1_, $(addsuffix _$2, $(LANGUAGES))).)
targets_$1_$2 = $(addprefix save_$1_, $(addsuffix _$2, $(LANGUAGES)))
targets_$1_$2 := $(addprefix save_$1_, $(addsuffix _$2, $(LANGUAGES)))
.PHONY: $$(targets_$1_$2)
$$(targets_$1_$2): save_$1_%_$2: $(addprefix save_$1_, $(addsuffix _%_$2, $(DISTROS)))

#$$(info Create targets: $(addprefix save_$1_, $(addsuffix _cpp_$2, $(DISTROS))))
cpp_targets_$1_$2 = $(addprefix save_$1_, $(addsuffix _cpp_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix save_$1_, $(addsuffix _dotnet_$2, $(DISTROS))))
dotnet_targets_$1_$2 = $(addprefix save_$1_, $(addsuffix _dotnet_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix save_$1_, $(addsuffix _java_$2, $(DISTROS))))
java_targets_$1_$2 = $(addprefix save_$1_, $(addsuffix _java_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix save_$1_, $(addsuffix _python_$2, $(DISTROS))))
python_targets_$1_$2 = $(addprefix save_$1_, $(addsuffix _python_$2, $(DISTROS)))
#$$(info Create meta save targets: save_$1_$2.)
.PHONY: save_$1_$2
save_$1_$2: $$(targets_$1_$2)

#$$(info Create save cpp targets: $(addprefix save_$1_, $(addsuffix _cpp_$2, $(DISTROS))))
cpp_targets_$1_$2 := $(addprefix save_$1_, $(addsuffix _cpp_$2, $(DISTROS)))
#$$(info Create save dotnet targets: $(addprefix save_$1_, $(addsuffix _dotnet_$2, $(DISTROS))))
dotnet_targets_$1_$2 := $(addprefix save_$1_, $(addsuffix _dotnet_$2, $(DISTROS)))
#$$(info Create save java targets: $(addprefix save_$1_, $(addsuffix _java_$2, $(DISTROS))))
java_targets_$1_$2 := $(addprefix save_$1_, $(addsuffix _java_$2, $(DISTROS)))
#$$(info Create save python targets: $(addprefix save_$1_, $(addsuffix _python_$2, $(DISTROS))))
python_targets_$1_$2 := $(addprefix save_$1_, $(addsuffix _python_$2, $(DISTROS)))
.PHONY: $$(cpp_targets_$1_$2) $$(dotnet_targets_$1_$2) $$(java_targets_$1_$2) $$(python_targets_$1_$2)

$$(cpp_targets_$1_$2): save_$1_%_cpp_$2: cache/$1/%/docker_cpp_$2.tar
cache/$1/%/docker_cpp_$2.tar: $1_%_cpp_$2
@rm -f $$@
mkdir -p cache/$1/$$*
docker save ${IMAGE}:$1_$$*_cpp_$2 -o $$@
$$(dotnet_targets_$2): save_%_dotnet_$2: cache/$1/%/docker_dotnet_$2.tar
$$(dotnet_targets_$1_$2): save_$1_%_dotnet_$2: cache/$1/%/docker_dotnet_$2.tar
cache/$1/%/docker_dotnet_$2.tar: $1_%_dotnet_$2
@rm -f $$@
mkdir -p cache/$1/$$*
docker save ${IMAGE}:$1_$$*_dotnet_$2 -o $$@
$$(java_targets_$2): save_%_java_$2: cache/$1/%/docker_java_$2.tar
$$(java_targets_$1_$2): save_$1_%_java_$2: cache/$1/%/docker_java_$2.tar
cache/$1/%/docker_java_$2.tar: $1_%_java_$2
@rm -f $$@
mkdir -p cache/$1/$$*
docker save ${IMAGE}:$1_$$*_java_$2 -o $$@
$$(python_targets_$2): save_%_python_$2: cache/$1/%/docker_python_$2.tar
$$(python_targets_$1_$2): save_$1_%_python_$2: cache/$1/%/docker_python_$2.tar
cache/$1/%/docker_python_$2.tar: $1_%_python_$2
@rm -f $$@
mkdir -p cache/$1/$$*
docker save ${IMAGE}:$1_$$*_python_$2 -o $$@

#$$(info Create targets: $(addprefix sh_$1_, $(addsuffix _cpp_$2, $(DISTROS))))
cpp_targets_$1_$2 = $(addprefix sh_$1_, $(addsuffix _cpp_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix sh_$1_, $(addsuffix _dotnet_$2, $(DISTROS))))
dotnet_targets_$1_$2 = $(addprefix sh_$1_, $(addsuffix _dotnet_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix sh_$1_, $(addsuffix _java_$2, $(DISTROS))))
java_targets_$1_$2 = $(addprefix sh_$1_, $(addsuffix _java_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix sh_$1_, $(addsuffix _python_$2, $(DISTROS))))
python_targets_$1_$2 = $(addprefix sh_$1_, $(addsuffix _python_$2, $(DISTROS)))
#$$(info Create sh cpp targets: $(addprefix sh_$1_, $(addsuffix _cpp_$2, $(DISTROS))))
cpp_targets_$1_$2 := $(addprefix sh_$1_, $(addsuffix _cpp_$2, $(DISTROS)))
#$$(info Create sh dotnet targets: $(addprefix sh_$1_, $(addsuffix _dotnet_$2, $(DISTROS))))
dotnet_targets_$1_$2 := $(addprefix sh_$1_, $(addsuffix _dotnet_$2, $(DISTROS)))
#$$(info Create sh java targets: $(addprefix sh_$1_, $(addsuffix _java_$2, $(DISTROS))))
java_targets_$1_$2 := $(addprefix sh_$1_, $(addsuffix _java_$2, $(DISTROS)))
#$$(info Create sh python targets: $(addprefix sh_$1_, $(addsuffix _python_$2, $(DISTROS))))
python_targets_$1_$2 := $(addprefix sh_$1_, $(addsuffix _python_$2, $(DISTROS)))
.PHONY: $$(cpp_targets_$1_$2) $$(dotnet_targets_$1_$2) $$(java_targets_$1_$2) $$(python_targets_$1_$2)

$$(cpp_targets_$1_$2): sh_$1_%_cpp_$2: $1_%_cpp_$2
Expand All @@ -493,25 +527,28 @@ $$(java_targets_$1_$2): sh_$1_%_java_$2: $1_%_java_$2
$$(python_targets_$1_$2): sh_$1_%_python_$2: $1_%_python_$2
${DOCKER_RUN_CMD} -it --name ${PROJECT}_${BUILD_SYSTEM}_$1_$$*_python_$2 ${IMAGE}:$1_$$*_python_$2

#$$(info Create targets: clean_all_$1_$2 $(addprefix clean_$1_, $(addsuffix _$2, $(DISTROS))).)
targets_$1_$2 = $(addprefix clean_$1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: clean_all_$1_$2 $(targets_$1_$2)
clean_all_$1_$2: $$(targets_$1_$2)
#$$(info Create clean distro targets: $(addprefix clean_$1_, $(addsuffix _$2, $(DISTROS))).)
targets_$1_$2 := $(addprefix clean_$1_, $(addsuffix _$2, $(DISTROS)))
.PHONY: $(targets_$1_$2)
$$(targets_$1_$2): clean_$1_%_$2: $(addprefix clean_$1_%_, $(addsuffix _$2, $(LANGUAGES)))

#$$(info Create targets: $(addprefix clean_$1_, $(addsuffix _$2, $(LANGUAGES))).)
targets_$1_$2 = $(addprefix clean_$1_, $(addsuffix _$2, $(LANGUAGES)))
#$$(info Create clean language targets: $(addprefix clean_$1_, $(addsuffix _$2, $(LANGUAGES))).)
targets_$1_$2 := $(addprefix clean_$1_, $(addsuffix _$2, $(LANGUAGES)))
.PHONY: $$(targets_$1_$2)
$$(targets_$1_$2): clean_$1_%_$2: $(addprefix clean_$1_, $(addsuffix _%_$2, $(DISTROS)))

#$$(info Create targets: $(addprefix clean_$1_, $(addsuffix _cpp_$2, $(DISTROS))))
cpp_targets_$1_$2 = $(addprefix clean_, $(addsuffix _cpp_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix clean_, $(addsuffix _dotnet_$2, $(DISTROS))))
dotnet_targets_$1_$2 = $(addprefix clean_, $(addsuffix _dotnet_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix clean_, $(addsuffix _java_$2, $(DISTROS))))
java_targets_$1_$2 = $(addprefix clean_, $(addsuffix _java_$2, $(DISTROS)))
#$$(info Create targets: $(addprefix clean_, $(addsuffix _python_$2, $(DISTROS))))
python_targets_$1_$2 = $(addprefix clean_, $(addsuffix _python_$2, $(DISTROS)))
#$$(info Create meta clean targets: clean_$1_$2.)
.PHONY: clean_$1_$2
clean_$1_$2: $$(targets_$1_$2)

#$$(info Create clean cpp targets: $(addprefix clean_$1_, $(addsuffix _cpp_$2, $(DISTROS))))
cpp_targets_$1_$2 := $(addprefix clean_$1_, $(addsuffix _cpp_$2, $(DISTROS)))
#$$(info Create clean dotnet targets: $(addprefix clean_, $(addsuffix _dotnet_$2, $(DISTROS))))
dotnet_targets_$1_$2 := $(addprefix clean_$1_, $(addsuffix _dotnet_$2, $(DISTROS)))
#$$(info Create clean java targets: $(addprefix clean_, $(addsuffix _java_$2, $(DISTROS))))
java_targets_$1_$2 := $(addprefix clean_$1_, $(addsuffix _java_$2, $(DISTROS)))
#$$(info Create clean python targets: $(addprefix clean_, $(addsuffix _python_$2, $(DISTROS))))
python_targets_$1_$2 := $(addprefix clean_$1_, $(addsuffix _python_$2, $(DISTROS)))
.PHONY: $$(cpp_targets_$1_$2) $$(dotnet_targets_$1_$2) $$(java_targets_$1_$2) $$(python_targets_$1_$2)

$$(cpp_targets_$1_$2): clean_$1_%_cpp_$2:
Expand All @@ -531,7 +568,6 @@ endef
define make-platform-target =
#$$(info PLATFORM: $1)
$(foreach prestage,$(PRESTAGES),$(eval $(call make-platform-prestage-target,$1,$(prestage))))

$(foreach stage,$(STAGES),$(eval $(call make-platform-stage-target,$1,$(stage))))

# merge
Expand Down Expand Up @@ -708,7 +744,7 @@ clean_glop: $(addprefix clean_glop_, $(STAGES))
## CLEAN ##
###########
.PHONY: clean
clean: clean_all clean_platforms clean_web clean_freebsd clean_glop
clean: clean_all clean_platforms clean_toolchains clean_web clean_freebsd clean_glop
docker container prune -f
docker image prune -f
-rmdir cache
Expand Down

0 comments on commit a05782c

Please sign in to comment.