]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Attempting to install glibc configured with --prefix=/usr into
authorMartin Sebor <msebor@redhat.com>
Fri, 12 Jun 2015 19:15:57 +0000 (13:15 -0600)
committerMartin Sebor <msebor@redhat.com>
Fri, 12 Jun 2015 19:15:57 +0000 (13:15 -0600)
a non-standard directory specified by the prefix make variable
fails with an error.  Since this is an unsupported use case,
this change makes make install fail early and with a descriptive
error message when either the prefix or the exec_prefix make
variable is overridden on the command line.

ChangeLog
INSTALL
Makerules
NEWS
manual/install.texi

index 3e6b877dfa7c555081244a1f621eee4853ab8b7c..ba9f629452fd0cfda1913b448dd88ed598f09015 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-06-12  Martin Sebor  <msebor@redhat.com>
+
+       [BZ #18512]
+       * Makerules (check-install-supported): New target.
+       (install): Add check-install-supported as a dependency.
+       * manual/install.texi (Installing the C Library): Document
+       that overriding prefix and exec_prefix is not supported.
+       Mention DESTDIR.
+       * INSTALL: Regenerate from the above.
+
 2015-06-12  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #18519]
diff --git a/INSTALL b/INSTALL
index 8e13f2cef7ca6719781d237843c80de14faebed6..d55de5dd47b28c951838ac39296c2717d0478d69 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -295,11 +295,13 @@ headers from libraries other than the GNU C Library yourself after
 installing the library.
 
    You can install the GNU C Library somewhere other than where you
-configured it to go by setting the 'install_root' variable on the
-command line for 'make install'.  The value of this variable is
+configured it to go by setting the 'DESTDIR' GNU standard make variable
+on the command line for 'make install'.  The value of this variable is
 prepended to all the paths for installation.  This is useful when
 setting up a chroot environment or preparing a binary distribution.  The
-directory should be specified with an absolute file name.
+directory should be specified with an absolute file name.  Installing
+with the 'prefix' and 'exec_prefix' GNU standard make variables set is
+not supported.
 
    The GNU C Library includes a daemon called 'nscd', which you may or
 may not want to run.  'nscd' caches name service lookups; it can
index ad9d74f66021a378096ec4962e3aa53118f50be5..372b3c010340962e9e157f20cae4fbbe77ae2f4c 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -916,6 +916,26 @@ endef
 installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
                             $(inst_libdir)/$(patsubst %,$(libtype$o),\
                                                     $(libprefix)$(libc-name)))
+
+.PHONY: check-install-supported
+check-install-supported:
+
+# Check to see if the prefix or exec_prefix GNU standard variable
+# has been overridden on the command line and, if so, fail with
+# an error message since doing so is not supported (set DESTDIR
+# instead).
+ifeq ($(origin prefix),command line)
+check-install-supported:
+       $(error Overriding prefix is not supported. Set DESTDIR instead.)
+endif
+
+ifeq ($(origin exec_prefix),command line)
+check-install-supported:
+       $(error Overriding exec_prefix is not supported. Set DESTDIR instead.)
+endif
+
+install: check-install-supported
+
 install: $(installed-libcs)
 $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
        $(make-target-directory)
diff --git a/NEWS b/NEWS
index ea3d8249666de5e8553aa7c47725c20f3e1f712b..da8bccfef3ccb936f78b38dc62f3fc189ed5a5c8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,7 +21,7 @@ Version 2.22
   18211, 18217, 18220, 18221, 18234, 18244, 18247, 18287, 18319, 18324,
   18333, 18346, 18397, 18409, 18410, 18412, 18418, 18422, 18434, 18444,
   18468, 18469, 18470, 18479, 18483, 18495, 18496, 18497, 18498, 18507,
-  18519, 18520, 18522.
+  18512, 18519, 18520, 18522.
 
 * Cache information can be queried via sysconf() function on s390 e.g. with
   _SC_LEVEL1_ICACHE_SIZE as argument.
index 42ee467463377c0d70a7309598d749e7957c2c5b..63c41b0b8daac1612659ef9bf7604560d7ef0259 100644 (file)
@@ -333,12 +333,14 @@ headers, but nothing else.  If you do this, you will need to restore
 any headers from libraries other than @theglibc{} yourself after installing the
 library.
 
-You can install @theglibc{} somewhere other than where you configured it to go
-by setting the @code{install_root} variable on the command line for
-@samp{make install}.  The value of this variable is prepended to all the
-paths for installation.  This is useful when setting up a chroot
-environment or preparing a binary distribution.  The directory should be
-specified with an absolute file name.
+You can install @theglibc{} somewhere other than where you configured
+it to go by setting the @code{DESTDIR} GNU standard make variable on
+the command line for @samp{make install}.  The value of this variable
+is prepended to all the paths for installation.  This is useful when
+setting up a chroot environment or preparing a binary distribution.
+The directory should be specified with an absolute file name. Installing
+with the @code{prefix} and @code{exec_prefix} GNU standard make variables
+set is not supported.
 
 @Theglibc{} includes a daemon called @code{nscd}, which you
 may or may not want to run.  @code{nscd} caches name service lookups; it