{
ad_debug ">ad_process_tree: $1"
- # We take all files, other than *.ad, including source files, in case
- # they use the non-C-compiler-friendly format of distdefs, which is
- # possible.
-
- files=`find $am_distdir \! -name \*\.ad`
+ # Take files, except source and .ad files.
+ files=`find $am_distdir \! -name \*\.ad \( \
+ \! -name \*\.[cC] -a \
+ \! -name \*\.[cC][cCpP] -a \
+ \! -name \*\.[cC][xX][xX] -a \
+ \! -name \*\.[cC][pP][pP] -a \
+ \! -name \*\.[cC]++ -a \
+ \! -name \*\.m -a \
+ \! -name \*\.[hH] -a \
+ \! -name \*\.hh \)`
files=`echo $files | sed 's/$am_distdir//'`
# Take away noprocess list
if test -f autodist.noprocess; then
- files=`echo $files | sh autodist.noprocess` || exit 1
+ files=`echo $files" " | sh autodist.noprocess` || exit 1
fi
for ff in $files
# Take away noprocess list
if test -f autodist.noprocess; then
- files=`echo $files | sh autodist.noprocess` || exit 1
+ files=`echo $files" " | sh autodist.noprocess` || exit 1
fi
for ff in $files
for i in $undistdefs
do
ad_debug "undefining $i distdef"
- distdefs=`echo $distdefs | sed s/$i//`
+ distdefs=`echo $distdefs | sed s/$i//g`
done
rm -f autodist.tmp.defs
ad_debug ">ad_process_noprocess"
+ cur=`pwd`
+ cd $am_distdir || exit 1
for i in $noprocess
do
# Escape
ie=`echo $i | sed 's/\\//\\\\\//g'` || exit 1
- n="$n -e 's/$am_distdir\\/$ie//'"
+ n="$n -e 's/$am_distdir\\/$ie //'"
np=true
done
+ cd $cur || exit 1
rm -f autodist.noprocess
if test x$np = xtrue; then