Skip to contentSkip to conversation

multipath-tools: set usr_prefix to /usr in default configuration

PATCH In review [email protected] 2 participants 2 messages Nov 13, 2023 – Nov 16, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipath-tools: set usr_prefix to /usr in default configuration

From: Martin Wilck <[email protected]>

In the default configuration (both prefix and usr_prefix unset), we'd install man pages and headers under /share/man and /include, respectively, which is very unusual. Have usr_prefix default to /usr in (the default) case where prefix is empty, and set it equal to /prefix otherwise.

---

This is submitted as an alternative approach to Ben Marzinski's late patch set "Makefile cleanups."

---
 Makefile.inc | 2 +-
 README.md    | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
Makefile.inc +1 -1
index a20e2ce..6b45430 100644
@@ -36,7 +36,7 @@ prefix		:=
 # Prefix for binaries
 exec_prefix	:= $(prefix)
 # Prefix for non-essential libraries (libdmmp)
-usr_prefix	:= $(prefix)
+usr_prefix	:= $(if $(prefix),$(prefix),/usr)
 # Prefix for configfuration files (multipath.conf)
 etc_prefix	:= $(prefix)
 # Where to install systemd-related files. systemd is usually installed under /usr
README.md +1 -2
index db03a33..d4f35f5 100644
@@ -131,8 +131,7 @@ The following variables can be passed to the `make` command line:
    "Usr-merged" distributions[^systemd] may want to set this to `/usr`. The
    default is empty (`""`).
  * `usr_prefix`: where to install those parts of the code that aren't necessary
-   for booting. Non-usr-merged distributions[^systemd] may want to set this to
-   `/usr`. The default is `$(prefix)`.
+   for booting. The default is `/usr` if `$(prefix)` is empty, and `$(prefix)` otherwise.
  * `systemd_prefix`: Prefix for systemd-related files[^systemd]. The default is `/usr`.
  * `etc_prefix`: The prefix for configuration files. "usr-merged"
    distributions with immutable `/usr`[^systemd] may want to set this to
Signature · 1 line
2.42.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Mon, Nov 13, 2023 at 03:08:26PM +0100, [email protected] wrote:

From: Martin Wilck <[email protected]>

In the default configuration (both prefix and usr_prefix unset), we'd install man pages and headers under /share/man and /include, respectively, which is very unusual. Have usr_prefix default to /usr in (the default) case where prefix is empty, and set it equal to /prefix otherwise.

Quoted 39 lines

---

This is submitted as an alternative approach to Ben Marzinski's late patch set "Makefile cleanups."

---
 Makefile.inc | 2 +-
 README.md    | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
Makefile.inc +1 -1
index a20e2ce..6b45430 100644
@@ -36,7 +36,7 @@ prefix		:=
 # Prefix for binaries
 exec_prefix	:= $(prefix)
 # Prefix for non-essential libraries (libdmmp)
-usr_prefix	:= $(prefix)
+usr_prefix	:= $(if $(prefix),$(prefix),/usr)
 # Prefix for configfuration files (multipath.conf)
 etc_prefix	:= $(prefix)
 # Where to install systemd-related files. systemd is usually installed under /usr
README.md +1 -2
index db03a33..d4f35f5 100644
@@ -131,8 +131,7 @@ The following variables can be passed to the `make` command line:
    "Usr-merged" distributions[^systemd] may want to set this to `/usr`. The
    default is empty (`""`).
  * `usr_prefix`: where to install those parts of the code that aren't necessary
-   for booting. Non-usr-merged distributions[^systemd] may want to set this to
-   `/usr`. The default is `$(prefix)`.
+   for booting. The default is `/usr` if `$(prefix)` is empty, and `$(prefix)` otherwise.
  * `systemd_prefix`: Prefix for systemd-related files[^systemd]. The default is `/usr`.
  * `etc_prefix`: The prefix for configuration files. "usr-merged"
    distributions with immutable `/usr`[^systemd] may want to set this to
Signature · 1 line
2.42.1