/gettext-tools/examples/ChangeLog
# Files copied from gettext-runtime:
/gettext-tools/ABOUT-NLS
-/gettext-tools/po/Makefile.in
+/gettext-tools/po/Makefile.in.in
/gettext-tools/po/Rules-quot
/gettext-tools/po/boldquot.sed
/gettext-tools/po/en@boldquot.header
run.sh in gettext-runtime/doc/Admin/. Copy resulting matrix.texi
into gettext-runtime/doc/. Update the STATUS date in nls.texi.
- - gettext-runtime/po/Makefile.in
+ - gettext-runtime/po/Makefile.in.in
Update Origin version.
distcheck-hook:
# Verify that some files are the same.
- cmp -s $(srcdir)/gettext-runtime/po/Makefile.in $(srcdir)/gettext-tools/po/Makefile.in
+ cmp -s $(srcdir)/gettext-runtime/po/Makefile.in.in $(srcdir)/gettext-tools/po/Makefile.in.in
cmp -s $(srcdir)/gettext-runtime/po/Rules-quot $(srcdir)/gettext-tools/po/Rules-quot
cmp -s $(srcdir)/gettext-runtime/po/boldquot.sed $(srcdir)/gettext-tools/po/boldquot.sed
cmp -s $(srcdir)/gettext-runtime/po/quot.sed $(srcdir)/gettext-tools/po/quot.sed
Version 0.24 - January 2025
-# Improvements for maintainers:
- * The contents of the po/ directory has been changed:
- - A file Makefile.in replaces the old Makefile.in.in.
# Programming languages support:
* JavaScript:
- xgettext now parses recursive JSX expressions correctly.
echo "$0: copying common files from gettext-runtime to gettext-tools..."
cp -p gettext-runtime/ABOUT-NLS gettext-tools/ABOUT-NLS
-cp -p gettext-runtime/po/Makefile.in gettext-tools/po/Makefile.in
+cp -p gettext-runtime/po/Makefile.in.in gettext-tools/po/Makefile.in.in
cp -p gettext-runtime/po/Rules-quot gettext-tools/po/Rules-quot
cp -p gettext-runtime/po/boldquot.sed gettext-tools/po/boldquot.sed
cp -p gettext-runtime/po/quot.sed gettext-tools/po/quot.sed
maintainer-update-po: $(top_builddir)/config.status
$(SHELL) ./config.status --recheck
- $(SHELL) ./config.status po/Makefile
+ $(SHELL) ./config.status po/Makefile.in po-directories
cd po && $(MAKE) update-po
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([src/gettext.sh], [chmod a+x src/gettext.sh])
-AC_CONFIG_FILES([po/Makefile])
+AC_CONFIG_FILES([po/Makefile.in])
AC_CONFIG_FILES([man/Makefile])
AC_CONFIG_FILES([man/x-to-1])
AC_REQUIRE([AM_NLS])dnl
dnl Release version of the gettext macros. This is used to ensure that
- dnl the gettext macros and po/Makefile.in are in sync.
+ dnl the gettext macros and po/Makefile.in.in are in sync.
AC_SUBST([GETTEXT_MACRO_VERSION], [0.24])
dnl Perform the following tests also if --disable-nls has been given,
dnl the set of available translations, given by the developer).
DESIRED_LINGUAS="${LINGUAS-\$(ALL_LINGUAS)}"
AC_SUBST([DESIRED_LINGUAS])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ cat "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ fi
+ ;;
+ esac
+ done]],
+ [])
])
dnl Postprocesses a Makefile in a directory containing PO files.
DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
DISTFILES.common = \
- remove-potcdate.sed \
+ Makefile.in.in remove-potcdate.sed \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) \
$(DISTFILES.common.extra3) $(DISTFILES.common.extra4) \
$(DISTFILES.common.extra5) $(DISTFILES.common.extra6)
all-yes: $(srcdir)/stamp-po
all-no:
-# Ensure that the gettext macros and this Makefile.in are in sync.
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
CHECK_MACRO_VERSION = \
test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
- || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
+ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
exit 1; \
}
clean: mostlyclean
distclean: clean
- rm -f Makefile
+ rm -f Makefile Makefile.in
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
# because execution permission bits may not work on the current file system.
# Use @SHELL@, which is the shell determined by autoconf for the use by its
# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
-Makefile: Makefile.in Makevars $(top_builddir)/config.status
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status
cd $(top_builddir) \
- && @SHELL@ ./config.status $(subdir)/$@
+ && @SHELL@ ./config.status $(subdir)/$@.in po-directories
force:
maintainer-update-po: $(top_builddir)/config.status
$(SHELL) ./config.status --recheck
- $(SHELL) ./config.status po/Makefile
+ $(SHELL) ./config.status po/Makefile.in po-directories
cd po && $(MAKE) update-po
cd examples && $(MAKE) maintainer-update-po
AC_CONFIG_FILES([libgettextpo/Makefile])
AC_CONFIG_FILES([libgettextpo/exported.sh])
-AC_CONFIG_FILES([po/Makefile])
+AC_CONFIG_FILES([po/Makefile.in])
AC_CONFIG_FILES([projects/Makefile])
the comment no longer applies.
Note: The string @code{TRANSLATORS:} is a convention, enabled by the
-@code{Makefile.in} file that is part of a package's build system.
+@code{Makefile.in.in} file that is part of a package's build system.
It is not enabled by default in @code{xgettext}.
If you are using @code{xgettext}
-without the @code{Makefile.in} infrastructure,
+without the @code{Makefile.in.in} infrastructure,
you will need to pass the option @code{--add-comments=TRANSLATORS:} yourself.
@node c-format Flag
@node po/Rules-*
@subsection Extending @file{Makefile} in @file{po/}
-@cindex @file{Makefile.in} extensions
+@cindex @file{Makefile.in.in} extensions
All files called @file{Rules-*} in the @file{po/} directory get appended to
the @file{po/Makefile} when it is created. They present an opportunity to
add rules for special PO files to the Makefile, without needing to mess
-with @file{po/Makefile.in}.
+with @file{po/Makefile.in.in}.
@cindex quotation marks
@vindex LANGUAGE@r{, environment variable}
file, needs to be modified in two ways:
@example
-AC_OUTPUT([@var{existing configuration files} po/Makefile],
+AC_OUTPUT([@var{existing configuration files} po/Makefile.in],
[@var{existing additional actions}])
@end example
The modification to the first argument to @code{AC_OUTPUT} asks
for substitution in the @file{po/} directory.
+Note the @samp{.in} suffix used for @file{po/} only. This is because
+the distributed file is really @file{po/Makefile.in.in}.
@end enumerate
There are basically three ways to deal with generated files in the
context of a version controlled repository, such as @file{configure}
generated from @file{configure.ac}, @code{@var{parser}.c} generated
-from @code{@var{parser}.y}, or @code{po/Makefile.in} autoinstalled
+from @code{@var{parser}.y}, or @code{po/Makefile.in.in} autoinstalled
by @code{gettextize} or @code{autopoint}.
@enumerate
match the @code{xgettext} options for that particular programming language.
If the package uses more than one programming language with @code{gettext}
support, it becomes necessary to change the POT file construction rule
-in @file{po/Makefile.in}. It is recommended to make one @code{xgettext}
+in @file{po/Makefile.in.in}. It is recommended to make one @code{xgettext}
invocation per programming language, each with the options appropriate for
that language, and to combine the resulting files using @code{msgcat}.
@end itemize
@item
A @file{po/} directory is created for eventually holding
all translation files, but initially only containing the file
-@file{po/Makefile.in} from the GNU @code{gettext} distribution
-and a few auxiliary
+@file{po/Makefile.in.in} from the GNU @code{gettext} distribution
+(beware the double @samp{.in} in the file name) and a few auxiliary
files. If the @file{po/} directory already exists, it will be preserved
-along with the files it contains, and only @file{Makefile.in} and
+along with the files it contains, and only @file{Makefile.in.in} and
the auxiliary files will be overwritten.
If @samp{--po-dir} has been specified, this holds for every directory
Example Binary catalog format Makefile type
- hello-c .gmo Makefile.in
- hello-c-gnome2 .gmo Makefile.in
- hello-c-gnome3 .gmo Makefile.in
- hello-c++ .gmo Makefile.in
- hello-c++20 .gmo Makefile.in
- hello-c++-kde .gmo Makefile.in
- hello-c++-gnome2 .gmo Makefile.in
- hello-c++-gnome3 .gmo Makefile.in
- hello-objc .gmo Makefile.in
- hello-objc-gnome2 .gmo Makefile.in
+ hello-c .gmo Makefile.in.in
+ hello-c-gnome2 .gmo Makefile.in.in
+ hello-c-gnome3 .gmo Makefile.in.in
+ hello-c++ .gmo Makefile.in.in
+ hello-c++20 .gmo Makefile.in.in
+ hello-c++-kde .gmo Makefile.in.in
+ hello-c++-gnome2 .gmo Makefile.in.in
+ hello-c++-gnome3 .gmo Makefile.in.in
+ hello-objc .gmo Makefile.in.in
+ hello-objc-gnome2 .gmo Makefile.in.in
hello-c++-wxwidgets .gmo Makefile.am
hello-sh .gmo Makefile.am
hello-python .gmo Makefile.am
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
-rm -f po/Makefile.in
+rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sed
# Generated by aclocal.
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
-rm -f po/Makefile.in
+rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sed
rm -f admin/config.rpath
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
-rm -f po/Makefile.in
+rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sed
# Generated by aclocal.
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
-rm -f po/Makefile.in
+rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sed
# Generated by aclocal.
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
-rm -f po/Makefile.in
+rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sed
# Generated by aclocal.
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
-rm -f po/Makefile.in
+rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sed
# Generated by aclocal.
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
-rm -f po/Makefile.in
+rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sed
# Generated by aclocal.
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
-rm -f po/Makefile.in
+rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sed
# Generated by aclocal.
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
-rm -f po/Makefile.in
+rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sed
# Generated by aclocal.
# Check in which directory or directories the po/* infrastructure belongs.
configfiles=`"$func_trace" AC_CONFIG_FILES "$configure_in"`
-# PO directories have a Makefile generated from Makefile.in.
+# PO directories have a Makefile.in generated from Makefile.in.in.
# Treat a directory as a PO directory if and only if it has a
# POTFILES.in file. This allows packages to have multiple PO
# directories under different names or in different locations.
-sed_remove_Makefile='s,/Makefile$,,'
-podirs=`for f in $configfiles; do case "$f" in */Makefile) echo $f;; esac; done | sed -e "$sed_remove_Makefile"`
-podirs=`for d in $podirs; do if test -r $d/POTFILES.in; then echo $d; fi; done`
+sed_remove_Makefile_in='s,/Makefile\.in$,,'
+podirs=`for f in $configfiles; do case "$f" in */Makefile.in) echo $f;; esac; done | sed -e "$sed_remove_Makefile_in"`
if test -z "$podirs"; then
# If we cannot get the list of PO directories from configure.ac, assume the
# common default.
func_fatal_error "intl/ subdirectory exists: use option -f if you really want to delete it."
fi
for podir in $podirs; do
- if test -f "$podir/Makefile.in"; then
- func_fatal_error "$podir/Makefile.in exists: use option -f if you really want to delete it."
- fi
if test -f "$podir/Makefile.in.in"; then
func_fatal_error "$podir/Makefile.in.in exists: use option -f if you really want to delete it."
fi
cd po
for podir in $podirs; do
$do_changelog && func_poChangeLog_init
- for file in Makefile.in; do
+ for file in Makefile.in.in; do
same=no
if test -f "$srcdir/$podir/$file"; then
if cmp -s $file "$srcdir/$podir/$file"; then
same=yes
fi
else
- added_acoutput="$added_acoutput $podir/Makefile"
+ added_acoutput="$added_acoutput $podir/Makefile.in"
fi
if $do_changelog && test $same = no; then
if test -f "$srcdir/$podir/$file"; then
func_backup "$podir/$file"
func_linkorcopy $file "$gettext_datadir/po/$file" "$podir/$file"
done
- for file in Makefile.in.in; do
- if test -f "$srcdir/$podir/$file"; then
- if $do_changelog; then
- func_poChangeLog_add_entry " * $file: Remove file."
- fi
- func_backup "$podir/$file"
- rm -f "$srcdir/$podir/$file"
- fi
- done
for file in *; do
case $file in
- Makefile.in | Makefile.in.in)
+ Makefile.in.in)
# Already handled above.
;;
Makevars.template)
po.m4 progtest.m4'
# All sorts of bugs could occur if the configure file was remade with the wrong
-# version of gettext.m4 et al. (because then the configure and the po/Makefile.in
+# version of gettext.m4 et al. (because then the configure and the po/Makefile.in.in
# don't fit together). It is therefore important that the package carries the
# right versions of gettext.m4 et al. with it.
if test -f "$srcdir/Makefile.am"; then
AM_GNU_GETTEXT_VERSION([$ARCHIVE_VERSION])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([po/Makefile.in]) dnl if $ARCHIVE_VERSION > 0.23: po/Makefile
+AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
EOF
test -d build-aux || Exit 1
test -f m4/po.m4 || Exit 1
-# if $ARCHIVE_VERSION > 0.23: po/Makefile.in
test -f po/Makefile.in.in || Exit 1
test -f build-aux/config.rpath || Exit 1
AM_GNU_GETTEXT_VERSION([$ARCHIVE_VERSION])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([po/Makefile.in]) dnl if $ARCHIVE_VERSION > 0.23: po/Makefile
+AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
EOF
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([po/Makefile.in]) dnl if $ARCHIVE_VERSION > 0.23: po/Makefile
+AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
EOF
test -d po || Exit 1
test -f gettext-m4/po.m4 || Exit 1
-# if $ARCHIVE_VERSION > 0.23: po/Makefile.in
test -f po/Makefile.in.in || Exit 1
rm -fr gettext-m4 po ABOUT-NLS config.rpath
AM_GNU_GETTEXT_VERSION([$ARCHIVE_VERSION])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([po/Makefile.in]) dnl if $ARCHIVE_VERSION > 0.23: po/Makefile
+AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
EOF
test -d po || Exit 1
test -f m4/po.m4 || Exit 1
-# if $ARCHIVE_VERSION > 0.23: po/Makefile.in
test -f po/Makefile.in.in || Exit 1
rm -fr m4 po ABOUT-NLS config.rpath
AM_GNU_GETTEXT_VERSION([$ARCHIVE_VERSION])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([po/Makefile.in]) dnl if $ARCHIVE_VERSION > 0.23: po/Makefile
+AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
EOF
test -d po || Exit 1
test -f m4/po.m4 || Exit 1
-# if $ARCHIVE_VERSION > 0.23: po/Makefile.in
test -f po/Makefile.in.in || Exit 1
rm -fr m4 po ABOUT-NLS config.rpath
dnl AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([po/Makefile.in]) dnl if $ARCHIVE_VERSION > 0.23: po/Makefile
+AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
EOF
test -d po || Exit 1
test -f m4/po.m4 || Exit 1
-# if $ARCHIVE_VERSION > 0.23: po/Makefile.in
test -f po/Makefile.in.in || Exit 1
cp -p po/Makevars.template po/Makevars