#
# $Log$
+set -e
+
# --- Configuration variables ---
prefix=@prefix@
done
if $stdlib; then
- set \
- "$datadir/aclocal.glob" \
+ set -- \
`test -r $datadir/aclocal.site && echo "$datadir/aclocal.site"` \
`test -r ./aclocal.lib && echo "./aclocal.lib"` \
"$@"
else
- set \
+ set -- \
`test -r ./aclocal.lib && echo "./aclocal.lib"` \
"$@"
fi
x)
t=${TMPDIR-/tmp}/mkaclocal.$$
+ doaclocal=false
+ if $stdlib && [ $out = aclocal.m4 ]; then
+ doaclocal=true
+ out=acinclude.m4
+ fi
if mkdir -m700 $t; then :
else
echo >&2 "mkaclocal: cculd not create temporary directory"
grep "\*@--TOP--@\*" ./aclocal.lib >/dev/null &&
sed -e "/\*@--TOP--@\*/, $ d" ./aclocal.lib
cat $out.tmp
- } >$out
+ } >$out.new
+ mv $out.new $out
else
rm -f $out
fi
rm -fr $t $out.tmp
+ if $doaclocal; then aclocal; fi
;;
esac