Skip to content

Commit 70a3d33

Browse files
committed
use only the first result when finding the import lib
1 parent f0eaf0c commit 70a3d33

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tools/build_gfortran.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ set -e
55
cd $(cygpath "$START_DIR")
66
OBP=$(cygpath $OPENBLAS_ROOT\\$BUILD_BITS)
77

8-
static_libname=`find $OBP/lib -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a'`
9-
dynamic_libname=`find $OBP/lib -maxdepth 1 -type f -name '*.dll.a'`
8+
static_libname=$(find $OBP/lib -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a' | head -1)
9+
dynamic_libname=$(find $OBP/lib -maxdepth 1 -type f -name '*.dll.a' | head -1)
1010

1111
if [ "$INTERFACE64" == "1" ]; then
1212
gfortran -I $OBP/include -fdefault-integer-8 -o test.exe test64_.f90 $static_libname

tools/build_openblas.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ DLL_BASENAME=libopenblas${SYMBOLSUFFIX}_${LIBNAMESUFFIX}
7878
if [ "$INTERFACE64" == "1" ]; then
7979
# OpenBLAS does not build a symbol-suffixed static library on Windows:
8080
# do it ourselves
81-
static_libname=`find . -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a' -printf '%P\n'`
8281
set -x # echo commands
82+
static_libname=$(find . -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a' | head -1)
8383
make -C exports $interface64_flags objcopy.def
8484
objcopy --redefine-syms exports/objcopy.def "${static_libname}" "${static_libname}.renamed"
8585
cp -f "${static_libname}.renamed" "$OPENBLAS_ROOT/$BUILD_BITS/lib/${static_libname}"

0 commit comments

Comments
 (0)