# HG changeset patch # User Bruno Haible # Date 1154178638 0 # Node ID a733c0af6d398a83dea20720a55a8e1c4f0328dc # Parent 0fb5ef99e00fc3663ac3522d92c1d89f5a3d5757 Avoid creating an empty doc directory. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-07-29 Bruno Haible + + * gnulib-tool (func_import): Don't create the $docbase directory if + there is no file to store there. + 2006-07-29 Bruno Haible * gnulib-tool (func_usage): Revert most of the 2006-07-15 change. diff --git a/gnulib-tool b/gnulib-tool --- a/gnulib-tool +++ b/gnulib-tool @@ -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 @@ 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