Skip to content

Commit

Permalink
Make it easier to modify shared library permissions during install
Browse files Browse the repository at this point in the history
The new LIB_PERM Makefile variable defaults to 644 (as before), but
can now be amended to e.g. 755.  Updated the INSTALL file with a
section for HP-UX explaining how to do this.

Fixes samtools#1525
  • Loading branch information
jkbonfield authored and daviesrob committed Dec 6, 2022
1 parent e88e343 commit 59f727a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ The 'make install' command installs the libraries, library header files,
utilities, several manual pages, and a pkgconfig file to /usr/local.
The installation location can be changed by configuring with --prefix=DIR
or via 'make prefix=DIR install' (see Installation Locations below).
Shared library permissions can be set via e.g. 'make install LIB_PERM=755'.


Configuration
Expand Down Expand Up @@ -291,3 +292,13 @@ mingw-w64-x86_64-xz mingw-w64-x86_64-curl mingw-w64-x86_64-autotools
mingw-w64-x86_64-tools-git

(The last is only needed for building libraries compatible with MSVC.)

HP-UX
-----

HP-UX requires that shared libraries have execute permission. The
default for HTSlib is to install with permission 644 (read-write for
owner and read-only for group / other). This can be overridden by
setting the LIB_PERM variable at install time with:

make install LIB_PERM=755
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ MKDIR_P = mkdir -p
INSTALL = install -p
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DIR = $(MKDIR_P) -m 755
INSTALL_LIB = $(INSTALL_DATA)
LIB_PERM = 644
INSTALL_LIB = $(INSTALL) -m $(LIB_PERM)
INSTALL_MAN = $(INSTALL_DATA)
INSTALL_PROGRAM = $(INSTALL)

Expand Down

0 comments on commit 59f727a

Please sign in to comment.