diff options
author | Jim Meyering <jim@meyering.net> | 2007-03-16 21:03:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-03-16 21:03:43 +0000 |
commit | 39e196895472b71150ad4c4c81439a2e60d81614 (patch) | |
tree | 8aad26bdb2be6b3bb357140c39932de3ec2ebeaa /build-aux | |
parent | a1c6bc99c4a63b70c5fcba7a3d957aa506df39e6 (diff) | |
download | gnulib-39e196895472b71150ad4c4c81439a2e60d81614.tar.gz |
* 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.
2007-03-16 Alfred M. Szmidt <ams@gnu.org>
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/bootstrap | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/build-aux/bootstrap b/build-aux/bootstrap index e5bcc68c36..202d227dab 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -467,13 +467,18 @@ done # Import from gettext. +with_gettext=yes +grep '^[ ]*AM_GNU_GETTEXT_VERSION\>' configure.ac >/dev/null || \ + with_gettext=no -echo "$0: (cd $bt2; autopoint) ..." -cp configure.ac $bt2 && -(cd $bt2 && autopoint && rm configure.ac) && -slurp $bt2 $bt || exit +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 -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'." |