Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch/rfc] Enable PO files.
@ 2004-07-29 15:55 Andrew Cagney
  2004-07-30 14:46 ` Andrew Cagney
  2004-07-30 18:56 ` Tom Tromey
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Cagney @ 2004-07-29 15:55 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

[-- Attachment #1: Type: text/plain, Size: 513 bytes --]

Hello,

http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=761

I went shopping for solutions and found that GCC:

- generated the catalog (instead of hard wiring it in configure.in)
- the output is put in the _build_ directory (instead of RO srcdir)

and more-or-less borrowed the code.  However, GCC's code also:

- insisted on using ../intl/

I didn't borrow that - GDB will still use an installed intl/ (I'm 
wondering if its time to boot intl/ out of GDB's distro).

Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 9013 bytes --]

2004-07-29  Andrew Cagney  <cagney@gnu.org>

	Fix PR i18n/761.
	* Makefile.in (.SUFFIXES): Add po .gmo, and .pox.
	(.PHONY): Add all-po install-po, uninstall-po, clean-po,
	$(PACKAGE).pot and update-po.
	(all-po, .po.gmo, .po.pox, install-po, $(PACKAGE).pot)
	(po/$(PACKAGE).pot, clean-po, uninstall-po, install-po)
	(update-po): New rules.
	(localedir): Define.
	(diststuff): Add $(PACKAGE).pot and $(CATALOGS)
	(GDB_CFLAGS): Update -DLOCALEDIR to use $(localedir).
	(XGETTEXT, GMSGFMT, MSGMERGE, PACKAGE, CATALOGS): Define.
	* configure.in: Generate CATALOGS and LINGUAS from contents of
	src/gdb/po/ directory.
	* configure: Re-generate.
	* po/gdbtext: New file
	
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.597
diff -p -u -r1.597 Makefile.in
--- Makefile.in	29 Jul 2004 15:13:05 -0000	1.597
+++ Makefile.in	29 Jul 2004 15:36:34 -0000
@@ -29,6 +29,7 @@ libdir = @libdir@
 tooldir = $(libdir)/$(target_alias)
 
 datadir = @datadir@
+localedir = $(datadir)/locale
 mandir = @mandir@
 man1dir = $(mandir)/man1
 man2dir = $(mandir)/man2
@@ -65,6 +66,13 @@ DLLTOOL = @DLLTOOL@
 WINDRES = @WINDRES@
 MIG = @MIG@
 
+XGETTEXT = @XGETTEXT@
+GMSGFMT = @GMSGFMT@
+MSGMERGE = msgmerge
+
+PACKAGE = @PACKAGE@
+CATALOGS = @CATALOGS@
+
 # If you are compiling with GCC, make sure that either 1) You have the
 # fixed include files where GCC can reach them, or 2) You use the
 # -traditional flag.  Otherwise the ioctl calls in inflow.c
@@ -317,7 +325,7 @@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
 # your system doesn't have fcntl.h in /usr/include (which is where it
 # should be according to Posix).
 DEFS = @DEFS@
-GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/locale\"" $(DEFS)
+GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(localedir)\"" $(DEFS)
 
 # M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS
 # from the config directory.
@@ -1254,7 +1262,7 @@ do-maintainer-clean:
 	@$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(SUBDIRS)" \
 		subdir_do
 
-diststuff: $(DISTSTUFF)
+diststuff: $(DISTSTUFF) $(PACKAGE).pot $(CATALOGS)
 	cd doc; $(MAKE) $(MFLAGS) diststuff
 
 subdir_do: force
@@ -1467,6 +1475,80 @@ v850ice.o: $(srcdir)/v850ice.c
 valprint.o: $(srcdir)/valprint.c
 	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/valprint.c
 
