From: Bruno Haible Date: Fri, 27 Jun 2025 21:18:54 +0000 (+0200) Subject: examples: Extend the hello-sh example. X-Git-Tag: v0.26~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1fc656bcc0bad18a3dc136df05bbae1d9e5d8c1;p=thirdparty%2Fgettext.git examples: Extend the hello-sh example. * gettext-tools/examples/hello-sh/hello-1.sh: Renamed from gettext-tools/examples/hello-sh/hello.sh. * gettext-tools/examples/hello-sh/hello-2.sh: New file, based on gettext-tools/examples/hello-sh/hello-1.sh. * gettext-tools/examples/hello-sh/hello-3.sh: New file, based on gettext-tools/examples/hello-sh/hello-2.sh. * gettext-tools/examples/hello-sh/configure.ac: Update AC_CONFIG_SRCDIR invocation and AC_CONFIG_FILES invocations. * gettext-tools/examples/hello-sh/Makefile.am (bin_SCRIPTS): Remove hello. Add hello-1, hello-2, hello-3. * gettext-tools/examples/hello-sh/po/Makefile.am (POTFILES): Remove hello.sh. Add hello-1.sh, hello-2.sh, hello-3.sh. * gettext-tools/examples/po/Makefile.am (POTFILES): Update accordingly. * gettext-tools/examples/Makefile.am (EXAMPLESFILES): Update file list. --- diff --git a/gettext-tools/examples/Makefile.am b/gettext-tools/examples/Makefile.am index 3b9fcabca..41e0c2108 100644 --- a/gettext-tools/examples/Makefile.am +++ b/gettext-tools/examples/Makefile.am @@ -376,7 +376,9 @@ EXAMPLESFILES = \ hello-sh/INSTALL \ hello-sh/autogen.sh \ hello-sh/autoclean.sh \ - hello-sh/hello.sh \ + hello-sh/hello-1.sh \ + hello-sh/hello-2.sh \ + hello-sh/hello-3.sh \ hello-sh/Makefile.am \ hello-sh/configure.ac \ hello-sh/m4/Makefile.am \ diff --git a/gettext-tools/examples/hello-sh/Makefile.am b/gettext-tools/examples/hello-sh/Makefile.am index b76e71d94..ccf4235b3 100644 --- a/gettext-tools/examples/hello-sh/Makefile.am +++ b/gettext-tools/examples/hello-sh/Makefile.am @@ -11,7 +11,7 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = m4 po # The list of programs that are built. -bin_SCRIPTS = hello +bin_SCRIPTS = hello-1 hello-2 hello-3 # Additional files to be distributed. EXTRA_DIST = autogen.sh autoclean.sh diff --git a/gettext-tools/examples/hello-sh/configure.ac b/gettext-tools/examples/hello-sh/configure.ac index f9adb4801..51522b501 100644 --- a/gettext-tools/examples/hello-sh/configure.ac +++ b/gettext-tools/examples/hello-sh/configure.ac @@ -4,7 +4,7 @@ dnl dnl Configuration file - processed by autoconf. AC_INIT([hello-sh], [0]) -AC_CONFIG_SRCDIR([hello.sh]) +AC_CONFIG_SRCDIR([hello-1.sh]) AM_INIT_AUTOMAKE([1.11]) dnl The installed program must know where to find its message catalogs. @@ -25,7 +25,9 @@ dnl Support for the po directory. AM_PO_SUBDIRS AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([hello:hello.sh], [chmod a+x hello]) +AC_CONFIG_FILES([hello-1:hello-1.sh], [chmod a+x hello-1]) +AC_CONFIG_FILES([hello-2:hello-2.sh], [chmod a+x hello-2]) +AC_CONFIG_FILES([hello-3:hello-3.sh], [chmod a+x hello-3]) AC_CONFIG_FILES([m4/Makefile]) AC_CONFIG_FILES([po/Makefile], [AM_POSTPROCESS_PO_MAKEFILE]) AC_OUTPUT diff --git a/gettext-tools/examples/hello-sh/hello.sh b/gettext-tools/examples/hello-sh/hello-1.sh similarity index 81% rename from gettext-tools/examples/hello-sh/hello.sh rename to gettext-tools/examples/hello-sh/hello-1.sh index 82e41bbae..69bafdae7 100644 --- a/gettext-tools/examples/hello-sh/hello.sh +++ b/gettext-tools/examples/hello-sh/hello-1.sh @@ -2,7 +2,7 @@ # Example for use of GNU gettext. # This file is in the public domain. # -# Source code of the POSIX sh program. +# Source code of the POSIX sh program that uses the gettext.sh API. . gettext.sh diff --git a/gettext-tools/examples/hello-sh/po/Makefile.am b/gettext-tools/examples/hello-sh/po/Makefile.am index d6de1ef0b..7b842f2bd 100644 --- a/gettext-tools/examples/hello-sh/po/Makefile.am +++ b/gettext-tools/examples/hello-sh/po/Makefile.am @@ -5,7 +5,7 @@ # List of files which contain translatable strings. POTFILES = \ - hello.sh + hello-1.sh hello-2.sh hello-3.sh # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) diff --git a/gettext-tools/examples/po/Makefile.am b/gettext-tools/examples/po/Makefile.am index 5764d84fb..ef3c9247a 100644 --- a/gettext-tools/examples/po/Makefile.am +++ b/gettext-tools/examples/po/Makefile.am @@ -65,7 +65,9 @@ POTFILES = \ hello-go/example3/hello3ml.go.in \ hello-go-http/example1/hello1ml.go.in \ hello-ruby/hello.rb \ - hello-sh/hello.sh \ + hello-sh/hello-1.sh \ + hello-sh/hello-2.sh \ + hello-sh/hello-3.sh \ hello-gawk/hello.awk \ hello-pascal/hello.pas \ hello-modula2/hello.mod.in \