Avoid creating an empty doc directory.
authorBruno Haible <bruno@clisp.org>
Sat, 29 Jul 2006 13:10:38 +0000 (13:10 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 29 Jul 2006 13:10:38 +0000 (13:10 +0000)
ChangeLog
gnulib-tool

index 48dc54d..4e6e6d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2006-07-29  Bruno Haible  <bruno@clisp.org>
 
+       * gnulib-tool (func_import): Don't create the $docbase directory if
+       there is no file to store there.
+
+2006-07-29  Bruno Haible  <bruno@clisp.org>
+
        * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
        Categorize the options by when they are useful.
 
index 6af18fe..4b814de 100755 (executable)
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2006-07-29 13:04:18 $'
+cvsdatestamp='$Date: 2006-07-29 13:10:38 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 
@@ -1133,12 +1133,15 @@ func_import ()
       echo "Create directory $destdir/$m4base"
     fi
   fi
-  if test ! -d "$destdir/$docbase"; then
-    if $doit; then
-      echo "Creating directory $destdir/$docbase"
-      mkdir "$destdir/$docbase" || func_fatal_error "failed"
-    else
-      echo "Create directory $destdir/$docbase"
+  docfiles=`echo "$files" | sed -n -e 's,^doc/,,p'`
+  if test -n "$docfiles"; then
+    if test ! -d "$destdir/$docbase"; then
+      if $doit; then
+        echo "Creating directory $destdir/$docbase"
+        mkdir "$destdir/$docbase" || func_fatal_error "failed"
+      else
+        echo "Create directory $destdir/$docbase"
+      fi
     fi
   fi
   if test -n "$inctests"; then