This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC/PATCH] sim: headers: use abs_srcdir to find helper scripts

Trying to run `headers` in an out-of-tree build fails atm due to the
relative srcdir paths being used in a location other than where they
were setup to be used from.  Get abs_srcdir from configure and use
that instead where applicable.

I've marked this as RFC because I don't know if there are standing
policies advocating the avoidance of abs_xxx variables ?

Signed-off-by: Mike Frysinger <>

2011-12-30  Mike Frysinger  <>

	* (abs_srcdir): Declare.
	(srcroot): Define in terms of abs_srcdir.
	(headers): Delete rootme.  Change srcdir to abs_srcdir.
 sim/common/ |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sim/common/ b/sim/common/
index 5fca9da..7065fc7 100644
--- a/sim/common/
+++ b/sim/common/
@@ -19,7 +19,8 @@ default: all
 VPATH = @srcdir@
 srcdir = @srcdir@
-srcroot = $(srcdir)/../..
+abs_srcdir = @abs_srcdir@
+srcroot = $(abs_srcdir)/../..
 prefix = @prefix@
 exec_prefix = @exec_prefix@
@@ -80,10 +81,9 @@ all:
 # An alternative is to slurp in the tables at runtime.
 .PHONY: headers
-	rootme=`pwd` ; \
 	cd $(srcdir) ; \
 	rm -f ; \
-	$(SHELL) $(srcdir)/ $(SHELL) $(srcroot) "$(CPP_FOR_TARGET)" > ; \
+	$(SHELL) $(abs_srcdir)/ $(SHELL) $(srcroot) "$(CPP_FOR_TARGET)" > ; \
 	$(SHELL) $(srcroot)/move-if-change nltvals.def

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]