This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC/PATCH] sim: headers: use abs_srcdir to find helper scripts
- From: Mike Frysinger <vapier at gentoo dot org>
- To: gdb-patches at sourceware dot org
- Cc: toolchain-devel at blackfin dot uclinux dot org
- Date: Fri, 30 Dec 2011 03:46:34 -0500
- Subject: [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 <vapier@gentoo.org>
2011-12-30 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (abs_srcdir): Declare.
(srcroot): Define in terms of abs_srcdir.
(headers): Delete rootme. Change srcdir to abs_srcdir.
---
sim/common/Makefile.in | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
index 5fca9da..7065fc7 100644
--- a/sim/common/Makefile.in
+++ b/sim/common/Makefile.in
@@ -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
headers:
- rootme=`pwd` ; \
cd $(srcdir) ; \
rm -f nltvals.new ; \
- $(SHELL) $(srcdir)/gennltvals.sh $(SHELL) $(srcroot) "$(CPP_FOR_TARGET)" > nltvals.new ; \
+ $(SHELL) $(abs_srcdir)/gennltvals.sh $(SHELL) $(srcroot) "$(CPP_FOR_TARGET)" > nltvals.new ; \
$(SHELL) $(srcroot)/move-if-change nltvals.new nltvals.def
.c.o:
--
1.7.6.1