[PATCH] sim: switch common srcdir to abs_srcdir
Mike Frysinger
vapier@gentoo.org
Wed Jun 23 02:59:52 GMT 2021
We rewrite srcdir in subdir Makefiles that we generate from the common
parent dir since it points to the parent dir. Since @srcdir@ can be a
variety of formats (relative & absolute), switch to @abs_srcdir@ which
is a lot easier to adjust. Our use of srcdir in here should handle it.
---
sim/common/Make-common.in | 2 +-
sim/configure | 36 ++++++++++++++++++------------------
sim/configure.ac | 2 +-
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 4bf1e2e21e27..c203b4e1c7bf 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -34,7 +34,7 @@
## COMMON_PRE_CONFIG_FRAG
-srcdir = @srcdir@
+srcdir = @abs_srcdir@
VPATH = $(srcdir):$(srccom)
srccom = $(srcdir)/../common
srcroot = $(srcdir)/../..
diff --git a/sim/configure.ac b/sim/configure.ac
index e227f112d8b9..3632b559bf0f 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -69,7 +69,7 @@ m4_define([SIM_BUILD_TARGET], [dnl
AC_CONFIG_COMMANDS([$1/Makefile],
[sed -n \
-e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
- /^srcdir / { s:= := ../:; s:$:/$1:; }
+ /^srcdir = / s:$:/$1:
p
}' \
<Make-common.sim >$1/Makesim1.tmp
--
2.31.1
More information about the Gdb-patches
mailing list