Skip to content

Commit

Permalink
m4/sage_spkg_collect.m4: Change handling of 'dependencies_check' file…
Browse files Browse the repository at this point in the history
…s, generate Makefile variables check_deps_...
  • Loading branch information
Matthias Koeppe committed Dec 14, 2023
1 parent 91cda4d commit 3f83d53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions m4/sage_spkg_collect.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3f83d53

Please sign in to comment.