GitLab Commit is coming up on August 3-4. Learn how to innovate together using GitLab, the DevOps platform. Register for free: gitlabcommitvirtual2021.com

Commits (5)
......@@ -79,6 +79,7 @@ ssl: all
misc-clean:
@echo "Deleting build artifacts generated by autoconf, automake, make ..."
-$(MAKE) sage_system_blas_facade-distclean
rm -rf logs
rm -rf dist
rm -rf tmp
......
......@@ -35,11 +35,6 @@ PYTHON = python@SAGE_PYTHON_VERSION@
MP_LIBRARY = @SAGE_MP_LIBRARY@
BLAS = @SAGE_BLAS@
# Because some .pc files are generated at configure time we can't write their
# names explicitly the Makefile, so we use the wildcard function here at make
# runtime
PCFILES = $(subst $(SAGE_SRC),$(SAGE_LOCAL),$(wildcard $(SAGE_SRC)/lib/pkgconfig/*.pc))
# Files to track installation of packages
BUILT_PACKAGES = @SAGE_BUILT_PACKAGES@
DUMMY_PACKAGES = @SAGE_DUMMY_PACKAGES@
......@@ -276,6 +271,14 @@ $$(INST)/$(1)-$(2): $(3)
$(1): $$(INST)/$(1)-$(2)
.PHONY: $(1)-distclean
$(1)-distclean:
-$(AM_V_at)cd '$$(SAGE_ROOT)' && \
source '$$(SAGE_ROOT)/src/bin/sage-env' && \
'$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-distclean'
# The following should actually be $(1)-uninstall,
# see https://trac.sagemath.org/ticket/29097
$(1)-clean:
-$(AM_V_at)cd '$$(SAGE_ROOT)' && \
source '$$(SAGE_ROOT)/src/bin/sage-env' && source '$$(SAGE_ROOT)/build/bin/sage-build-env-config' && \
......
......@@ -64,7 +64,7 @@ download-for-sdist:
# TOOLCHAIN consists of dependencies determined by configure.
# These are built after the "base" target but before anything else.
toolchain: $(foreach pkgname,$(TOOLCHAIN),$(inst_$(pkgname))) $(PCFILES)
toolchain: $(foreach pkgname,$(TOOLCHAIN),$(inst_$(pkgname)))
# Build all packages that GCC links against serially, otherwise this
# leads to race conditions where some library which is used by GCC gets
......@@ -175,8 +175,7 @@ sagelib: \
$(inst_singular) \
$(inst_six) \
$(inst_symmetrica) \
$(inst_zn_poly) \
$(PCFILES)
$(inst_zn_poly)
$(AM_V_at)if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
cd $(SAGE_SRC) && source bin/sage-env && source $(SAGE_ROOT)/build/bin/sage-build-env-config && \
sage-logger -p 'time $(MAKE) sage' '$(SAGE_LOGS)/sagelib-$(SAGE_VERSION).log'; \
......@@ -191,11 +190,6 @@ sagelib: \
$(SAGE_LOCAL)/bin/%: $(SAGE_SRC)/bin/%
$(AM_V_at)cp $< $@
# Install sage-specific generated .pc files
$(SAGE_PKGCONFIG)/%.pc: $(SAGE_SRC)/lib/pkgconfig/%.pc
@mkdir -p "$(@D)"
$(AM_V_at)cp -P $< $@
###############################################################################
# Building the documentation
###############################################################################
......
......@@ -16,7 +16,6 @@ if [ $? -ne 0 ]; then
fi
export SAGE_SHARE="$SAGE_LOCAL/share"
export SAGE_PKGCONFIG="$SAGE_LOCAL/lib/pkgconfig"
export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
. "$SAGE_SRC"/bin/sage-version.sh
......
......@@ -6,7 +6,8 @@ SAGE_SPKG_CONFIGURE([gsl], [
AC_CONFIG_COMMANDS([GSLPCPROCESS], [
$SED -e 's/\${GSL_CBLAS_LIB}\ //' \
-e 's/GSL_CBLAS_LIB.*/Requires: cblas/' $GSL_PC \
> "$SAGE_SRC"/lib/pkgconfig/gsl.pc
> build/pkgs/sage_system_blas_facade/src/gsl.pc
AS_VAR_APPEND([SAGE_SYSTEM_BLAS_FACADE_PC_FILES], [gsl.pc])
], [
SED=$ac_cv_path_SED
GSL_PC="$GSLPCDIR"/gsl.pc
......
SAGE_SPKG_CONFIGURE([openblas], [
SAGE_SPKG_CONFIGURE([openblas], [dnl CHECK
SAGE_SPKG_DEPCHECK([gfortran], [
PKG_CHECK_MODULES([OPENBLAS], [openblas >= 0.2.20], [
PKG_CHECK_VAR([OPENBLASPCDIR], [openblas], [pcfiledir], [
......@@ -6,14 +6,14 @@ SAGE_SPKG_CONFIGURE([openblas], [
AC_SEARCH_LIBS([cblas_dgemm], [openblas], [dnl openblas works as cblas
sage_install_cblas_pc=yes
], [
dnl openblas does not work as cblas; try to use system's cblas as is
dnl openblas does not work as cblas; try to use system cblas as is
PKG_CHECK_MODULES([CBLAS], [cblas], [], [sage_spkg_install_openblas=yes])
])
AC_FC_FREEFORM([AC_FC_FUNC([dgeqrf])])
AC_SEARCH_LIBS([$dgeqrf], [openblas], [dnl openblas works as lapack
sage_install_lapack_pc=yes
], [
dnl openblas does not work as lapack; try to use system's lapack as is
dnl openblas does not work as lapack; try to use system lapack as is
PKG_CHECK_MODULES([LAPACK], [lapack], [], [sage_spkg_install_openblas=yes])
])
], [
......@@ -24,15 +24,17 @@ SAGE_SPKG_CONFIGURE([openblas], [
AS_IF([test x$sage_spkg_install_openblas != xyes], [
m4_foreach([blaslibnam], [blas, cblas, lapack], [
AS_IF([test x$sage_install_]blaslibnam[_pc = xyes], [
AC_CONFIG_LINKS([$SAGE_SRC/lib/pkgconfig/]blaslibnam[.pc:$OPENBLASPCDIR/openblas.pc])])
AC_CONFIG_LINKS([build/pkgs/sage_system_blas_facade/src/]blaslibnam[.pc:$OPENBLASPCDIR/openblas.pc])
AS_VAR_APPEND([SAGE_SYSTEM_BLAS_FACADE_PC_FILES], [blaslibnam[.pc]' '])])
AC_SUBST([SAGE_BLAS], [sage_system_blas_facade])
])
])
])
], [
], [dnl REQUIRED-CHECK
AS_IF([test "x$with_blas" = xopenblas], [
sage_require_openblas=yes
sage_require_atlas=no])
], [
], [dnl PRE
AC_MSG_CHECKING([BLAS library])
AC_ARG_WITH([blas],
[AS_HELP_STRING([--with-blas=openblas],
......
SAGE_SPKG_CONFIGURE([sage_system_blas_facade], [
AC_SUBST([SAGE_SYSTEM_BLAS_FACADE_PC_FILES])
AC_CONFIG_FILES([build/pkgs/sage_system_blas_facade/spkg-install], [chmod +x build/pkgs/sage_system_blas_facade/spkg-install])
sage_spkg_install_sage_system_blas_facade=yes
])
#! /usr/bin/env bash
rm -f build/pkgs/sage_system_blas_facade/src/*.pc
#! /usr/bin/env bash
PCFILES="@SAGE_SYSTEM_BLAS_FACADE_PC_FILES@"
SAGE_PKGCONFIG="$SAGE_LOCAL/lib/pkgconfig"
mkdir -p "$SAGE_PKGCONFIG"
if [ -n "$PCFILES" ]; then
cd build/pkgs/sage_system_blas_facade/src && cp -P $PCFILES "$SAGE_PKGCONFIG"
fi