From cc6e9db29da73bb226b6e53ff4df0f135207d206 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sat, 23 Aug 2014 21:01:58 +0100 Subject: 33047: use git to simplify massively source distribution file selection --- Util/.distfiles | 6 ------ Util/mkdisttree.sh | 13 ++++++++++++- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'Util') diff --git a/Util/.distfiles b/Util/.distfiles index 162ace386..411938591 100644 --- a/Util/.distfiles +++ b/Util/.distfiles @@ -1,10 +1,4 @@ DISTFILES_SRC=' - .distfiles - check_exports - helpfiles - mkdisttree.sh - preconfig - reporter ' DISTFILES_NOT=' difflog.pl diff --git a/Util/mkdisttree.sh b/Util/mkdisttree.sh index 17b936ed7..2d55b06f8 100755 --- a/Util/mkdisttree.sh +++ b/Util/mkdisttree.sh @@ -51,9 +51,15 @@ trap 'rm -f $filelist; rm -rf $disttree; exit 1' 1 2 15 ( while read dfn; do subdir=`echo $dfn | sed 's,/\.distfiles$,,'` echo >&2 "Processing directory $subdir..." - eval "DISTFILES_$type=" + eval "DISTFILES_$type= DISTFILES_NOT=" . $sdir_top/$dfn eval "distfiles=\$DISTFILES_$type" + if [ $type = SRC ]; then + # All files in git appear in the source bundle, unless + # explicitly excluded with DISTFILES_NOT. + distfiles="$distfiles + `cd $sdir_top/$subdir; git ls-files | grep -v /`" + fi if test -n "$distfiles"; then cmds=`echo "$distfiles" | sed -e "$sed_separate"` eval "$cmds" @@ -62,6 +68,11 @@ trap 'rm -f $filelist; rm -rf $disttree; exit 1' 1 2 15 fi $sdir_top/mkinstalldirs $disttree/$subdir || exit 1 for f in $deplist `test -z "$globlist" || ( cd $dir_top/$subdir && eval "echo $globlist")`; do + for fnot in $DISTFILES_NOT; do + if [ $fnot = $f ]; then + continue 2 + fi + done if test -f $dir_top/$subdir/$f; then # ln $dir_top/$subdir/$f $disttree/$subdir/$f || \ cp -p $dir_top/$subdir/$f $disttree/$subdir/$f || exit 1 -- cgit 1.4.1