bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] autopoint and GREP_OPTIONS


From: Daiki Ueno
Subject: Re: [bug-gettext] autopoint and GREP_OPTIONS
Date: Tue, 11 Dec 2012 17:49:36 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Jens Petersen <address@hidden> writes:

> A while ago someone complained to me
> https://bugzilla.redhat.com/show_bug.cgi?id=801374
> about GREP_OPTIONS=-n breaking autopoint:

This might be good to fix in 0.18.2.  One idea is to genereate
autopoint.in using AS_INIT so that it include all the shell
compatibility stuff.

I'm attaching a tentative patch.  Comments are welcome.

---
 autogen.sh                                        |    1 +
 gettext-tools/misc/ChangeLog                      |    5 +++++
 gettext-tools/misc/{autopoint.in => autopoint.as} |   11 +++++++----
 3 files changed, 13 insertions(+), 4 deletions(-)
 rename gettext-tools/misc/{autopoint.in => autopoint.as} (98%)

diff --git a/autogen.sh b/autogen.sh
index 9b1b29a..ab354ed 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -368,6 +368,7 @@ cp -p gettext-runtime/ABOUT-NLS gettext-tools/ABOUT-NLS
 
 (cd gettext-tools
  ../build-aux/fixaclocal aclocal -I m4 -I ../gettext-runtime/m4 -I ../m4 -I 
gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
+ autom4te --language M4sh --cache '' --melt misc/autopoint.as -o 
misc/autopoint.in
  autoconf
  autoheader && touch config.h.in
  test -d intl || mkdir intl
diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog
index 8502295..35df719 100644
--- a/gettext-tools/misc/ChangeLog
+++ b/gettext-tools/misc/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-11  Daiki Ueno  <address@hidden>
+
+       Generate autopoint.in from .as to unset special shell variables.
+       * autopoint.as: Rename from autopoint.in.
+
 2010-08-30  Bruno Haible  <address@hidden>
 
        Improve interopability with Emacs 23.
diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.as
similarity index 98%
rename from gettext-tools/misc/autopoint.in
rename to gettext-tools/misc/autopoint.as
index 48f661d..9168d26 100644
--- a/gettext-tools/misc/autopoint.in
+++ b/gettext-tools/misc/autopoint.as
@@ -1,5 +1,5 @@
-#! /bin/sh
-#
+AS_INIT[]dnl                                            -*- shell-script -*-
+m4_divert_push([HEADER-COPYRIGHT])dnl
 # Copyright (C) 2002-2010 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -20,6 +20,9 @@
 # of packages which are internationalized with the help of GNU gettext.  For
 # further information how to use it consult the GNU gettext manual.
 
+m4_divert_pop([HEADER-COPYRIGHT])dnl back to BODY
+AS_ME_PREPARE[]dnl
+
 progname=$0
 address@hidden@
 address@hidden@
@@ -152,7 +155,7 @@ fi
 func_usage ()
 {
   echo "\
-Usage: autopoint [OPTION]...
+Usage: $as_me [OPTION]...
 
 Copies standard gettext infrastructure files into a source package.
 
@@ -228,7 +231,7 @@ func_fatal_error ()
         shift; break ;;
       -* )
         echo "autopoint: unknown option $1" 1>&2
-        echo "Try 'autopoint --help' for more information." 1>&2
+        echo "Try '$as_me --help' for more information." 1>&2
         exit 1 ;;
       * )
         break ;;
-- 
1.7.10.4



Regards,
-- 
Daiki Ueno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]