summary refs log tree commit diff
path: root/intl
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@systemhalted.org>2016-02-24 20:06:04 -0500
committerCarlos O'Donell <carlos@systemhalted.org>2016-02-24 20:06:04 -0500
commit314f6deec991e8239ad3fb15aeed186fabe3483f (patch)
treec4aadd00b64f4e27ec9305b109648cbe22398bb4 /intl
parent7e6eccb5f611973038ad78c870ffcdd6af72c228 (diff)
downloadglibc-314f6deec991e8239ad3fb15aeed186fabe3483f.tar.gz
glibc-314f6deec991e8239ad3fb15aeed186fabe3483f.tar.xz
glibc-314f6deec991e8239ad3fb15aeed186fabe3483f.zip
Enable --localedir to set message catalog directory (Bug 14259)
In 1999 the project split "localedir" into "localedir" (path to compiled
locale archives) and "msgcatdir" (path to message catalogs). This
predates the 2002 change in the GNU Coding Standard to document the use
of "localedir" for the path to the message catalogs. It appears that
newlib, gcc, and several other projects also used "msgcatdir" at one
point or another in the past, and so it is in line with historical
precedent that glibc would also use "msgcatdir." However, given that the
GNU Coding Standard uses "localedir", we will switch to that for
consistency as a GNU project. Previous uses of --localdir didn't work
anyway (see bug 14259).

I am committing this patch in the understanding that nobody would object
to fixing #14259 as part of aligning our variable usage to the GNU
Coding Standard.

Given that previous "localedir" uses were converted to "complocaledir"
by [1], we can now convert "msgcatdir" to "localedir" and complete the
transition. With an addition to config.make.in we also fix bug 14259 and
allow users to specify the locale dependent data directory with
"--localedir" at configure time. There is still no way to control at
configure time the location of the *compiled* locale directory.

Tested on x86_64 with no regressions.

Tested using "--localedir" to specify alternate locale dependent data
directory and verified with "make install DESTDIR=/tmp/glibc".

[1] 90fe682d3067163aa773feecf497ef599429457a
Diffstat (limited to 'intl')
-rw-r--r--intl/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/intl/Makefile b/intl/Makefile
index 4ef9198410..96183b211e 100644
--- a/intl/Makefile
+++ b/intl/Makefile
@@ -36,7 +36,7 @@ tests = tst-ngettext
 
 before-compile += $(objpfx)msgs.h
 
-install-others = $(inst_msgcatdir)/locale.alias
+install-others = $(inst_localedir)/locale.alias
 
 generated += msgs.h mtrace-tst-gettext.out tst-gettext.mtrace
 generated-dirs += domaindir localedir
@@ -149,9 +149,9 @@ $(objpfx)tst-gettext4.out: $(objpfx)tst-gettext.out
 $(objpfx)tst-gettext5.out: $(objpfx)tst-gettext.out
 $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
 
-CPPFLAGS += -D'LOCALEDIR="$(msgcatdir)"' \
-	    -D'LOCALE_ALIAS_PATH="$(msgcatdir)"'
+CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
+	    -D'LOCALE_ALIAS_PATH="$(localedir)"'
 BISONFLAGS = --yacc --name-prefix=__gettext --output
 
-$(inst_msgcatdir)/locale.alias: locale.alias $(+force)
+$(inst_localedir)/locale.alias: locale.alias $(+force)
 	$(do-install)