From: Mike Frysinger Date: Wed, 23 Jun 2021 02:31:12 +0000 (-0400) Subject: sim: switch common srcdir to abs_srcdir X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b34084121ae20b04e22d44d6a2891f54fef7ffd2;p=binutils-gdb.git sim: switch common srcdir to abs_srcdir 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. --- diff --git a/sim/ChangeLog b/sim/ChangeLog index dcee43bbb92..804a2ac11db 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,8 @@ +2021-06-23 Mike Frysinger + + * configure.ac (SIM_BUILD_TARGET): Simplify sed script. + * configure: Regenerate. + 2021-06-22 Mike Frysinger * configure.ac: Update rx SIM_TARGET call. Include rx/acinclude.m4. diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index fdfeca9b9a5..bb1a967c298 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2021-06-23 Mike Frysinger + + * Make-common.in (srcdir): Change to abs_srcdir. + 2021-06-22 Mike Frysinger * callback.c (cb_target_to_host_signal): New function. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 4bf1e2e21e2..c203b4e1c7b 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 b/sim/configure index d2b57f8b310..21ba12179d2 100755 --- a/sim/configure +++ b/sim/configure @@ -16709,7 +16709,7 @@ $as_echo X"$file" | ;; "aarch64/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/aarch64:; } + /^srcdir = / s:$:/aarch64: p }' \ aarch64/Makesim1.tmp @@ -16722,7 +16722,7 @@ $as_echo X"$file" | "depdir-aarch64":C) $SHELL $ac_aux_dir/mkinstalldirs aarch64/$DEPDIR ;; "arm/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/arm:; } + /^srcdir = / s:$:/arm: p }' \ arm/Makesim1.tmp @@ -16735,7 +16735,7 @@ $as_echo X"$file" | "depdir-arm":C) $SHELL $ac_aux_dir/mkinstalldirs arm/$DEPDIR ;; "avr/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/avr:; } + /^srcdir = / s:$:/avr: p }' \ avr/Makesim1.tmp @@ -16750,7 +16750,7 @@ $as_echo X"$file" | "depdir-bpf":C) $SHELL $ac_aux_dir/mkinstalldirs bpf/$DEPDIR ;; "cr16/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/cr16:; } + /^srcdir = / s:$:/cr16: p }' \ cr16/Makesim1.tmp @@ -16764,7 +16764,7 @@ $as_echo X"$file" | "depdir-cris":C) $SHELL $ac_aux_dir/mkinstalldirs cris/$DEPDIR ;; "d10v/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/d10v:; } + /^srcdir = / s:$:/d10v: p }' \ d10v/Makesim1.tmp @@ -16778,7 +16778,7 @@ $as_echo X"$file" | "depdir-frv":C) $SHELL $ac_aux_dir/mkinstalldirs frv/$DEPDIR ;; "ft32/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/ft32:; } + /^srcdir = / s:$:/ft32: p }' \ ft32/Makesim1.tmp @@ -16791,7 +16791,7 @@ $as_echo X"$file" | "depdir-ft32":C) $SHELL $ac_aux_dir/mkinstalldirs ft32/$DEPDIR ;; "h8300/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/h8300:; } + /^srcdir = / s:$:/h8300: p }' \ h8300/Makesim1.tmp @@ -16806,7 +16806,7 @@ $as_echo X"$file" | "depdir-lm32":C) $SHELL $ac_aux_dir/mkinstalldirs lm32/$DEPDIR ;; "m32c/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/m32c:; } + /^srcdir = / s:$:/m32c: p }' \ m32c/Makesim1.tmp @@ -16820,7 +16820,7 @@ $as_echo X"$file" | "depdir-m32r":C) $SHELL $ac_aux_dir/mkinstalldirs m32r/$DEPDIR ;; "m68hc11/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/m68hc11:; } + /^srcdir = / s:$:/m68hc11: p }' \ m68hc11/Makesim1.tmp @@ -16833,7 +16833,7 @@ $as_echo X"$file" | "depdir-m68hc11":C) $SHELL $ac_aux_dir/mkinstalldirs m68hc11/$DEPDIR ;; "mcore/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/mcore:; } + /^srcdir = / s:$:/mcore: p }' \ mcore/Makesim1.tmp @@ -16846,7 +16846,7 @@ $as_echo X"$file" | "depdir-mcore":C) $SHELL $ac_aux_dir/mkinstalldirs mcore/$DEPDIR ;; "microblaze/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/microblaze:; } + /^srcdir = / s:$:/microblaze: p }' \ microblaze/Makesim1.tmp @@ -16861,7 +16861,7 @@ $as_echo X"$file" | "depdir-mn10300":C) $SHELL $ac_aux_dir/mkinstalldirs mn10300/$DEPDIR ;; "moxie/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/moxie:; } + /^srcdir = / s:$:/moxie: p }' \ moxie/Makesim1.tmp @@ -16874,7 +16874,7 @@ $as_echo X"$file" | "depdir-moxie":C) $SHELL $ac_aux_dir/mkinstalldirs moxie/$DEPDIR ;; "msp430/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/msp430:; } + /^srcdir = / s:$:/msp430: p }' \ msp430/Makesim1.tmp @@ -16888,7 +16888,7 @@ $as_echo X"$file" | "depdir-or1k":C) $SHELL $ac_aux_dir/mkinstalldirs or1k/$DEPDIR ;; "pru/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/pru:; } + /^srcdir = / s:$:/pru: p }' \ pru/Makesim1.tmp @@ -16902,7 +16902,7 @@ $as_echo X"$file" | "depdir-riscv":C) $SHELL $ac_aux_dir/mkinstalldirs riscv/$DEPDIR ;; "rl78/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/rl78:; } + /^srcdir = / s:$:/rl78: p }' \ rl78/Makesim1.tmp @@ -16915,7 +16915,7 @@ $as_echo X"$file" | "depdir-rl78":C) $SHELL $ac_aux_dir/mkinstalldirs rl78/$DEPDIR ;; "rx/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/rx:; } + /^srcdir = / s:$:/rx: p }' \ rx/Makesim1.tmp @@ -16928,7 +16928,7 @@ $as_echo X"$file" | "depdir-rx":C) $SHELL $ac_aux_dir/mkinstalldirs rx/$DEPDIR ;; "sh/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/sh:; } + /^srcdir = / s:$:/sh: p }' \ sh/Makesim1.tmp @@ -16944,7 +16944,7 @@ $as_echo X"$file" | "depdir-v850":C) $SHELL $ac_aux_dir/mkinstalldirs v850/$DEPDIR ;; "example-synacor/Makefile":C) sed -n \ -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ { - /^srcdir / { s:= := ../:; s:$:/example-synacor:; } + /^srcdir = / s:$:/example-synacor: p }' \ example-synacor/Makesim1.tmp diff --git a/sim/configure.ac b/sim/configure.ac index e227f112d8b..3632b559bf0 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 }' \ $1/Makesim1.tmp