git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Do not build i18n on Windows.
@ 2010-08-13 22:02 Johannes Sixt
  2010-08-13 22:19 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2010-08-13 22:02 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

We do not have the necessary libraries and tools.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 It is necessary to move the first check for NO_GETTEXT after the
 configuration section.

 NEEDS_LIBINTL receives a default setting before the configuration
 section (not visible in the patch text), hence, I have to unset it
 when NO_GETTEXT is set. Perhaps you have a better idea to arrange
 these settings.

 -- Hannes

 Makefile |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index cdb8222..48cf304 100644
--- a/Makefile
+++ b/Makefile
@@ -598,9 +598,6 @@ LIB_OBJS += entry.o
 LIB_OBJS += environment.o
 LIB_OBJS += exec_cmd.o
 LIB_OBJS += fsck.o
-ifndef NO_GETTEXT
-LIB_OBJS += gettext.o
-endif
 LIB_OBJS += graph.o
 LIB_OBJS += grep.o
 LIB_OBJS += hash.o
@@ -1100,6 +1097,7 @@ ifeq ($(uname_S),Windows)
 	NO_PYTHON = YesPlease
 	BLK_SHA1 = YesPlease
 	NATIVE_CRLF = YesPlease
+	NO_GETTEXT = YesPlease
 
 	CC = compat/vcbuild/scripts/clink.pl
 	AR = compat/vcbuild/scripts/lib.pl
@@ -1150,6 +1148,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
 	NO_REGEX = YesPlease
 	NO_PYTHON = YesPlease
 	BLK_SHA1 = YesPlease
+	NO_GETTEXT = YesPlease
 	COMPAT_CFLAGS 
+= -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32
 	COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
 	COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \
@@ -1499,6 +1498,9 @@ endif
 
 ifdef NO_GETTEXT
 	COMPAT_CFLAGS += -DNO_GETTEXT
+	NEEDS_LIBINTL =
+else
+	LIB_OBJS += gettext.o
 endif
 
 ifdef NEEDS_LIBINTL
-- 
1.7.1.402.gf1eeb

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Do not build i18n on Windows.
  2010-08-13 22:02 [PATCH] Do not build i18n on Windows Johannes Sixt
@ 2010-08-13 22:19 ` Ævar Arnfjörð Bjarmason
  2010-08-14  8:24   ` Johannes Sixt
  0 siblings, 1 reply; 3+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-13 22:19 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git

On Fri, Aug 13, 2010 at 22:02, Johannes Sixt <j6t@kdbg.org> wrote:
> We do not have the necessary libraries and tools.

Just curious, do you mean Windows / MINGW can't build gettext, or that
you just haven't done so in your build process yet? At least
http://www.mingw.org/wiki/LibrariesAndTools seems to indicate that
libintl has been ported to Windows.

If you're just not interested in building gettext by default on
Windows I think it's completely reasonable to add it to the Makefile
(given that you're probably pretty much the only one doing so). It
would just be useful to clarify the "why".

> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> ---
>  It is necessary to move the first check for NO_GETTEXT after the
>  configuration section.
>
>  NEEDS_LIBINTL receives a default setting before the configuration
>  section (not visible in the patch text), hence, I have to unset it
>  when NO_GETTEXT is set. Perhaps you have a better idea to arrange
>  these settings.

This seems backwards. Instead of removing the check from the LIB_OBJS
assignment and adding it in later I think we could just move the giant
"Platform specific tweaks" section so that it appears before all those
assignments, and directly after "export PYTHON_PATH".

I tried doing so locally and Git builds and tests fine, but I've only
done so on one platform, so I might have missed something.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Do not build i18n on Windows.
  2010-08-13 22:19 ` Ævar Arnfjörð Bjarmason
@ 2010-08-14  8:24   ` Johannes Sixt
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Sixt @ 2010-08-14  8:24 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

On Samstag, 14. August 2010, Ævar Arnfjörð Bjarmason wrote:
> On Fri, Aug 13, 2010 at 22:02, Johannes Sixt <j6t@kdbg.org> wrote:
> > We do not have the necessary libraries and tools.
>
> Just curious, do you mean Windows / MINGW can't build gettext, or that
> you just haven't done so in your build process yet? At least
> http://www.mingw.org/wiki/LibrariesAndTools seems to indicate that
> libintl has been ported to Windows.

The msysgit build environment that I am using does not have libintl. The 
reason *might* be that I haven't updated it since months. Upstream msysgit 
could already have it.

The MSVC build environment doesn't have libintl in any case. Even if msysgit 
gains libintl, the MSVC does *not* automatically gain it as well. Hence, 
setting NO_GETTEXT in the MSVC section of the Makefile makes sense for now.

BTW, libintl is not the only obstacle: the gettext tools are needed as well.

> If you're just not interested in building gettext by default on
> Windows I think it's completely reasonable to add it to the Makefile
> (given that you're probably pretty much the only one doing so). It
> would just be useful to clarify the "why".

As long as libintl and the gettext tools are not in msysgit, we should set 
NO_GETTEXT for MinGW builds. Once we have them, I don't care that much 
whether we set it by default or not.

-- Hannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-14  8:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-13 22:02 [PATCH] Do not build i18n on Windows Johannes Sixt
2010-08-13 22:19 ` Ævar Arnfjörð Bjarmason
2010-08-14  8:24   ` Johannes Sixt

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).