summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@anciens.enib.fr>2011-09-13 23:57:29 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-10-05 16:46:50 +0200
commitc5da6f9553ac82fefbefb655ac0207bc58615ae4 (patch)
tree7c3c48b544de7dcd9952957d57501935ce2e93ce
parent37f0d1bb7b5a379161e647b730f5a57b814122bb (diff)
downloadbuildroot-novena-c5da6f9553ac82fefbefb655ac0207bc58615ae4.tar.gz
buildroot-novena-c5da6f9553ac82fefbefb655ac0207bc58615ae4.zip
toolchain/gdb: strip tarball component when extracting
For some tarballs of gdb (see next patch), the extracted directory is *not* named after the version string (eg. gdb-6.6a extract into gdb-6.6/) Create the appropriate directory first, then use --strip-{components,path} when extracting gdb (the same way it is done for the generic package infrastructure). At the same time, get rid of the snapshot special case, because: 1- it's no longer available in the menu 2- it would be handled by the above change Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--toolchain/gdb/gdb.mk9
1 files changed, 2 insertions, 7 deletions
diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
index 462261678..85b892fdf 100644
--- a/toolchain/gdb/gdb.mk
+++ b/toolchain/gdb/gdb.mk
@@ -28,13 +28,8 @@ $(DL_DIR)/$(GDB_SOURCE):
gdb-unpacked: $(GDB_DIR)/.unpacked
$(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE)
- mkdir -p $(TOOLCHAIN_DIR)
- $(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
-ifeq ($(GDB_VERSION),snapshot)
- GDB_REAL_DIR=$(shell \
- tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1)
- ln -sf $(TOOLCHAIN_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR)
-endif
+ mkdir -p $(GDB_DIR)
+ $(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(GDB_DIR) $(TAR_STRIP_COMPONENTS)=1 $(TAR_OPTIONS) -
ifneq ($(wildcard $(GDB_PATCH_DIR)),)
support/scripts/apply-patches.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch $(GDB_PATCH_EXTRA)
endif