This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

i18n changes



As allready discussed, here are the patches for the i18n stuff. For my first
job as i18n maintainer I thought it better to have the patches reviewed, so
here they are.

These patches do the following:

  - add a (minimal) --enable-maintainer-mode option to configure which will
    only substitute @MAINT@ with either '#' or ''. For a full featured
    maintainer mode, we'd have to switch to using automake and I'd rather
    like to leave that for the future :)

  - enable NLS by default when not building a cross compiler.

  - build catalogs in objdir, not srcdir.

  - modify AM_GNU_GETTEXT so that only catalogs that are a cross section
    of ALL_LINGUAS (all available catalogs) and LINGUAS (subset defined
    via environment) will get built.

  - make generation of gcc.pot, cat-id-tbl.c and stamp-cat-id depend on
    whether maintainer mode is enabled or not. In maintainer mode, these
    files will still be built in srcdir.
    
Additionally I'd check in gcc.pot, cat-id-tbl.c and stamp-cat-id.
gcc_update should probably be modified to touch the stamp file.

Here are the ChangeLog entries and the patches:

gcc/ChangeLog:
2000-05-30  Philipp Thomas  <pthomas@suse.de>

	* configure.in (enable-nls): Enable by default, disable for cross
	builds.
	(enable-maintainer-mode): Add for use with i18n.
	* aclocal.m4 (AM_GNU_GETTEXT): Only build catalogs that are a
	cross section of ALL_LINGUAS and LINGUAS.
	* configure: Regenerate.


gcc/po/ChangeLog:
2000-05-30  Philipp Thomas  <pthomas@suse.de>

	* Makefile.in.in: Create compiled catalogs in objdir, not srcdir.
	Create gcc.pot and cat-tbl-id.c only in maintainer mode.
	* gcc.pot: Generated and checked in.
	* cat-tbl-id.c: Generated and checked in.
	* stamp-cat-id: Generated and checked in.

Index: gcc/aclocal.m4
===================================================================
RCS file: /cvs/gcc/egcs/gcc/aclocal.m4,v
retrieving revision 1.27
diff -u -p -r1.27 aclocal.m4
--- aclocal.m4	2000/05/23 17:42:18	1.27
+++ aclocal.m4	2000/05/30 19:36:28
@@ -513,9 +513,9 @@ strdup __argz_count __argz_stringify __a
      else
        AC_MSG_CHECKING(for catalogs to be installed)
        NEW_LINGUAS=
-       for lang in ${LINGUAS=$ALL_LINGUAS}; do
-         case "$ALL_LINGUAS" in
-          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+       for lang in $ALL_LINGUAS; do
+         case " $LINGUAS " in
+           *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
          esac
        done
        LINGUAS=$NEW_LINGUAS
Index: gcc/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure.in,v
retrieving revision 1.380
diff -u -p -r1.380 configure.in
--- configure.in	2000/05/27 22:34:04	1.380
+++ configure.in	2000/05/30 19:36:29
@@ -4104,11 +4104,23 @@ AC_SUBST(VERSION)
 
 ALL_LINGUAS="en_UK"
 
-# NLS support is still experimental, so disable it by default for now.
+# Enable NLS support by default
 AC_ARG_ENABLE(nls,
-  [  --enable-nls            use Native Language Support (disabled by default)],
-  , enable_nls=no)
+  [  --enable-nls            use Native Language Support (default)],
+  , enable_nls=yes)
 
+# if cross compiling, disable NLS support.
+# It's not worth the trouble, at least for now.
+if test "${build}" != "${host}" -o \
+	"${build}" != "${target}" -o \
+	"${host}" != "${target}"
+then
+	if test "$enable_nls" != "no"; then
+		AC_MSG_WARN(Disabling NLS support because of cross compiling.)
+		enable_nls=no
+	fi
+fi
+
 AM_GNU_GETTEXT
 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
 
@@ -4748,6 +4760,25 @@ else
 fi
 AC_DEFINE_UNQUOTED(ENABLE_STD_NAMESPACE, $ac_esn,
   [Define to 1 if you want to enable namespaces (-fhonor-std) by default.])
+
+dnl Very limited version of automake's enable-maintainer-mode
+
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer],
+      maintainer_mode=$enableval,
+      maintainer_mode=no)
+
+AC_MSG_RESULT($maintainer_mode)
+
+if test "$maintainer_mode" = "yes"; then
+  MAINT=''
+else
+  MAINT='#'
+fi
+AC_SUBST(MAINT)dnl
 
 # Make empty files to contain the specs and options for each language.
 # Then add #include lines to for a compiler that has specs and/or options.
Index: gcc/po/Makefile.in.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/po/Makefile.in.in,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.in.in
--- Makefile.in.in	1999/09/04 15:08:49	1.2
+++ Makefile.in.in	2000/05/30 19:36:29
@@ -69,7 +69,7 @@ INSTOBJEXT = @INSTOBJEXT@
 	$(MSGFMT) -o $@ $<
 
 .po.gmo:
-	file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+	file=`echo $* | sed 's,.*/,,'`.gmo \
 	  && rm -f $$file && $(GMSGFMT) -o $$file $<
 
 .po.cat:
@@ -79,7 +79,7 @@ INSTOBJEXT = @INSTOBJEXT@
 
 all: all-@USE_NLS@
 
-all-yes: $(srcdir)/cat-id-tbl.c $(CATALOGS)
+all-yes: $(CATALOGS) @MAINT@ $(srcdir)/cat-id-tbl.c 
 all-no:
 
 $(srcdir)/$(PACKAGE).pot: $(POTFILES)

-- 
Philipp Thomas <pthomas@suse.de>
Development, SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany

#define NINODE  50              /* number of in core inodes */
#define NPROC   30              /* max number of processes */
 	-- Version 7 UNIX fuer PDP 11, /usr/include/sys/param.h

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]