From 3f83d53b6c72c97c52c191cf66c3bd36a4d88859 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 19 Nov 2023 17:37:33 -0800 Subject: [PATCH] m4/sage_spkg_collect.m4: Change handling of 'dependencies_check' files, generate Makefile variables check_deps_... --- build/make/Makefile.in | 5 ++++- m4/sage_spkg_collect.m4 | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build/make/Makefile.in b/build/make/Makefile.in index 169449ce974..8951afbd379 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -539,7 +539,10 @@ debug-check: pkg_deps = \ $(if $(filter gcc,$(1)),,$$(GCC_DEP))\ $(foreach dep,$(build_deps_$(1)),\ - $(if $(value inst_$(dep)),$$(inst_$(dep)),$(dep))) + $(if $(value inst_$(dep)),$$(inst_$(dep)),$(dep)))\ + $(if $(check_deps_$(1)),$$(and $$(filter-out no,$$(SAGE_CHECK_$(1))),\ + $(foreach dep,$(check_deps_$(1)),\ + $(if $(value inst_$(dep)),$$(inst_$(dep)),$(dep))))) # ============================= normal packages ============================== # Generate build rules for 'normal' packages; this template is used to generate diff --git a/m4/sage_spkg_collect.m4 b/m4/sage_spkg_collect.m4 index 6fbc58bdba6..2ba272eef4a 100644 --- a/m4/sage_spkg_collect.m4 +++ b/m4/sage_spkg_collect.m4 @@ -372,11 +372,12 @@ AC_DEFUN([SAGE_SPKG_FINALIZE], [dnl m4_case(SPKG_SOURCE, [pip], [AS_VAR_APPEND([BUILD_DEPS], [' pip'])], [:])dnl ]) AS_IF([test -f "$DIR/dependencies_check"], [dnl - ADD_DEPS=$(echo $(sed 's/^ *//; s/ *#.*//; q' $DIR/dependencies_check)) - AS_VAR_APPEND([BUILD_DEPS], [' $(and $(filter-out no,$(SAGE_CHECK_]SPKG_NAME[)), '"$ADD_DEPS"')'])dnl + AS_VAR_SET([CHECK_DEPS], [$(sed 's/^ *//; s/ *#.*//; q' $DIR/dependencies_check)]) + ], [dnl + AS_VAR_SET([CHECK_DEPS], []) ]) dnl - SAGE_PACKAGE_DEPENDENCIES="${SAGE_PACKAGE_DEPENDENCIES}$(printf '\ndeps_')SPKG_NAME = ${DEPS}$(printf '\nbuild_deps_')SPKG_NAME = ${BUILD_DEPS}" + SAGE_PACKAGE_DEPENDENCIES="${SAGE_PACKAGE_DEPENDENCIES}$(printf '\nbuild_deps_')SPKG_NAME = ${BUILD_DEPS}$(printf '\ndeps_')SPKG_NAME = ${DEPS}$(printf '\ncheck_deps_')SPKG_NAME = ${CHECK_DEPS}" dnl dnl Determine package build rules m4_case(SPKG_SOURCE,