aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2024-01-09 20:55:43 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-10 19:53:10 -0500
commit0846ae35a1a2d9968105a0174d82539f1927ba28 (patch)
treed26ac8d80b5dd650eb48775204de24eaa498223b /sim/ppc
parent908ff469f594ea64a1a7e5ec7ad1b0cb9988c42e (diff)
downloadgdb-0846ae35a1a2d9968105a0174d82539f1927ba28.zip
gdb-0846ae35a1a2d9968105a0174d82539f1927ba28.tar.gz
gdb-0846ae35a1a2d9968105a0174d82539f1927ba28.tar.bz2
sim: ppc: rework defines.h to handle HAVE symbols defined to 0
The HAVE_DECL_xxx defines are always defined to 0 or 1. The current defines.h logic assumes every HAVE_xxx symbol is only defined iff it's defined to 1 which causes this to break. Tweak the sed logic to only match defines of 1.
Diffstat (limited to 'sim/ppc')
-rw-r--r--sim/ppc/local.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/ppc/local.mk b/sim/ppc/local.mk
index 3f495cb..0031753 100644
--- a/sim/ppc/local.mk
+++ b/sim/ppc/local.mk
@@ -80,7 +80,7 @@ noinst_PROGRAMS += %D%/run
%D%/defines.h: %D%/stamp-defines ; @true
%D%/stamp-defines: config.h Makefile
- $(AM_V_GEN)sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > %D%/defines.hin
+ $(AM_V_GEN)$(SED) -n -e '/^#define HAVE_.*1$$/{ s/ 1$$/",/; s/.* HAVE_/"HAVE_/; p }' < config.h > %D%/defines.hin
$(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/defines.hin %D%/defines.h
$(AM_V_at)touch $@