* getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
[gnulib.git] / gnulib-tool
index a635863..757ad7c 100755 (executable)
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2005-09-01 12:28:32 $'
+cvsdatestamp='$Date: 2005-09-05 11:40:42 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 
@@ -976,7 +976,7 @@ func_import ()
         fi
         test -n "$dry_run" && dry=echo
         $dry mv -f "$destdir/$g2" "$destdir/${g2}~" || func_fatal_error "failed"
-        if test -z "$symbolic" && cmp "$gnulib_dir/$f2" "$destdir/$g2.tmp"; then
+        if test -n "$symbolic" && cmp "$gnulib_dir/$f2" "$destdir/$g2.tmp" > /dev/null; then
           func_ln_if_changed "$gnulib_dir/$f2" "$destdir/$g2"
         else
           $dry mv -f "$destdir/$g2.tmp" "$destdir/${g2}" || func_fatal_error "failed"
@@ -988,7 +988,7 @@ func_import ()
       # frequently that developers don't put autogenerated files into CVS.
       echo "Copying file $g2"
       test -n "$dry_run" && dry=echo
-      if test -z "$symbolic" && cmp "$gnulib_dir/$f2" "$destdir/$g2.tmp"; then
+      if test -n "$symbolic" && cmp "$gnulib_dir/$f2" "$destdir/$g2.tmp" > /dev/null; then
         func_ln_if_changed "$gnulib_dir/$f2" "$destdir/$g2"
       else
         $dry mv -f "$destdir/$g2.tmp" "$destdir/${g2}" || func_fatal_error "failed"
@@ -1013,7 +1013,7 @@ func_import ()
   if test -n "$libtool"; then
     actioncmd="$actioncmd --libtool"
   fi
-  actioncmd="$actioncmd -macro-prefix=$macro_prefix"
+  actioncmd="$actioncmd --macro-prefix=$macro_prefix"
   actioncmd="$actioncmd `echo $specified_modules`"
 
   # Create lib/Makefile.am.
@@ -1485,6 +1485,12 @@ case $mode in
     if test -n "$m4base"; then
       # Apply func_import to a particular gnulib directory.
       # Any number of additional modules can be given.
+      if test ! -f "$destdir/$m4base"/gnulib-cache.m4; then
+        # First use of gnulib in the given m4base.
+        test -n "$supplied_libname" || supplied_libname=true
+        test -n "$sourcebase" || sourcebase="lib"
+        test -n "$macro_prefix" || macro_prefix="gl"
+      fi
       func_import "$*"
     else
       # Apply func_import to all gnulib directories.