From 9382b687818d29e5c152cfc99298797cff847a27 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Fri, 16 Jun 2006 20:08:21 +0200 Subject: [PATCH] Fix srcdir for VPATH build. --- src/stub/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/stub/Makefile b/src/stub/Makefile index 920c421a..a85d8ab3 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -29,8 +29,10 @@ endif # // # ************************************************************************/ -srcdir = . -top_srcdir = ../.. +ifndef srcdir +srcdir := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) +srcdir := $(shell echo '$(srcdir)' | sed 's,/*$$,,') +endif STUBS += amd64-linux.elf-entry.h STUBS += amd64-linux.elf-fold.h