[PATCH/RFC] Auto detection in Makefile if msgfmt is not available

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

 



Since commit 5e9637c629702e3d41ad01d95956d1835d7338e0
"i18n: add infrastructure for translating Git with gettext"
the Makefile demands the existance of msgfmt, unless NO_GETTEXT is defined.

This breaks the build on systems where msgfmt is not installed.

Added a simple auto-detection and switch to NO_GETTEXT when
msgfmt could not be found on the system

Signed-off-by: Torsten Bögershausen <tboegi@xxxxxx>
---
 Makefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 87fb30a..23e1e77 100644
--- a/Makefile
+++ b/Makefile
@@ -353,7 +353,11 @@ RPMBUILD = rpmbuild
 TCL_PATH = tclsh
 TCLTK_PATH = wish
 XGETTEXT = xgettext
-MSGFMT = msgfmt
+ifeq ($(shell msgfmt --help 2>/dev/null && echo y),y)
+	MSGFMT = msgfmt
+else
+	NO_GETTEXT=UnfortunatelyYes
+endif
 PTHREAD_LIBS = -lpthread
 PTHREAD_CFLAGS =
 GCOV = gcov
-- 
1.7.8.3.1.g75d1cf.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]