+\f
+# Message files.  Based on code in gcc/Makefile.in.
+
+# Rules for generating translated message descriptions.  Disabled by
+# autoconf if the tools are not available.
+
+.SUFFIXES: .po .gmo .pox .pot
+.PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot
+
+all-po: $(CATALOGS)
+
+# This notation should be acceptable to all Make implementations used
+# by people who are interested in updating .po files.
+update-po: $(CATALOGS:.gmo=.pox)
+
+# N.B. We do not attempt to copy these into $(srcdir).  The snapshot
+# script does that.
+.po.gmo:
+	-test -d po || mkdir po
+	$(GMSGFMT) --statistics -o $@ $<
+
+# The new .po has to be gone over by hand, so we deposit it into
+# build/po with a different extension.  If build/po/$(PACKAGE).pot
+# exists, use it (it was just created), else use the one in srcdir.
+.po.pox:
+	-test -d po || mkdir po
+	$(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
+			then echo po/$(PACKAGE).pot; \
+			else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
+
+# This rule has to look for .gmo modules in both srcdir and the cwd,
+# and has to check that we actually have a catalog for each language,
+# in case they weren't built or included with the distribution.
+install-po:
+	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)
+	cats="$(CATALOGS)"; for cat in $$cats; do \
+	  lang=`basename $$cat | sed 's/\.gmo$$//'`; \
+	  if [ -f $$cat ]; then :; \
+	  elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
+	  else continue; \
+	  fi; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  echo $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir; \
+	  $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir || exit 1; \
+	  echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
+	  $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
+	done
+uninstall-po:
+	cats="$(CATALOGS)"; for cat in $$cats; do \
+	  lang=`basename $$cat | sed 's/\.gmo$$//'`; \
+	  if [ -f $$cat ]; then :; \
+	  elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
+	  else continue; \
+	  fi; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  rm -f $(DESTDIR)$$dir/$(PACKAGE).mo; \
+	done
+# Delete po/*.gmo only if we are not building in the source directory.
+clean-po:
+	-if [ ! -f Makefile.in ]; then rm -f po/*.gmo; fi
+
+# Rule for regenerating the message template (gdb.pot).  Instead of
+# forcing everyone to edit POTFILES.in, which proved impractical, this
+# rule has no dependencies and always regenerates gdb.pot.  This is
+# relatively harmless since the .po files do not directly depend on
+# it.  The .pot file is left in the build directory.  Since GDB's
+# Makefile lacks a cannonical list of sources (missing xm, tm and nm
+# files) force this rule.
+$(PACKAGE).pot: po/$(PACKAGE).pot
+po/$(PACKAGE).pot: force
+	-test -d po || mkdir po
+	sh -e $(srcdir)/po/gdbtext $(XGETTEXT) $(PACKAGE) . $(srcdir)
+
+\f
 #
 # YACC/LEX dependencies
 #
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.158
diff -p -u -r1.158 configure.in
--- configure.in	17 Jul 2004 11:24:24 -0000	1.158
+++ configure.in	29 Jul 2004 15:36:34 -0000
@@ -42,10 +42,67 @@ AC_CANONICAL_SYSTEM
 # 2.5x.
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 
+dnl List of object files and targets accumulated by configure.
+
+CONFIG_OBS=
+CONFIG_DEPS=
+CONFIG_SRCS=
+ENABLE_CFLAGS=
+
+CONFIG_ALL=
+CONFIG_CLEAN=
+CONFIG_INSTALL=
+CONFIG_UNINSTALL=
+
 dnl Set up for gettext.  PACKAGE is used when we call bindtextdomain.
-ALL_LINGUAS=
+
 CY_GNU_GETTEXT
-AC_DEFINE(PACKAGE, "gdb", [Name of this package. ])
+
+if test "x$POSUB" != x; then
+
+  dnl Lifted from GCC's config/gettext.m4.
+  AC_MSG_CHECKING(for catalogs to be installed)
+  # Look for .po and .gmo files in the source directory.
+  CATALOGS=  AC_SUBST(CATALOGS)
+  XLINGUAS=
+  for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+    # If there aren't any .gmo files the shell will give us the
+    # literal string "../path/to/srcdir/po/*.gmo" which has to be
+    # weeded out.
+    case "$cat" in *\**)
+      continue;;
+    esac
+    # The quadruple backslash is collapsed to a double backslash
+    # by the backticks, then collapsed again by the double quotes,
+    # leaving us with one backslash in the sed expression (right
+    # before the dot that mustn't act as a wildcard).
+    cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
+    lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
+    # The user is allowed to set LINGUAS to a list of languages to
+    # install catalogs for.  If it's empty that means "all of them."
+    if test "x$LINGUAS" = x; then
+      CATALOGS="$CATALOGS $cat"
+      XLINGUAS="$XLINGUAS $lang"
+    else
+      case "$LINGUAS" in *$lang*)
+        CATALOGS="$CATALOGS $cat"
+        XLINGUAS="$XLINGUAS $lang"
+        ;;
+      esac
+    fi
+  done
+  LINGUAS="$XLINGUAS"
+  AC_MSG_RESULT($LINGUAS)
+
+   CONFIG_ALL="$CONFIG_ALL all-po"
+   CONFIG_CLEAN="$CONFIG_CLEAN clean-po"		   
+   CONFIG_INSTALL="$CONFIG_INSTALL install-po"
+   CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
+fi
+
+PACKAGE=gdb
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package. ])
+AC_SUBST(PACKAGE)
 
 debugdir=${libdir}/debug
 	 
@@ -57,17 +114,6 @@ AC_DEFINE_DIR(DEBUGDIR, debugdir,
               [Global directory for separate debug files. ])
 #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
 
-dnl List of object files added by configure.
-
-CONFIG_OBS=
-CONFIG_DEPS=
-CONFIG_SRCS=
-ENABLE_CFLAGS=
-CONFIG_ALL=
-CONFIG_CLEAN=
-CONFIG_INSTALL=
-CONFIG_UNINSTALL=
-
 AC_CONFIG_SUBDIRS(doc testsuite)
 configdirs=
 
Index: po/gdbtext
===================================================================
RCS file: po/gdbtext
diff -N po/gdbtext
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ po/gdbtext	29 Jul 2004 15:36:34 -0000
@@ -0,0 +1,38 @@
+#!/bin/sh -e
+
+if test $# -lt 3
+then
+    echo "Usage: $0 <xgettext> <package>  <directory> ..." 1>&2
+    exit 0
+fi
+
+xgettext=$1 ; shift
+package=$1 ; shift
+
+for d in "$@"
+do
+  __directories="$__directories --directory=$d"
+done
+
+for d in "$@"
+do
+  (
+      cd $d
+      find * \
+	  -name '*-stub.c' -prune -o \
+	  -name 'testsuite' -prune -o \
+	  -name 'init.c' -prune -o \
+	  -name '*.[hc]' -print
+  )
+done | ${xgettext} \
+    --default-domain=${package} \
+    --copyright-holder="Free Software Foundation, Inc." \
+    --add-comments \
+    --files-from=- \
+    --force-po \
+    --debug \
+    --language=c \
+    --keyword=_ \
+    --keyword=N_ \
+    ${__directories} \
+    -o po/${package}.pot

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

* Re: [patch/rfc] Enable PO files.
  2004-07-29 15:55 [patch/rfc] Enable PO files Andrew Cagney
@ 2004-07-30 14:46 ` Andrew Cagney
  2004-07-30 18:56 ` Tom Tromey
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2004-07-30 14:46 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

I've committed the attached.  The only difference from the original is 
that I fixed a problem with LOCALEDIR.  The Makefile and C code ended up 
using different paths.

I've also checked that it works (by hand) using a fake catalogue:

> cagney@nettle$ LANGUAGE=au ./gdb --help
> G'day, this is the GNU debugger.  Usage:
> 
>     gdb [options] [executable-file [core-file or process-id]]
>     gdb [options] --args executable-file [inferior-arguments ...]

We'll need an i18n.exp test but first we'll need a real catalogue :-)

Next tasks are annotate the text, and get ourselves integrated into the 
translation process.

enjoy,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 8155 bytes --]

2004-07-29  Andrew Cagney  <cagney@gnu.org>

	Fix PR i18n/761.
	* Makefile.in (.SUFFIXES): Add po .gmo, and .pox.
	(.PHONY): Add all-po install-po, uninstall-po, clean-po,
	$(PACKAGE).pot and update-po.
	(all-po, .po.gmo, .po.pox, install-po, $(PACKAGE).pot)
	(po/$(PACKAGE).pot, clean-po, uninstall-po, install-po)
	(update-po): New rules.
	(localedir): Define using autoconf.
	(diststuff): Add $(PACKAGE).pot and $(CATALOGS)
	(GDB_CFLAGS): Define LOCALEDIR using $(localedir).
	(XGETTEXT, GMSGFMT, MSGMERGE, PACKAGE, CATALOGS): Define.
	* configure.in: Generate CATALOGS and LINGUAS from contents of
	src/gdb/po/ directory.  Set @localedir@ in Makefile.in.
	* configure: Re-generate.
	* po/gdbtext: New file
	
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.597
diff -p -u -r1.597 Makefile.in
--- Makefile.in	29 Jul 2004 15:13:05 -0000	1.597
+++ Makefile.in	30 Jul 2004 14:25:16 -0000
@@ -29,6 +29,7 @@ libdir = @libdir@
 tooldir = $(libdir)/$(target_alias)
 
 datadir = @datadir@
+localedir = @localedir@
 mandir = @mandir@
 man1dir = $(mandir)/man1
 man2dir = $(mandir)/man2
@@ -65,6 +66,13 @@ DLLTOOL = @DLLTOOL@
 WINDRES = @WINDRES@
 MIG = @MIG@
 
+XGETTEXT = @XGETTEXT@
+GMSGFMT = @GMSGFMT@
+MSGMERGE = msgmerge
+
+PACKAGE = @PACKAGE@
+CATALOGS = @CATALOGS@
+
 # If you are compiling with GCC, make sure that either 1) You have the
 # fixed include files where GCC can reach them, or 2) You use the
 # -traditional flag.  Otherwise the ioctl calls in inflow.c
@@ -317,7 +325,7 @@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
 # your system doesn't have fcntl.h in /usr/include (which is where it
 # should be according to Posix).
 DEFS = @DEFS@
-GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/locale\"" $(DEFS)
+GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(localedir)\"" $(DEFS)
 
 # M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS
 # from the config directory.
@@ -1254,7 +1262,7 @@ do-maintainer-clean:
 	@$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(SUBDIRS)" \
 		subdir_do
 
-diststuff: $(DISTSTUFF)
+diststuff: $(DISTSTUFF) $(PACKAGE).pot $(CATALOGS)
 	cd doc; $(MAKE) $(MFLAGS) diststuff
 
 subdir_do: force
@@ -1467,6 +1475,80 @@ v850ice.o: $(srcdir)/v850ice.c
 valprint.o: $(srcdir)/valprint.c
 	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/valprint.c
 
+\f
+# Message files.  Based on code in gcc/Makefile.in.
+
+# Rules for generating translated message descriptions.  Disabled by
+# autoconf if the tools are not available.
+
+.SUFFIXES: .po .gmo .pox .pot
+.PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot
+
+all-po: $(CATALOGS)
+
+# This notation should be acceptable to all Make implementations used
+# by people who are interested in updating .po files.
+update-po: $(CATALOGS:.gmo=.pox)
+
+# N.B. We do not attempt to copy these into $(srcdir).  The snapshot
+# script does that.
+.po.gmo:
+	-test -d po || mkdir po
+	$(GMSGFMT) --statistics -o $@ $<
+
+# The new .po has to be gone over by hand, so we deposit it into
+# build/po with a different extension.  If build/po/$(PACKAGE).pot
+# exists, use it (it was just created), else use the one in srcdir.
+.po.pox:
+	-test -d po || mkdir po
+	$(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
+			then echo po/$(PACKAGE).pot; \
+			else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
+
+# This rule has to look for .gmo modules in both srcdir and the cwd,
+# and has to check that we actually have a catalog for each language,
+# in case they weren't built or included with the distribution.
+install-po:
+	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)
+	cats="$(CATALOGS)"; for cat in $$cats; do \
+	  lang=`basename $$cat | sed 's/\.gmo$$//'`; \
+	  if [ -f $$cat ]; then :; \
+	  elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
+	  else continue; \
+	  fi; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  echo $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir; \
+	  $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir || exit 1; \
+	  echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
+	  $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
+	done
+uninstall-po:
+	cats="$(CATALOGS)"; for cat in $$cats; do \
+	  lang=`basename $$cat | sed 's/\.gmo$$//'`; \
+	  if [ -f $$cat ]; then :; \
+	  elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
+	  else continue; \
+	  fi; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  rm -f $(DESTDIR)$$dir/$(PACKAGE).mo; \
+	done
+# Delete po/*.gmo only if we are not building in the source directory.
+clean-po:
+	-if [ ! -f Makefile.in ]; then rm -f po/*.gmo; fi
+
+# Rule for regenerating the message template (gdb.pot).  Instead of
+# forcing everyone to edit POTFILES.in, which proved impractical, this
+# rule has no dependencies and always regenerates gdb.pot.  This is
+# relatively harmless since the .po files do not directly depend on
+# it.  The .pot file is left in the build directory.  Since GDB's
+# Makefile lacks a cannonical list of sources (missing xm, tm and nm
+# files) force this rule.
+$(PACKAGE).pot: po/$(PACKAGE).pot
+po/$(PACKAGE).pot: force
+	-test -d po || mkdir po
+	sh -e $(srcdir)/po/gdbtext $(XGETTEXT) $(PACKAGE) . $(srcdir)
+
+\f
 #
 # YACC/LEX dependencies
 #
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.158
diff -p -u -r1.158 configure.in
--- configure.in	17 Jul 2004 11:24:24 -0000	1.158
+++ configure.in	30 Jul 2004 14:25:16 -0000
@@ -42,10 +42,70 @@ AC_CANONICAL_SYSTEM
 # 2.5x.
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 
+dnl List of object files and targets accumulated by configure.
+
+CONFIG_OBS=
+CONFIG_DEPS=
+CONFIG_SRCS=
+ENABLE_CFLAGS=
+
+CONFIG_ALL=
+CONFIG_CLEAN=
+CONFIG_INSTALL=
+CONFIG_UNINSTALL=
+
 dnl Set up for gettext.  PACKAGE is used when we call bindtextdomain.
-ALL_LINGUAS=
+
 CY_GNU_GETTEXT
-AC_DEFINE(PACKAGE, "gdb", [Name of this package. ])
+
+localedir='${datadir}/locale'
+AC_SUBST(localedir)
+
+if test "x$POSUB" != x; then
+
+  dnl Lifted from GCC's config/gettext.m4.
+  AC_MSG_CHECKING(for catalogs to be installed)
+  # Look for .po and .gmo files in the source directory.
+  CATALOGS=  AC_SUBST(CATALOGS)
+  XLINGUAS=
+  for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+    # If there aren't any .gmo files the shell will give us the
+    # literal string "../path/to/srcdir/po/*.gmo" which has to be
+    # weeded out.
+    case "$cat" in *\**)
+      continue;;
+    esac
+    # The quadruple backslash is collapsed to a double backslash
+    # by the backticks, then collapsed again by the double quotes,
+    # leaving us with one backslash in the sed expression (right
+    # before the dot that mustn't act as a wildcard).
+    cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
+    lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
+    # The user is allowed to set LINGUAS to a list of languages to
+    # install catalogs for.  If it's empty that means "all of them."
+    if test "x$LINGUAS" = x; then
+      CATALOGS="$CATALOGS $cat"
+      XLINGUAS="$XLINGUAS $lang"
+    else
+      case "$LINGUAS" in *$lang*)
+        CATALOGS="$CATALOGS $cat"
+        XLINGUAS="$XLINGUAS $lang"
+        ;;
+      esac
+    fi
+  done
+  LINGUAS="$XLINGUAS"
+  AC_MSG_RESULT($LINGUAS)
+
+   CONFIG_ALL="$CONFIG_ALL all-po"
+   CONFIG_CLEAN="$CONFIG_CLEAN clean-po"		   
+   CONFIG_INSTALL="$CONFIG_INSTALL install-po"
+   CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
+fi
+
+PACKAGE=gdb
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package. ])
+AC_SUBST(PACKAGE)
 
 debugdir=${libdir}/debug
 	 
@@ -57,17 +117,6 @@ AC_DEFINE_DIR(DEBUGDIR, debugdir,
               [Global directory for separate debug files. ])
 #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
 
-dnl List of object files added by configure.
-
-CONFIG_OBS=
-CONFIG_DEPS=
-CONFIG_SRCS=
-ENABLE_CFLAGS=
-CONFIG_ALL=
-CONFIG_CLEAN=
-CONFIG_INSTALL=
-CONFIG_UNINSTALL=
-
 AC_CONFIG_SUBDIRS(doc testsuite)
 configdirs=
 

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

* Re: [patch/rfc] Enable PO files.
  2004-07-29 15:55 [patch/rfc] Enable PO files Andrew Cagney
  2004-07-30 14:46 ` Andrew Cagney
@ 2004-07-30 18:56 ` Tom Tromey
  2004-07-31 17:42   ` Andrew Cagney
  2004-08-06 16:07   ` Andrew Cagney
  1 sibling, 2 replies; 5+ messages in thread
From: Tom Tromey @ 2004-07-30 18:56 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

>>>>> "Andrew" == Andrew Cagney <cagney@gnu.org> writes:

Andrew> - the output is put in the _build_ directory (instead of RO srcdir)

The only issue with this, I think, is how releases are made -- but I
see from the patch that you already dealt with this.

Andrew> - insisted on using ../intl/
Andrew> I didn't borrow that - GDB will still use an installed intl/ (I'm
Andrew> wondering if its time to boot intl/ out of GDB's distro).

Hmm, I thought the point of doing this is that the stuff in intl,
while readily available on Linux boxes, isn't so available elsewhere.
I could be behind the times, though, I haven't looked at the nuts and
bolts of gettext building in years.

Andrew> +      find * \
Andrew> +	  -name '*-stub.c' -prune -o \
Andrew> +	  -name 'testsuite' -prune -o \
Andrew> +	  -name 'init.c' -prune -o \
Andrew> +	  -name '*.[hc]' -print

I never liked using find for things like this, since I tend to push
files out of the way by "mv foo.c hacked-foo.c", but I can understand
why you'd do it this way.  I suppose it could only negatively affect
some subset of "real gdb developers" anyway, provided releases are
always done from a pristine checkout.

Tom


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

* Re: [patch/rfc] Enable PO files.
  2004-07-30 18:56 ` Tom Tromey
@ 2004-07-31 17:42   ` Andrew Cagney
  2004-08-06 16:07   ` Andrew Cagney
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2004-07-31 17:42 UTC (permalink / raw)
  To: tromey; +Cc: gdb-patches

>>>>>>>>>>> "Andrew" == Andrew Cagney <cagney@gnu.org> writes:
> 
> 
> Andrew> - the output is put in the _build_ directory (instead of RO srcdir)
> 
> The only issue with this, I think, is how releases are made -- but I
> see from the patch that you already dealt with this.
> 
> Andrew> - insisted on using ../intl/
> Andrew> I didn't borrow that - GDB will still use an installed intl/ (I'm
> Andrew> wondering if its time to boot intl/ out of GDB's distro).
> 
> Hmm, I thought the point of doing this is that the stuff in intl,
> while readily available on Linux boxes, isn't so available elsewhere.
> I could be behind the times, though, I haven't looked at the nuts and
> bolts of gettext building in years.

GCC appears to insist on using intl/ instead of using the installed 
stuff when available?

Do we [gdb] also want to be in the business of maintaining a local intl/?

> Andrew> +      find * \
> Andrew> +	  -name '*-stub.c' -prune -o \
> Andrew> +	  -name 'testsuite' -prune -o \
> Andrew> +	  -name 'init.c' -prune -o \
> Andrew> +	  -name '*.[hc]' -print
> 
> I never liked using find for things like this, since I tend to push
> files out of the way by "mv foo.c hacked-foo.c", but I can understand
> why you'd do it this way.  I suppose it could only negatively affect
> some subset of "real gdb developers" anyway, provided releases are
> always done from a pristine checkout.

yes, and yes.

Andrew



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

* Re: [patch/rfc] Enable PO files.
  2004-07-30 18:56 ` Tom Tromey
  2004-07-31 17:42   ` Andrew Cagney
@ 2004-08-06 16:07   ` Andrew Cagney
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2004-08-06 16:07 UTC (permalink / raw)
  To: tromey; +Cc: gdb-patches

>>>>>>>>>>> "Andrew" == Andrew Cagney <cagney@gnu.org> writes:
> 
> 
> Andrew> - the output is put in the _build_ directory (instead of RO srcdir)
> 
> The only issue with this, I think, is how releases are made -- but I
> see from the patch that you already dealt with this.
> 
> Andrew> - insisted on using ../intl/
> Andrew> I didn't borrow that - GDB will still use an installed intl/ (I'm
> Andrew> wondering if its time to boot intl/ out of GDB's distro).
> 
> Hmm, I thought the point of doing this is that the stuff in intl,
> while readily available on Linux boxes, isn't so available elsewhere.
> I could be behind the times, though, I haven't looked at the nuts and
> bolts of gettext building in years.

Leading into 6.2, GDB found its self in a situtation where:

- intl/ wasn't needed
- on non-GNU systems, intl/ typically broke the build (serious)

yet we shipped it, doh!  Given this, the consequence of enabling i18n 
can be illustrated with the table:

    GDB:    <=6.2   6.3
    GNU       -     i18n
    non       -      -

(On non-GNU systems, unless we put effort into maining our local 
src/intl/, it will continue to break and hence will continue to be 
--disable-nls'ed).

Lets instead do what we should have done long ago, rely on the installed 
intl/.  We then:

- fix our intl/ build problem
- remove the burden of [pretending to] maintain intl/
- support i18n where it really matters -> GNU systems
- support i18n on non-GNU systems where intl/'s installed

> Andrew> +      find * \
> Andrew> +	  -name '*-stub.c' -prune -o \
> Andrew> +	  -name 'testsuite' -prune -o \
> Andrew> +	  -name 'init.c' -prune -o \
> Andrew> +	  -name '*.[hc]' -print
> 
> I never liked using find for things like this, since I tend to push
> files out of the way by "mv foo.c hacked-foo.c", but I can understand
> why you'd do it this way.  I suppose it could only negatively affect
> some subset of "real gdb developers" anyway, provided releases are
> always done from a pristine checkout.

Yes, true.

Andrew



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

end of thread, other threads:[~2004-08-06 16:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-29 15:55 [patch/rfc] Enable PO files Andrew Cagney
2004-07-30 14:46 ` Andrew Cagney
2004-07-30 18:56 ` Tom Tromey
2004-07-31 17:42   ` Andrew Cagney
2004-08-06 16:07   ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox