[PATCH] autopoint always run even though it might not be used
Hey, right now bootstrap will always run autpoint, even if one might not be using it. Since autopoint requires that AM_GNU_GETTEXT_VERSION, we can easily check if we are using autopoint/gettext. 2007-03-16 Alfred M. Szmidt [EMAIL PROTECTED] * build-aux/bootstrap (with_gettext): New variable. Only run autopoint and copy gettext configuration files if WITH_GETTEXT is t. --- bootstrap 15 Mar 2007 23:58:36 +0100 1.1 +++ bootstrap 16 Mar 2007 19:54:12 +0100 @@ -466,13 +467,18 @@ done # Import from gettext. - -echo $0: (cd $bt2; autopoint) ... -cp configure.ac $bt2 -(cd $bt2 autopoint rm configure.ac) -slurp $bt2 $bt || exit - -rm -fr $bt $bt2 || exit +with_gettext=t +grep '^[]*AM_GNU_GETTEXT_VERSION\' configure.ac /dev/null || \ +with_gettext=nil + +if test $with_gettext = t; then + echo $0: (cd $bt2; autopoint) ... + cp configure.ac $bt2 + (cd $bt2 autopoint rm configure.ac) + slurp $bt2 $bt || exit + + rm -fr $bt $bt2 || exit +fi # Reconfigure, getting other files. @@ -504,11 +510,11 @@ for file in $gnulib_extra_files; do symlink_to_gnulib $file $dst || exit done - -# Create gettext configuration. -echo $0: Creating po/Makevars from po/Makevars.template ... -rm -f po/Makevars -sed ' +if test $with_gettext = t; then + # Create gettext configuration. + echo $0: Creating po/Makevars from po/Makevars.template ... + rm -f po/Makevars + sed ' /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '$EXTRA_LOCALE_CATEGORIES'/ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'$package'@gnu.org/ /^XGETTEXT_OPTIONS *=/{ @@ -517,11 +523,11 @@ sed ' '$XGETTEXT_OPTIONS' $${end_of_xgettext_options+} } ' po/Makevars.template po/Makevars - -if test -d runtime-po; then - # Similarly for runtime-po/Makevars, but not quite the same. - rm -f runtime-po/Makevars - sed ' + + if test -d runtime-po; then +# Similarly for runtime-po/Makevars, but not quite the same. +rm -f runtime-po/Makevars +sed ' /^DOMAIN *=.*/s/=.*/= '$package'-runtime/ /^subdir *=.*/s/=.*/= runtime-po/ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'$package'@gnu.org/ @@ -531,9 +537,10 @@ if test -d runtime-po; then '$XGETTEXT_OPTIONS_RUNTIME' $${end_of_xgettext_options+} } ' po/Makevars.template runtime-po/Makevars - - # Copy identical files from po to runtime-po. - (cd po cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + +# Copy identical files from po to runtime-po. +(cd po cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + fi fi echo $0: done. Now you can run './configure'.
Re: [PATCH] autopoint always run even though it might not be used
Hello Alfred, all, * Alfred M. Szmidt wrote on Fri, Mar 16, 2007 at 08:04:21PM CET: +with_gettext=t +grep '^[ ]*AM_GNU_GETTEXT_VERSION\' configure.ac /dev/null || \ +with_gettext=nil Please use yes and no for such values, or :/true and false if you intend to use them as commands (as in `if $with_gettext'). t is impossible to understand for those that don't speak the language this idiom originated in. Thanks, Ralf
Re: [PATCH] autopoint always run even though it might not be used
+with_gettext=t +grep '^[ ]*AM_GNU_GETTEXT_VERSION\' configure.ac /dev/null || \ +with_gettext=nil Please use yes and no for such values, or :/true and false if you intend to use them as commands (as in `if $with_gettext'). t is impossible to understand for those that don't speak the language this idiom originated in. Sorry, been coding Lisp latley. Here is a updated (though untested version) of the patch. 2007-03-16 Alfred M. Szmidt [EMAIL PROTECTED] * build-aux/bootstrap (with_gettext): New variable. Only run autopoint and copy gettext configuration files if WITH_GETTEXT is `true'. --- bootstrap 15 Mar 2007 23:58:36 +0100 1.1 +++ bootstrap 16 Mar 2007 19:54:12 +0100 @@ -466,13 +467,18 @@ done # Import from gettext. - -echo $0: (cd $bt2; autopoint) ... -cp configure.ac $bt2 -(cd $bt2 autopoint rm configure.ac) -slurp $bt2 $bt || exit - -rm -fr $bt $bt2 || exit +with_gettext=true +grep '^[]*AM_GNU_GETTEXT_VERSION\' configure.ac /dev/null || \ +with_gettext=false + +if test $with_gettext = true; then + echo $0: (cd $bt2; autopoint) ... + cp configure.ac $bt2 + (cd $bt2 autopoint rm configure.ac) + slurp $bt2 $bt || exit + + rm -fr $bt $bt2 || exit +fi # Reconfigure, getting other files. @@ -504,11 +510,11 @@ for file in $gnulib_extra_files; do symlink_to_gnulib $file $dst || exit done - -# Create gettext configuration. -echo $0: Creating po/Makevars from po/Makevars.template ... -rm -f po/Makevars -sed ' +if test $with_gettext = true; then + # Create gettext configuration. + echo $0: Creating po/Makevars from po/Makevars.template ... + rm -f po/Makevars + sed ' /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '$EXTRA_LOCALE_CATEGORIES'/ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'$package'@gnu.org/ /^XGETTEXT_OPTIONS *=/{ @@ -517,11 +523,11 @@ sed ' '$XGETTEXT_OPTIONS' $${end_of_xgettext_options+} } ' po/Makevars.template po/Makevars - -if test -d runtime-po; then - # Similarly for runtime-po/Makevars, but not quite the same. - rm -f runtime-po/Makevars - sed ' + + if test -d runtime-po; then +# Similarly for runtime-po/Makevars, but not quite the same. +rm -f runtime-po/Makevars +sed ' /^DOMAIN *=.*/s/=.*/= '$package'-runtime/ /^subdir *=.*/s/=.*/= runtime-po/ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'$package'@gnu.org/ @@ -531,9 +537,10 @@ if test -d runtime-po; then '$XGETTEXT_OPTIONS_RUNTIME' $${end_of_xgettext_options+} } ' po/Makevars.template runtime-po/Makevars - - # Copy identical files from po to runtime-po. - (cd po cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + +# Copy identical files from po to runtime-po. +(cd po cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + fi fi echo $0: done. Now you can run './configure'.
Re: [PATCH] autopoint always run even though it might not be used
Alfred M. Szmidt [EMAIL PROTECTED] wrote: ... Please use yes and no for such values, or :/true and false if you intend to use them as commands (as in `if $with_gettext'). t is impossible to understand for those that don't speak the language this idiom originated in. Sorry, been coding Lisp latley. Here is a updated (though untested version) of the patch. Thanks. Here's what I've just checked in, which includes these small changes: - use yes and no - remove unnecessary quotes around $with_gettext - indent consistently 2007-03-16 Alfred M. Szmidt [EMAIL PROTECTED] * build-aux/bootstrap (with_gettext): New variable. Run autopoint and copy gettext configuration files only if configure.ac contains a use of AM_GNU_GETTEXT_VERSION. Index: build-aux/bootstrap === RCS file: /cvsroot/gnulib/gnulib/build-aux/bootstrap,v retrieving revision 1.2 diff -u -p -r1.2 bootstrap --- build-aux/bootstrap 16 Mar 2007 20:22:58 - 1.2 +++ build-aux/bootstrap 16 Mar 2007 21:00:45 - @@ -467,13 +467,18 @@ done # Import from gettext. +with_gettext=yes +grep '^[]*AM_GNU_GETTEXT_VERSION\' configure.ac /dev/null || \ +with_gettext=no + +if test $with_gettext = yes; then + echo $0: (cd $bt2; autopoint) ... + cp configure.ac $bt2 + (cd $bt2 autopoint rm configure.ac) + slurp $bt2 $bt || exit -echo $0: (cd $bt2; autopoint) ... -cp configure.ac $bt2 -(cd $bt2 autopoint rm configure.ac) -slurp $bt2 $bt || exit - -rm -fr $bt $bt2 || exit + rm -fr $bt $bt2 || exit +fi # Reconfigure, getting other files. @@ -505,36 +510,37 @@ for file in $gnulib_extra_files; do symlink_to_gnulib $file $dst || exit done - -# Create gettext configuration. -echo $0: Creating po/Makevars from po/Makevars.template ... -rm -f po/Makevars -sed ' - /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '$EXTRA_LOCALE_CATEGORIES'/ - /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'$package'@gnu.org/ - /^XGETTEXT_OPTIONS *=/{ -s/$/ \\/ -a\ - '$XGETTEXT_OPTIONS' $${end_of_xgettext_options+} - } -' po/Makevars.template po/Makevars - -if test -d runtime-po; then - # Similarly for runtime-po/Makevars, but not quite the same. - rm -f runtime-po/Makevars +if test $with_gettext = yes; then + # Create gettext configuration. + echo $0: Creating po/Makevars from po/Makevars.template ... + rm -f po/Makevars sed ' -/^DOMAIN *=.*/s/=.*/= '$package'-runtime/ -/^subdir *=.*/s/=.*/= runtime-po/ +/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '$EXTRA_LOCALE_CATEGORIES'/ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'$package'@gnu.org/ /^XGETTEXT_OPTIONS *=/{ s/$/ \\/ a\ - '$XGETTEXT_OPTIONS_RUNTIME' $${end_of_xgettext_options+} + '$XGETTEXT_OPTIONS' $${end_of_xgettext_options+} } - ' po/Makevars.template runtime-po/Makevars + ' po/Makevars.template po/Makevars - # Copy identical files from po to runtime-po. - (cd po cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + if test -d runtime-po; then +# Similarly for runtime-po/Makevars, but not quite the same. +rm -f runtime-po/Makevars +sed ' + /^DOMAIN *=.*/s/=.*/= '$package'-runtime/ + /^subdir *=.*/s/=.*/= runtime-po/ + /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'$package'@gnu.org/ + /^XGETTEXT_OPTIONS *=/{ + s/$/ \\/ + a\ + '$XGETTEXT_OPTIONS_RUNTIME' $${end_of_xgettext_options+} + } +' po/Makevars.template runtime-po/Makevars + +# Copy identical files from po to runtime-po. +(cd po cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + fi fi echo $0: done. Now you can run './configure'.