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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Martin Wilck <mwilck@xxxxxxxx>

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.

Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---

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(-)

diff --git a/Makefile.inc b/Makefile.inc
index a20e2ce..6b45430 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -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
diff --git a/README.md b/README.md
index db03a33..d4f35f5 100644
--- a/README.md
+++ b/README.md
@@ -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
-- 
2.42.1





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux