Commit e5d1a713 authored by Thomas Haller's avatar Thomas Haller

build: unifiy specifying locale directory define

parent 82b088ab
...@@ -81,6 +81,8 @@ servicedir = $(datadir)/dbus-1/system-services ...@@ -81,6 +81,8 @@ servicedir = $(datadir)/dbus-1/system-services
completiondir = $(datadir)/bash-completion/completions completiondir = $(datadir)/bash-completion/completions
nmlocaledir = $(datadir)/locale
GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
...@@ -577,7 +579,7 @@ libnm_core_libnm_core_la_CPPFLAGS = \ ...@@ -577,7 +579,7 @@ libnm_core_libnm_core_la_CPPFLAGS = \
$(dflt_cppflags_libnm_core) \ $(dflt_cppflags_libnm_core) \
-DG_LOG_DOMAIN=\""libnm"\" \ -DG_LOG_DOMAIN=\""libnm"\" \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE \
-DLOCALEDIR=\"$(datadir)/locale\" \ -DNMLOCALEDIR=\"$(nmlocaledir)\" \
-DNMCONFDIR=\"$(nmconfdir)\" \ -DNMCONFDIR=\"$(nmconfdir)\" \
-DNMLIBDIR=\"$(nmlibdir)\" \ -DNMLIBDIR=\"$(nmlibdir)\" \
-DNMVPNDIR=\"$(pkglibdir)\" \ -DNMVPNDIR=\"$(pkglibdir)\" \
...@@ -1192,7 +1194,7 @@ src_cppflags = \ ...@@ -1192,7 +1194,7 @@ src_cppflags = \
-DRUNDIR=\"$(rundir)\" \ -DRUNDIR=\"$(rundir)\" \
\ \
-DNMCONFDIR=\"$(nmconfdir)\" \ -DNMCONFDIR=\"$(nmconfdir)\" \
-DNMLOCALEDIR=\"$(datadir)/locale\" \ -DNMLOCALEDIR=\"$(nmlocaledir)\" \
-DNMPLUGINDIR=\"$(plugindir)\" \ -DNMPLUGINDIR=\"$(plugindir)\" \
-DNMRUNDIR=\"$(nmrundir)\" \ -DNMRUNDIR=\"$(nmrundir)\" \
-DNMSTATEDIR=\"$(nmstatedir)\" \ -DNMSTATEDIR=\"$(nmstatedir)\" \
...@@ -3360,7 +3362,7 @@ clients_nm_online_CPPFLAGS = \ ...@@ -3360,7 +3362,7 @@ clients_nm_online_CPPFLAGS = \
$(GLIB_CFLAGS) \ $(GLIB_CFLAGS) \
-DG_LOG_DOMAIN=\""nm-online"\" \ -DG_LOG_DOMAIN=\""nm-online"\" \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT \
-DNMLOCALEDIR=\"$(datadir)/locale\" -DNMLOCALEDIR=\"$(nmlocaledir)\"
clients_nm_online_LDFLAGS = \ clients_nm_online_LDFLAGS = \
-Wl,--version-script="$(srcdir)/linker-script-binary.ver" -Wl,--version-script="$(srcdir)/linker-script-binary.ver"
...@@ -3388,7 +3390,7 @@ clients_cppflags = \ ...@@ -3388,7 +3390,7 @@ clients_cppflags = \
-I$(srcdir)/clients/common \ -I$(srcdir)/clients/common \
-I$(builddir)/clients/common \ -I$(builddir)/clients/common \
$(GLIB_CFLAGS) \ $(GLIB_CFLAGS) \
-DNMLOCALEDIR=\"$(datadir)/locale\" \ -DNMLOCALEDIR=\"$(nmlocaledir)\" \
$(NULL) $(NULL)
check_ltlibraries += clients/common/libnmc-base.la check_ltlibraries += clients/common/libnmc-base.la
...@@ -3542,7 +3544,7 @@ clients_cli_nmcli_CPPFLAGS = \ ...@@ -3542,7 +3544,7 @@ clients_cli_nmcli_CPPFLAGS = \
-DSYSCONFDIR=\"$(sysconfdir)\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \
-DG_LOG_DOMAIN=\""nmcli"\" \ -DG_LOG_DOMAIN=\""nmcli"\" \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT \
-DNMCLI_LOCALEDIR=\"$(datadir)/locale\" -DNMLOCALEDIR=\"$(nmlocaledir)\"
clients_cli_nmcli_LDADD = \ clients_cli_nmcli_LDADD = \
libnm/libnm.la \ libnm/libnm.la \
...@@ -3748,7 +3750,7 @@ clients_tui_nmtui_CPPFLAGS = \ ...@@ -3748,7 +3750,7 @@ clients_tui_nmtui_CPPFLAGS = \
$(NEWT_CFLAGS) \ $(NEWT_CFLAGS) \
-DG_LOG_DOMAIN=\""nmtui"\" \ -DG_LOG_DOMAIN=\""nmtui"\" \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT \
-DLOCALEDIR=\""$(localedir)"\" -DNMLOCALEDIR=\""$(localedir)"\"
clients_tui_nmtui_LDFLAGS = \ clients_tui_nmtui_LDFLAGS = \
-Wl,--version-script="$(srcdir)/linker-script-binary.ver" \ -Wl,--version-script="$(srcdir)/linker-script-binary.ver" \
...@@ -3909,7 +3911,7 @@ libnm_util_cppflags = \ ...@@ -3909,7 +3911,7 @@ libnm_util_cppflags = \
-I$(builddir)/shared \ -I$(builddir)/shared \
-DG_LOG_DOMAIN=\""libnm-util"\" \ -DG_LOG_DOMAIN=\""libnm-util"\" \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_UTIL \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_UTIL \
-DLOCALEDIR=\"$(datadir)/locale\" \ -DNMLOCALEDIR=\"$(nmlocaledir)\" \
$(GLIB_CFLAGS) \ $(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \ $(DBUS_CFLAGS) \
$(UUID_CFLAGS) $(UUID_CFLAGS)
......
...@@ -29,7 +29,7 @@ deps = [ ...@@ -29,7 +29,7 @@ deps = [
cflags = clients_cflags + [ cflags = clients_cflags + [
'-DSYSCONFDIR="@0@"'.format(nm_sysconfdir), '-DSYSCONFDIR="@0@"'.format(nm_sysconfdir),
'-DG_LOG_DOMAIN="@0@"'.format(name), '-DG_LOG_DOMAIN="@0@"'.format(name),
'-DNMCLI_LOCALEDIR="@0@"'.format(nm_localedir) '-DNMLOCALEDIR="@0@"'.format(nm_localedir)
] ]
if enable_polkit_agent if enable_polkit_agent
......
...@@ -950,7 +950,7 @@ main (int argc, char *argv[]) ...@@ -950,7 +950,7 @@ main (int argc, char *argv[])
#ifdef GETTEXT_PACKAGE #ifdef GETTEXT_PACKAGE
/* Set i18n stuff */ /* Set i18n stuff */
bindtextdomain (GETTEXT_PACKAGE, NMCLI_LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, NMLOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE); textdomain (GETTEXT_PACKAGE);
#endif #endif
......
...@@ -7,7 +7,7 @@ deps = [ ...@@ -7,7 +7,7 @@ deps = [
cflags = clients_cflags + [ cflags = clients_cflags + [
'-DG_LOG_DOMAIN="@0@"'.format(name), '-DG_LOG_DOMAIN="@0@"'.format(name),
'-DLOCALEDIR="@0@"'.format(nm_localedir) '-DNMLOCALEDIR="@0@"'.format(nm_localedir)
] ]
subdir('newt') subdir('newt')
......
...@@ -226,7 +226,7 @@ main (int argc, char **argv) ...@@ -226,7 +226,7 @@ main (int argc, char **argv)
int i; int i;
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, NMLOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE); textdomain (GETTEXT_PACKAGE);
......
...@@ -138,7 +138,7 @@ cflags = [ ...@@ -138,7 +138,7 @@ cflags = [
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name), '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE', '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
'-DLIBEXECDIR="@0@"'.format(nm_libexecdir), '-DLIBEXECDIR="@0@"'.format(nm_libexecdir),
'-DLOCALEDIR="@0@"'.format(nm_localedir), '-DNMLOCALEDIR="@0@"'.format(nm_localedir),
'-DNMCONFDIR="@0@"'.format(nm_pkgconfdir), '-DNMCONFDIR="@0@"'.format(nm_pkgconfdir),
'-DNMLIBDIR="@0@"'.format(nm_pkglibdir), '-DNMLIBDIR="@0@"'.format(nm_pkglibdir),
'-DNMPLUGINDIR="@0@"'.format(nm_plugindir), '-DNMPLUGINDIR="@0@"'.format(nm_plugindir),
......
...@@ -249,7 +249,7 @@ _nm_utils_init (void) ...@@ -249,7 +249,7 @@ _nm_utils_init (void)
g_error ("libnm-util symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported"); g_error ("libnm-util symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported");
g_module_close (self); g_module_close (self);
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, NMLOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
_nm_dbus_errors_init (); _nm_dbus_errors_init ();
......
...@@ -101,7 +101,7 @@ deps = [ ...@@ -101,7 +101,7 @@ deps = [
common_cflags = [ common_cflags = [
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_UTIL', '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_UTIL',
'-DLOCALEDIR="@0@"'.format(nm_localedir), '-DNMLOCALEDIR="@0@"'.format(nm_localedir),
] ]
cflags = common_cflags + [ cflags = common_cflags + [
......
...@@ -232,7 +232,7 @@ nm_utils_init (GError **error) ...@@ -232,7 +232,7 @@ nm_utils_init (GError **error)
if (!initialized) { if (!initialized) {
initialized = TRUE; initialized = TRUE;
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, NMLOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
if (!crypto_init (error)) if (!crypto_init (error))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment