X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=bootstrap;h=90e9206fff7b2db45687febca3f5f2faa35a951b;hb=6e98015774ed2e49f5d8843cd76be4275bfd4064;hp=21ed528e319bb735f3661776cbab7b92ae10384d;hpb=27094c4fc38ca12426ab9f99c1790121f99b0322;p=chaz%2Ftar diff --git a/bootstrap b/bootstrap index 21ed528..90e9206 100755 --- a/bootstrap +++ b/bootstrap @@ -298,6 +298,24 @@ if [ -r $PAXUTILS_SRCDIR/gnulib.modules ]; then ` fi +ignore_file_list= +cleanup_ifl() { + test -n "$ignore_file_list" && rm -f $ignore_file_list +} + +trap 'cleanup_ifl' 1 2 3 15 + +# ignorefile DIR FILE +# add FILE to the temporary ignorelist in the directory DIR +ignorefile() { + file=$1/.ignore.$$ + echo "$2" >> $file + if `echo $ignore_list | grep -qv $file`; then + ignore_file_list="$ignore_file_list +$file" + fi +} + # copy_files srcdir dstdir copy_files() { for file in `cat $1/DISTFILES` @@ -314,6 +332,7 @@ copy_files() { fi echo "$0: Copying file $1/$file to $2/$dst" cp -p $1/$file $2/$dst + ignorefile $2 $dst done } @@ -324,6 +343,7 @@ echo "$0: Creating m4/paxutils.m4" echo "AC_DEFUN([${package}_PAXUTILS],[" cat ${PAXUTILS_SRCDIR}/m4/DISTFILES | sed '/^#/d;s/\(.*\)\.m4/pu_\1/' | tr a-z A-Z echo "])") > ./m4/paxutils.m4 +ignorefile m4 paxutils.m4 if [ -d rmt ]; then : @@ -458,7 +478,7 @@ slurp() { done if test $file = Makefile.am; then copied=$copied${sep}gnulib.mk; sep=$nl - remove_intl='/^[^#].*\/intl/s/^/#/' + remove_intl='/^[^#].*\/intl/s/^/#/;'"s,/$bt,,g" sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/gnulib.mk || { echo "$0: Copying $1/$dir/$file to $dir/gnulib.mk ..." && rm -f $dir/gnulib.mk && @@ -486,13 +506,43 @@ slurp() { fi || exit done - for dot_ig in .cvsignore .gitignore; do + if test -n "$copied"; then + copied="Makefile +Makefile.in +$copied" + if test -d CVS; then + dot_ig=.cvsignore + else + dor_ig=.gitignore + fi + ig=$dir/$dot_ig - if test -n "$copied" && test -f $ig; then - echo "$copied" | sort -u - $ig | cmp -s - $ig || - echo "$copied" | sort -u - $ig -o $ig || exit + if [ -f $dir/.ignore.$$ ]; then + tfile=$dir/.ignore.$$ + else + tfile= fi - done + if test -f $ig; then + echo "$copied" | sort -u - $ig | cmp -s - $ig || + echo "$copied" | sort -u - $ig $tfile -o $ig + else + copied="$dot_ig +$copied" + if [ "$dir" = "po" ]; then + copied="LINGUAS +Makevars +POTFILES +*.mo +*.gmo +*.po +remove-potcdate.sed +stamp-po +$package.pot +$copied" + fi + echo "$copied" | sort -u - $tfile -o $ig + fi || exit + fi done } @@ -594,5 +644,5 @@ if test -d runtime-po; then # Copy identical files from po to runtime-po. (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) fi - +cleanup_ifl echo "$0: done. Now you can run './configure'."