From c11b02dfd476c3e823ce59447473c12bba0533ca Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 5 Mar 2015 13:13:52 +0100 Subject: [PATCH] gdb: save generated files in the build directory Fixes #1435 --- .gitignore | 1 - repos/ports/lib/mk/gdbserver_platform.inc | 14 +++++++++++++- repos/ports/ports/gdb.hash | 2 +- repos/ports/ports/gdb.port | 22 ---------------------- 4 files changed, 14 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index cada4e03d..e617a5cb8 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,6 @@ /repos/ports/contrib /repos/ports/download /repos/ports/src/app/arora/html -/repos/ports/src/lib/gdbserver_platform/generated /repos/qt4/contrib /repos/qt4/download /repos/qt4/tool/bootstrap diff --git a/repos/ports/lib/mk/gdbserver_platform.inc b/repos/ports/lib/mk/gdbserver_platform.inc index 464b7110a..44d60474a 100644 --- a/repos/ports/lib/mk/gdbserver_platform.inc +++ b/repos/ports/lib/mk/gdbserver_platform.inc @@ -13,8 +13,20 @@ SRC_CC += gdbserver_platform_helper.cc LIBS += libc +# generated files + +REGFORMATS_DIR := $(abspath ${GDB_CONTRIB_DIR}/gdb/regformats) + +reg-arm.c: + $(VERBOSE) cd $(dir $@) && $(SHELL) $(REGFORMATS_DIR)/regdat.sh $(REGFORMATS_DIR)/reg-arm.dat $(notdir $@) + +i386.c: + $(VERBOSE) cd $(dir $@) && $(SHELL) $(REGFORMATS_DIR)/regdat.sh $(REGFORMATS_DIR)/i386/i386.dat $(notdir $@) + +i386-avx.c: + $(VERBOSE) cd $(dir $@) && $(SHELL) $(REGFORMATS_DIR)/regdat.sh $(REGFORMATS_DIR)/i386/i386-avx.dat $(notdir $@) + vpath %.cc $(REP_DIR)/src/lib/gdbserver_platform -vpath %.c $(REP_DIR)/src/lib/gdbserver_platform/generated vpath %.c $(GDB_CONTRIB_DIR)/gdb/gdbserver # diff --git a/repos/ports/ports/gdb.hash b/repos/ports/ports/gdb.hash index 62b301fe7..fa9dce035 100644 --- a/repos/ports/ports/gdb.hash +++ b/repos/ports/ports/gdb.hash @@ -1 +1 @@ -cb83a224ef03153433cb1ea03100301e88450f02 +7ec276c84890127c9d72a17fd6bbd7df372131c7 diff --git a/repos/ports/ports/gdb.port b/repos/ports/ports/gdb.port index 679dba1f1..bfcbf6afa 100644 --- a/repos/ports/ports/gdb.port +++ b/repos/ports/ports/gdb.port @@ -15,25 +15,3 @@ PATCHES := $(addprefix $(PATCHES_DIR)/,$(shell cat $(PATCHES_DIR)/series)) \ $(REP_DIR)/src/noux-pkg/gdb/build.patch PATCH_OPT := -p1 -d ${DIR(gdb)} -default: _patch generated_files - -GENERATED_DIR := $(REP_DIR)/src/lib/gdbserver_platform/generated - -$(GENERATED_DIR): - $(VERBOSE) mkdir $@ - -REGFORMATS_DIR := $(abspath ${DIR(gdb)}/gdb/regformats) - -$(GENERATED_DIR)/reg-arm.c: $(GENERATED_DIR) - $(VERBOSE) cd $(GENERATED_DIR) && $(SHELL) $(REGFORMATS_DIR)/regdat.sh $(REGFORMATS_DIR)/reg-arm.dat $(notdir $@) - -$(GENERATED_DIR)/i386.c: $(GENERATED_DIR) - $(VERBOSE) cd $(GENERATED_DIR) && $(SHELL) $(REGFORMATS_DIR)/regdat.sh $(REGFORMATS_DIR)/i386/i386.dat $(notdir $@) - -$(GENERATED_DIR)/i386-avx.c: $(GENERATED_DIR) - $(VERBOSE) cd $(GENERATED_DIR) && $(SHELL) $(REGFORMATS_DIR)/regdat.sh $(REGFORMATS_DIR)/i386/i386-avx.dat $(notdir $@) - -generated_files: $(GENERATED_DIR)/reg-arm.c \ - $(GENERATED_DIR)/i386.c \ - $(GENERATED_DIR)/i386-avx.c -