- use absolute path for top_builddir and top_srcdir.
  Fixes make trying to include the very same file in an endless loop.
diff --git a/coreutils/Makefile b/coreutils/Makefile
index d3f745a..f7fdc4b 100644
--- a/coreutils/Makefile
+++ b/coreutils/Makefile
@@ -4,8 +4,12 @@
 #
 # Licensed under the GPL v2, see the file LICENSE in this tarball.
 
+ifndef top_srcdir
 top_srcdir=..
+endif
+ifndef top_builddir
 top_builddir=..
+endif
 srcdir=$(top_srcdir)/coreutils
 SHELLUTILS_DIR:=./
 include $(top_builddir)/Rules.mak
diff --git a/coreutils/libcoreutils/Makefile b/coreutils/libcoreutils/Makefile
index 0a1c80a..e8bc65d 100644
--- a/coreutils/libcoreutils/Makefile
+++ b/coreutils/libcoreutils/Makefile
@@ -17,8 +17,12 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 #
 
+ifndef top_srcdir
 top_srcdir=../..
+endif
+ifndef top_builddir
 top_builddir=../..
+endif
 srcdir=$(top_srcdir)/coreutils/libcoreutils
 LIBCOREUTILS_DIR:=./
 include $(top_builddir)/Rules.mak