Skip to content

Commit 4026d7b

Browse files
vtjnashclaude
andcommitted
Fix LIBNAMESUFFIX handling in CMake and update documentation
- Fix cmake/system.cmake: LIBPREFIX was incorrectly overwritten when LIBNAMESUFFIX was defined, losing both "lib" prefix and "openblas" - Fix Makefile.rule docs: typo used LIBNAMESUFFIX instead of LIBNAMEPREFIX - Fix Makefile.rule docs: removed misleading underscores from examples - Fix docs/build_system.md: removed incorrect claim about automatic underscore separator The implementation does not add an underscore before the suffix - users who want a separator should include it in their LIBNAMESUFFIX value (e.g., LIBNAMESUFFIX=_omp). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent c7b0304 commit 4026d7b

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Makefile.rule

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
# This library's version
66
VERSION = 0.3.30.dev
77

8-
# If you set this prefix, the library name will be lib$(LIBNAMESUFFIX)openblas.a
9-
# and lib$(LIBNAMESUFFIX)openblas.so, with a matching soname in the shared library
10-
#
8+
# If you set this prefix, the library name will be lib$(LIBNAMEPREFIX)openblas.a
9+
# and lib$(LIBNAMEPREFIX)openblas.so, with a matching soname in the shared library
10+
#
1111
# LIBNAMEPREFIX = scipy
1212

13-
# If you set the suffix, the library name will be libopenblas_$(LIBNAMESUFFIX).a
14-
# and libopenblas_$(LIBNAMESUFFIX).so. Meanwhile, the soname in shared library
15-
# is libopenblas_$(LIBNAMESUFFIX).so.0.
16-
# LIBNAMESUFFIX = omp
13+
# If you set the suffix, the library name will be libopenblas$(LIBNAMESUFFIX).a
14+
# and libopenblas$(LIBNAMESUFFIX).so. Meanwhile, the soname in shared library
15+
# is libopenblas$(LIBNAMESUFFIX).so.0.
16+
# LIBNAMESUFFIX = _omp
1717

1818
# You can specify the target architecture, otherwise it's
1919
# automatically detected.

cmake/system.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,8 @@ endif()
638638

639639
set(LIBPREFIX "lib${LIBNAMEPREFIX}openblas")
640640

641-
if (DEFINED LIBNAMESUFFIX)
642-
set(LIBPREFIX "${LIBNAMEPREFIX}_${LIBNAMESUFFIX}")
641+
if (DEFINED LIBNAMESUFFIX AND NOT "${LIBNAMESUFFIX}" STREQUAL "")
642+
set(LIBPREFIX "lib${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}")
643643
endif ()
644644

645645
if (NOT DEFINED SYMBOLPREFIX)

docs/build_system.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,8 @@ ensures that there are a sufficient number of buffer sets available.
143143
no symbolic linking to variant names (default is `0`)
144144
- `LIBNAMEPREFIX`: prefix that, if given, will be inserted in the library name
145145
before `openblas` (e.g., `xxx` will result in `libxxxopenblas.so`)
146-
- `LIBNAMESUFFIX`: suffix that, if given, will be inserted in the library name
147-
after `openblas`, separated by an underscore (e.g., `yyy` will result in
148-
`libopenblas_yyy.so`)
146+
- `LIBNAMESUFFIX`: suffix that, if given, will be appended to the library name
147+
after `openblas` (e.g., `_yyy` will result in `libopenblas_yyy.so`)
149148
- `SYMBOLPREFIX`: prefix that, if given, will be added to all symbol names
150149
*and* to the library name
151150
- `SYMBOLSUFFIX`: suffix that, if given, will be added to all symbol names

0 commit comments

Comments
 (0)