Skip to content

Commit 2542792

Browse files
authored
Improve handling of NO_STATIC and NO_SHARED
to avoid surprises from defining either as zero. Fixes #2035 by addressing some concerns from #1422
1 parent c4868d1 commit 2542792

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ endif
9696
@echo
9797

9898
shared :
99-
ifndef NO_SHARED
99+
ifneq ($(NO_SHARED), 1)
100100
ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku))
101101
@$(MAKE) -C exports so
102102
@ln -fs $(LIBSONAME) $(LIBPREFIX).so

Makefile.install

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ ifndef NO_LAPACKE
5858
endif
5959

6060
#for install static library
61-
ifndef NO_STATIC
61+
ifneq ($(NO_STATIC),1)
6262
@echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
6363
@install -pm644 $(LIBNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
6464
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
6565
ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
6666
endif
6767
#for install shared library
68-
ifndef NO_SHARED
68+
ifneq ($(NO_SHARED),1)
6969
@echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
7070
ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku))
7171
@install -pm755 $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
@@ -106,14 +106,14 @@ ifndef NO_LAPACKE
106106
endif
107107

108108
#for install static library
109-
ifndef NO_STATIC
109+
ifneq ($(NO_STATIC),1)
110110
@echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
111111
@installbsd -c -m 644 $(LIBNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
112112
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
113113
ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
114114
endif
115115
#for install shared library
116-
ifndef NO_SHARED
116+
ifneq ($(NO_SHARED),1)
117117
@echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
118118
@installbsd -c -m 755 $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
119119
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
@@ -138,7 +138,7 @@ endif
138138
@echo "SET(OpenBLAS_VERSION \"${VERSION}\")" > "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
139139
@echo "SET(OpenBLAS_INCLUDE_DIRS ${OPENBLAS_INCLUDE_DIR})" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
140140

141-
ifndef NO_SHARED
141+
ifneq ($(NO_SHARED),1)
142142
#ifeq logical or
143143
ifeq ($(OSNAME), $(filter $(OSNAME),Linux FreeBSD NetBSD OpenBSD DragonFly))
144144
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX).so)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"

0 commit comments

Comments
 (0)