From ec06465572cb8676079a06daa2f10839b1ec116a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 24 Aug 2007 23:54:54 +0200 Subject: [PATCH] bootstrap: Ignore more. * bootstrap (symlink_to_dir): Add a directory name like uniwidth to e.g., lib/.gitignore. (slurp): Handle the sys_stat_.h -> sys mapping, too. * .hgignore: Remove this file, too. * Makefile.am (EXTRA_DIST): Remove .gitignore and .hgignore. --- .gitignore | 4 ++ .hgignore | 147 ------------------------------------------------------------ ChangeLog | 7 +++ Makefile.am | 2 - bootstrap | 19 +++++++- 5 files changed, 29 insertions(+), 150 deletions(-) delete mode 100644 .hgignore diff --git a/.gitignore b/.gitignore index 896e57b..abe485e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,10 +25,14 @@ coreutils-*.tar.gz coreutils-*.tar.gz.sig coreutils-*.xdelta coreutils-*.xdelta.sig +lib/.cvsignore +lib/.gitignore lib/charset.alias lib/configmake.h lib/t-fpending lib/uniwidth/ +m4/.cvsignore +m4/.gitignore po/*.gmo po/*.po po/LINGUAS diff --git a/.hgignore b/.hgignore deleted file mode 100644 index efbf44f..0000000 --- a/.hgignore +++ /dev/null @@ -1,147 +0,0 @@ -.*/Makefile$ -.*/Makefile\.in$ -.*/\.deps/ -.*\.1$ -.*\.o$ -.*~$ -^Makefile$ -^Makefile\.in$ -^THANKS-to-translators$ -^aclocal\.m4$ -^autom4te\.cache/ -^config\.h$ -^config\.hin$ -^config\.log$ -^config\.status$ -^configure$ -^doc/constants\.texi$ -^doc/coreutils\.info$ -^doc/stamp-vti$ -^doc/version\.texi$ -^lib/alloca\.h$ -^lib/charset\.alias$ -^lib/getdate\.c$ -^lib/libcoreutils\.a$ -^lib/ref-add\.sed$ -^lib/ref-del\.sed$ -^lib/t-fpending$ -^po/.*\.gmo$ -^po/.*\.po$ -^po/POTFILES$ -^po/stamp-po$ -^po/remove-potcdate.sed$ -^src/\[$ -^src/base64$ -^src/basename$ -^src/cat$ -^src/chgrp$ -^src/chmod$ -^src/chown$ -^src/chroot$ -^src/cksum$ -^src/comm$ -^src/cp$ -^src/csplit$ -^src/cut$ -^src/date$ -^src/dd$ -^src/df$ -^src/dir$ -^src/dircolors$ -^src/dircolors\.h$ -^src/dirname$ -^src/du$ -^src/echo$ -^src/env$ -^src/expand$ -^src/expr$ -^src/factor$ -^src/false$ -^src/fmt$ -^src/fold$ -^src/fs\.h$ -^src/ginstall$ -^src/groups$ -^src/head$ -^src/hostid$ -^src/hostname$ -^src/id$ -^src/join$ -^src/kill$ -^src/link$ -^src/ln$ -^src/localedir\.h$ -^src/logname$ -^src/ls$ -^src/md5sum$ -^src/mkdir$ -^src/mkfifo$ -^src/mknod$ -^src/mv$ -^src/nice$ -^src/nl$ -^src/nohup$ -^src/od$ -^src/paste$ -^src/pathchk$ -^src/pinky$ -^src/pr$ -^src/printenv$ -^src/printf$ -^src/ptx$ -^src/pwd$ -^src/readlink$ -^src/rm$ -^src/rmdir$ -^src/seq$ -^src/setuidgid$ -^src/sha1sum$ -^src/sha224sum$ -^src/sha256sum$ -^src/sha384sum$ -^src/sha512sum$ -^src/shred$ -^src/sleep$ -^src/sort$ -^src/split$ -^src/stat$ -^src/stty$ -^src/su$ -^src/sum$ -^src/sync$ -^src/tac$ -^src/tail$ -^src/tee$ -^src/test$ -^src/touch$ -^src/tr$ -^src/true$ -^src/tsort$ -^src/tty$ -^src/uname$ -^src/unexpand$ -^src/uniq$ -^src/unlink$ -^src/uptime$ -^src/users$ -^src/vdir$ -^src/wc$ -^src/wheel-size\.h$ -^src/wheel\.h$ -^src/who$ -^src/whoami$ -^src/yes$ -^stamp-h1$ -^tests/.*\.I[12]$ -^tests/.*\.[EIOX]$ -^tests/cut/cut-tests$ -^tests/head/head-tests$ -^tests/join/join-tests$ -^tests/pr/pr-tests$ -^tests/sort/sort-tests$ -^tests/tac/tac-tests$ -^tests/tail/tail-tests$ -^tests/test/test-tests$ -^tests/tr/tr-tests$ -^tests/uniq/uniq-tests$ -^tests/wc/wc-tests$ diff --git a/ChangeLog b/ChangeLog index 3bb9291..1f0a9d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-08-24 Jim Meyering + bootstrap: Ignore more. + * bootstrap (symlink_to_dir): Add a directory name like + uniwidth to e.g., lib/.gitignore. + (slurp): Handle the sys_stat_.h -> sys mapping, too. + * .hgignore: Remove this file, too. + * Makefile.am (EXTRA_DIST): Remove .gitignore and .hgignore. + No longer version-control .???ignore files in lib/, m4/, and po/. * .gitignore: Ignore a few files in lib/, m4/, and po/ that are not picked up automatically. diff --git a/Makefile.am b/Makefile.am index 2d38591..c1a629b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,8 +17,6 @@ SUBDIRS = lib src doc man po tests EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \ - .gitignore \ - .hgignore \ .kludge-stamp .prev-version THANKS-to-translators THANKStt.in \ .vg-suppressions \ .x-po-check \ diff --git a/bootstrap b/bootstrap index a9efa7b..e3425fa 100755 --- a/bootstrap +++ b/bootstrap @@ -302,7 +302,19 @@ symlink_to_dir() # If the destination directory doesn't exist, create it. # This is required at least for "lib/uniwidth/cjk.h". dst_dir=`dirname "$dst"` - test -d "$dst_dir" || mkdir -p "$dst_dir" + if ! test -d "$dst_dir"; then + mkdir -p "$dst_dir" + + # If we've just created a directory like lib/uniwidth, + # tell version control system(s) it's ignorable. + # FIXME: for now, this does only one level + parent=`dirname "$dst_dir"` + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + ig=$parent/$dot_ig + insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'` + done + fi if $copy; then { @@ -453,6 +465,11 @@ slurp() { # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed f=`echo "$copied"|sed 's/_\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'` insert_sorted_if_absent $ig "$f" + + # For files like sys_stat_.h and sys_time_.h, record as + # ignorable the directory we might eventually create: sys/. + f=`echo "$copied"|sed 's/sys_.*_\.h$/sys/'` + insert_sorted_if_absent $ig "$f" fi done done -- 2.7.4