gdb: save generated files in the build directory

Fixes #1435
This commit is contained in:
Christian Prochaska 2015-03-05 13:13:52 +01:00 committed by Christian Helmuth
parent 1f7fd647da
commit c11b02dfd4
4 changed files with 14 additions and 25 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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
#

View File

@ -1 +1 @@
cb83a224ef03153433cb1ea03100301e88450f02
7ec276c84890127c9d72a17fd6bbd7df372131c7

View File

@ -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