Oops again: fix use of classpath.c.
[gnulib.git] / gnulib-tool
index de45f37..47df7c8 100755 (executable)
@@ -14,7 +14,7 @@
 #
 # 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.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 
 # This program is meant for authors or maintainers which want to import
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2005-04-15 09:06:26 $'
+cvsdatestamp='$Date: 2005-05-14 06:03:57 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 
@@ -95,7 +95,7 @@ Options:
       --libtool             Use libtool rules, for --import.
       --no-changelog        don't update or create ChangeLog files
       --dry-run             For --import, only print what would have been done.
-      --symlink             Make symbolic links instead of copying files.
+  -s, --symbolic, --symlink Make symbolic links instead of copying files.
 
 Report bugs to <bug-gnulib@gnu.org>."
 }
@@ -168,7 +168,7 @@ func_ln_if_changed ()
   if test -L "$2" -a "$1" = "`readlink "$2"`"; then
     :
   else
-    $dry rm "$2"
+    $dry rm -f "$2"
     $dry ln -s "$1" "$2"
   fi
 }
@@ -197,7 +197,7 @@ func_ln_if_changed ()
   lgpl=
   do_changelog=:
   dry_run=
-  symlink=
+  symbolic=
   lgpl=
 
   supplied_opts="$@"
@@ -289,8 +289,8 @@ func_ln_if_changed ()
       --dry-run )
         dry_run=true
         shift ;;
-      --symlink )
-        symlink=true
+      -s | --symbolic | --symlink )
+        symbolic=true
         shift ;;
       --help | --hel | --he | --h )
         func_usage
@@ -557,7 +557,7 @@ func_emit_lib_Makefile_am ()
 # - libtool         true if libtool will be used, blank otherwise
 # - lgpl            true if library's license shall be LGPL, blank otherwise
 # - dry_run         true if actions shall only be printed, blank otherwise
-# - symlink         true if files should be symlinked, copied otherwise
+# - symbolic        true if files should be symlinked, copied otherwise
 # - supplied_opts   all options passed to gnulib-tool
 func_import ()
 {
@@ -596,7 +596,7 @@ func_import ()
       m4/*) g=`echo "$f" | sed -e "s,^m4/,$m4base/,"` ;;
       *) g="$f" ;;
     esac
-    if test -z "$symlink"; then
+    if test -z "$symbolic"; then
       func_cp_if_changed "$gnulib_dir/$f" "$destdir/$g"
     else
       func_ln_if_changed "$gnulib_dir/$f" "$destdir/$g"
@@ -699,8 +699,8 @@ func_import ()
   echo
   echo "You may need to add #include directives for the following .h files."
   for module in $modules; do
-    func_get_include_directive "$module" | sed -e '/^$/d;' -e 's/^/  /'
-  done
+    func_get_include_directive "$module"
+  done | LC_ALL=C sort -u | sed -e '/^$/d;' -e 's/^/  /'
   echo
   echo "Don't forget to add \"$sourcebase/Makefile\""
   echo "to AC_CONFIG_FILES in \"$configure_ac\" and to mention"
@@ -740,7 +740,7 @@ func_create_testdir ()
       *) g="$f" ;;
     esac
     ln "$gnulib_dir/$f" "$testdir/$g" 2>/dev/null ||
-    if test -z "$symlink"; then
+    if test -z "$symbolic"; then
       cp -p "$gnulib_dir/$f" "$testdir/$g"
     else
       ln -s "$gnulib_dir/$f" "$testdir/$g"