public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC/PATCH] sim: headers: use abs_srcdir to find helper scripts
@ 2011-12-30  9:12 Mike Frysinger
  2011-12-31  3:37 ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2011-12-30  9:12 UTC (permalink / raw)
  To: gdb-patches; +Cc: toolchain-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC/PATCH] sim: headers: use abs_srcdir to find helper scripts
  2011-12-30  9:12 [RFC/PATCH] sim: headers: use abs_srcdir to find helper scripts Mike Frysinger
@ 2011-12-31  3:37 ` Mike Frysinger
  2012-01-06  6:44   ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2011-12-31  3:37 UTC (permalink / raw)
  To: gdb-patches; +Cc: toolchain-devel

On Fri, Dec 30, 2011 at 03:46, Mike Frysinger <vapier@gentoo.org> wrote:
> --- a/sim/common/Makefile.in
> +++ b/sim/common/Makefile.in
>
>  headers:
> -       rootme=`pwd` ; \

this part is incorrect since "rootme" appears to be indirectly
referenced via some of the toolchain vars.  but the rest still looks
fine to me and i'll go with that if no one has any complaints.
-mike

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC/PATCH] sim: headers: use abs_srcdir to find helper scripts
  2011-12-31  3:37 ` Mike Frysinger
@ 2012-01-06  6:44   ` Mike Frysinger
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2012-01-06  6:44 UTC (permalink / raw)
  To: gdb-patches; +Cc: toolchain-devel

[-- Attachment #1: Type: Text/Plain, Size: 482 bytes --]

On Friday 30 December 2011 21:56:41 Mike Frysinger wrote:
> On Fri, Dec 30, 2011 at 03:46, Mike Frysinger <vapier@gentoo.org> wrote:
> > --- a/sim/common/Makefile.in
> > +++ b/sim/common/Makefile.in
> > 
> >  headers:
> > -       rootme=`pwd` ; \
> 
> this part is incorrect since "rootme" appears to be indirectly
> referenced via some of the toolchain vars.  but the rest still looks
> fine to me and i'll go with that if no one has any complaints.

committed
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-06  6:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-30  9:12 [RFC/PATCH] sim: headers: use abs_srcdir to find helper scripts Mike Frysinger
2011-12-31  3:37 ` Mike Frysinger
2012-01-06  6:44   ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).