This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix make install in nss
- From: Petr Baudis <pasky at ucw dot cz>
- To: libc-alpha at sourceware dot org
- Date: Sat, 21 Apr 2012 11:46:48 +0200
- Subject: [PATCH] Fix make install in nss
Commit 77fb9117432a754388c52f6eb06c60a828975350 from June 2011
hardcodes /var/db path in Makeconfig for installation of
nss/db-Makefile. This breaks make install to a custom prefix.
(Something I do often during testing, so I'm slightly surprised that
noone caught this before.)
Ok to commit? (It might be deemed obvious, but I'm not terribly
familiar with the build system so I prefer review.)
2012-04-21 Petr Baudis <pasky@ucw.cz>
* Makeconfig: Define localstatedir depending on $(prefix),
use for vardbdir.
diff --git a/Makeconfig b/Makeconfig
index 4fc1141..a07f85a 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -285,9 +285,14 @@ sysconfdir = $(prefix)/etc
endif
inst_sysconfdir = $(install_root)$(sysconfdir)
+# Where to keep modifiable single-machine data.
+ifndef localstatedir
+localstatedir = $(prefix)/var
+endif
+
# Directory for the database files and Makefile for nss_db.
ifndef vardbdir
-vardbdir = /var/db
+vardbdir = $(localstatedir)/db
endif
inst_vardbdir = $(install_root)$(vardbdir)