Commit d34e16dd authored by Vitaly Lipatov's avatar Vitaly Lipatov

mkpatch: add top_srcdir support

parent b30a824e
......@@ -11,9 +11,11 @@
if [ -f Makefile ] ; then
DD1=`grep ^TOPOBJDIR Makefile | sed -e "s| ||g"`
DD2=`grep ^top_builddir Makefile | sed -e "s| ||g"`
DD3=`grep ^top_srcdir Makefile | sed -e "s| ||g"`
elif [ -f Makefile.in ] ; then
DD1=`grep ^TOPOBJDIR Makefile.in | sed -e "s| ||g"`
DD2=`grep ^top_builddir Makefile.in | sed -e "s| ||g"`
DD3=`grep ^top_srcdir Makefile.in | sed -e "s| ||g"`
else
warning "Can't get topdir from Makefile.in"
fi
......@@ -28,6 +30,11 @@ if [ -n "$DD2" ] ; then
TOPDIR=$top_builddir
fi
if [ -n "$DD3" ] ; then
export $DD3
TOPDIR=$top_srcdir
fi
#test -z "$TOPDIR" && exit 1
#echo "TOPDIR: $TOPDIR"
export TOPDIR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment