From 5882c5eb16e75999105ad54f7785311ec02a570c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 23 Jul 2007 22:08:02 +0000 Subject: [PATCH] Create .cvsignore files when creating a new directory. --- ChangeLog | 11 +++++++++-- gnulib-tool | 13 ++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e06c932be..f08030f7df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-07-23 Bruno Haible + + * gnulib-tool (func_import): Create a .cvsignore file also when the + directory is not yet in CVS but the toplevel directory is. When + creating a .cvsignore file, add ".deps" and ".dirstamp" to it. + Reported by Karl Berry. + 2007-07-22 Ben Pfaff * lib/popcount.h: Use faster, branchless algorithm for non-GCC @@ -644,12 +651,12 @@ * modules/sprintf-posix (Dependencies): Add stdint. * modules/vsprintf-posix (Dependencies): Likewise. -2007-07-01 Bruno Haible +2007-07-01 Bruno Haible * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle Windows PATH as well. Conservative double-quoting. Comments. -2007-07-01 Bruno Haible +2007-07-01 Bruno Haible Eric Blake Ralf Wildenhues diff --git a/gnulib-tool b/gnulib-tool index 250b2da5af..7cad5d3f02 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2007-07-19 20:06:45 $' +cvsdatestamp='$Date: 2007-07-23 22:08:02 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` nl=' @@ -2798,7 +2798,14 @@ func_import () if test -n "$dir_added"; then if $doit; then echo "Creating $destdir/$dir$ignore" - echo "$dir_added" | sed -e '/^$/d' | LC_ALL=C sort -u > "$destdir/$dir$ignore" + { + if test "$ignore" = .cvsignore; then + echo ".deps" + # Automake generates Makefile rules that create .dirstamp files. + echo ".dirstamp" + fi + echo "$dir_added" | sed -e '/^$/d' | LC_ALL=C sort -u + } > "$destdir/$dir$ignore" else echo "Create $destdir/$dir$ignore" fi @@ -2810,7 +2817,7 @@ func_import () dir="$1" dir_added="$2" dir_removed="$3" - if test -d "$destdir/${dir}CVS" || test -f "$destdir/${dir}.cvsignore"; then + if test -d "$destdir/CVS" || test -d "$destdir/${dir}CVS" || test -f "$destdir/${dir}.cvsignore"; then func_update_ignorelist .cvsignore fi if test -d "$destdir/.git" || test -f "$destdir/${dir}.gitignore"; then -- 2.30.2