X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib-gettextize.in;h=617d6bce43a49abb16ba819fe2ddfd59b044586a;hb=9da85c7262325478e8730ae9f3e76bd0528a9a8c;hp=21bf0cbc1f8532419a3972846cdde412d35bdeca;hpb=d59c859aec6a80f4d9ed1c28487952929d7f19e8;p=platform%2Fupstream%2Fglib.git diff --git a/glib-gettextize.in b/glib-gettextize.in index 21bf0cb..617d6bc 100644 --- a/glib-gettextize.in +++ b/glib-gettextize.in @@ -13,8 +13,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, see . # # - Modified in October 2001 by jacob berkman to @@ -43,7 +42,16 @@ try_ln_s=: # Directory where the sources are stored. prefix=@prefix@ -gettext_dir=@prefix@/share/glib-2.0/gettext +case `uname` in +MINGW32*) + prefix="`dirname $0`/.." + ;; +esac + +datarootdir=@datarootdir@ +datadir=@datadir@ + +gettext_dir=$prefix/share/glib-2.0/gettext while test $# -gt 0; do case "$1" in @@ -83,7 +91,7 @@ fi # Fill in the command line options value. if test $# -eq 1; then srcdir=$1 - if cd $srcdir; then + if cd "$srcdir"; then srcdir=`pwd` else $echo "Cannot change directory to \`$srcdir'" @@ -98,15 +106,23 @@ test -f configure.in || test -f configure.ac || { exit 1 } -if test -f po/Makefile.in.in && test $force -eq 0; then - $echo "\ -po/Makefile.in.in exists: use option -f if you really want to delete it." - exit 1 +configure_in=NONE +if test -f configure.in; then + configure_in=configure.in +else + if test -f configure.ac; then + configure_in=configure.ac + fi +fi +# Check in which directory config.rpath, mkinstalldirs etc. belong. +auxdir=`cat "$configure_in" | grep '^AC_CONFIG_AUX_DIR' | sed -n -e 's/AC_CONFIG_AUX_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` +if test -n "$auxdir"; then + auxdir="$auxdir/" fi -if test -f po/po2tbl.sed.in && test $force -eq 0; then +if test -f po/Makefile.in.in && test $force -eq 0; then $echo "\ -po/po2tbl.sed.in exists: use option -f if you really want to delete it." +po/Makefile.in.in exists: use option -f if you really want to delete it." exit 1 fi @@ -129,10 +145,15 @@ for file in *; do case $file in intl | po) ;; + mkinstalldirs) + rm -f "$srcdir/$auxdir$file" + ($try_ln_s && ln -s $gettext_dir/$file "$srcdir/$auxdir$file" && $echo "Symlinking file $file") 2>/dev/null || + { $echo "Copying file $file"; cp $file "$srcdir/$auxdir$file"; } + ;; *) - rm -f $srcdir/$file - ($try_ln_s && ln -s $gettext_dir/$file $srcdir/$file && $echo "Symlinking file $file") 2>/dev/null || - { $echo "Copying file $file"; cp $file $srcdir/$file; } + rm -f "$srcdir/$file" + ($try_ln_s && ln -s $gettext_dir/$file "$srcdir/$file" && $echo "Symlinking file $file") 2>/dev/null || + { $echo "Copying file $file"; cp $file "$srcdir/$file"; } ;; esac done @@ -140,24 +161,24 @@ done # Copy files to po/ subdirectory. cd po for file in *; do - rm -f $srcdir/po/$file - ($try_ln_s && ln -s $gettext_dir/po/$file $srcdir/po/$file && $echo "Symlinking file po/$file") 2>/dev/null || - { $echo "Copying file po/$file"; cp $file $srcdir/po/$file; } + rm -f "$srcdir/po/$file" + ($try_ln_s && ln -s $gettext_dir/po/$file "$srcdir/po/$file" && $echo "Symlinking file po/$file") 2>/dev/null || + { $echo "Copying file po/$file"; cp $file "$srcdir/po/$file"; } done -if test -f $srcdir/po/cat-id-tbl.c; then +if test -f "$srcdir/po/cat-id-tbl.c"; then $echo "Removing po/cat-id-tbl.c" - rm -f $srcdir/po/cat-id-tbl.c + rm -f "$srcdir/po/cat-id-tbl.c" fi -if test -f $srcdir/po/stamp-cat-id; then +if test -f "$srcdir/po/stamp-cat-id"; then $echo "Removing po/stamp-cat-id" - rm -f $srcdir/po/stamp-cat-id + rm -f "$srcdir/po/stamp-cat-id" fi echo echo "Please add the files" echo " codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4" echo " progtest.m4" -echo "from the @datadir@/aclocal directory to your autoconf macro directory" +echo "from the $datadir/aclocal directory to your autoconf macro directory" echo "or directly to your aclocal.m4 file." echo "You will also need config.guess and config.sub, which you can get from" echo "ftp://ftp.gnu.org/pub/gnu/config/."