summaryrefslogtreecommitdiff
path: root/nuttx/tools
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-17 14:43:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-17 14:43:55 +0000
commitd8d9cc8a96cdc2219af7bec8142e7633779fd685 (patch)
treed9cf39f88361f174a2350d354ffb5584d43e2fc4 /nuttx/tools
parent4f0e8b1249c1550bac83f9db61c67094bc6afc2d (diff)
downloadpx4-nuttx-d8d9cc8a96cdc2219af7bec8142e7633779fd685.tar.gz
px4-nuttx-d8d9cc8a96cdc2219af7bec8142e7633779fd685.tar.bz2
px4-nuttx-d8d9cc8a96cdc2219af7bec8142e7633779fd685.zip
Add logic to automatically unload module on exit; Several patches from Mike Smith
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5528 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/tools')
-rw-r--r--nuttx/tools/Makefile.export12
1 files changed, 8 insertions, 4 deletions
diff --git a/nuttx/tools/Makefile.export b/nuttx/tools/Makefile.export
index 002cb526b..6dfe72bf9 100644
--- a/nuttx/tools/Makefile.export
+++ b/nuttx/tools/Makefile.export
@@ -37,14 +37,18 @@ include $(TOPDIR)/.config
include $(EXPORTDIR)/Make.defs
ifdef ARCHSCRIPT
+#
+# ARCHSCRIPT may contain a leading -T; it must not be followed by a space
+# for this to work.
+#
ifeq ($(WINTOOL),y)
-LDPATH = ${shell cygpath -u $(patsubst -T,,$(ARCHSCRIPT))}
+LDPATH = $(shell cygpath -u $(patsubst -T%,%,$(ARCHSCRIPT)))
else
-LDPATH = $(patsubst -T,,$(ARCHSCRIPT))
+LDPATH = $(patsubst -T%,%,$(ARCHSCRIPT))
endif
-LDNAME = ${shell basename ${LDPATH}}
-LDDIR = ${shell dirname ${LDPATH}}
+LDNAME = ${notdir ${LDPATH}}
+LDDIR = ${dir ${LDPATH}}
endif
ARCHSUBDIR = "arch/$(CONFIG_ARCH)/src"