From: "Torsten Bögershausen" <tboegi@web.de>
To: avarab@gmail.com, git@vger.kernel.org
Cc: tboegi@web.de
Subject: [PATCH/RFC] Auto detection in Makefile if msgfmt is not available
Date: Sun, 12 Feb 2012 13:42:24 +0100 [thread overview]
Message-ID: <201202121342.25113.tboegi@web.de> (raw)
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@web.de>
---
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
next reply other threads:[~2012-02-12 12:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-12 12:42 Torsten Bögershausen [this message]
2012-02-12 15:22 ` [PATCH/RFC] Auto detection in Makefile if msgfmt is not available Ævar Arnfjörð Bjarmason
2012-02-12 17:22 ` Junio C Hamano
2012-02-12 19:09 ` Torsten Bögershausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201202121342.25113.tboegi@web.de \
--to=tboegi@web.de \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).