Skip to content

Commit ff16ac4

Browse files
committed
Support libdir and includedir variables
These are the standard GNU make variables that distributions expect to be able to set (https://www.gnu.org/prep/standards/html_node/Directory-Variables.html). Since Julia supports the same variables and passes them during the build, this ensures that libblastrampoline.so is installed to the right directory (in particular to usr/lib64 where appropriate).
1 parent db1f0f2 commit ff16ac4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/Make.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ endif
118118
prefix ?= prefix
119119
builddir ?= build
120120

121+
libdir := $(prefix)/$(binlib)
122+
includedir := $(prefix)/include
123+
121124
define newline # a literal \n
122125

123126

src/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ endif
7373

7474
# Install both libraries and our headers
7575
install: $(TARGET_LIBRARIES)
76-
@mkdir -p $(DESTDIR)$(prefix)/include/libblastrampoline
77-
-@cp -Ra $(LBT_ROOT)/include/* $(DESTDIR)$(prefix)/include/libblastrampoline
78-
@cp -a $(LBT_ROOT)/src/libblastrampoline.h $(DESTDIR)$(prefix)/include/
79-
@mkdir -p $(DESTDIR)$(prefix)/$(binlib)
76+
@mkdir -p $(DESTDIR)/$(includedir)/libblastrampoline
77+
-@cp -Ra $(LBT_ROOT)/include/* $(DESTDIR)/$(includedir)/libblastrampoline
78+
@cp -a $(LBT_ROOT)/src/libblastrampoline.h $(DESTDIR)/$(includedir)/
79+
@mkdir -p $(DESTDIR)/$(libdir)
8080
@for lib in $(TARGET_LIBRARIES); do \
81-
cp -a $${lib} $(DESTDIR)$(prefix)/$(binlib)/; \
81+
cp -a $${lib} $(DESTDIR)/$(libdir)/; \
8282
done
8383
ifeq ($(OS),WINNT)
8484
@mkdir -p $(DESTDIR)$(prefix)/lib

0 commit comments

Comments
 (0)