diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-07 19:31:35 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-07 19:31:35 +0000 |
commit | 6fd1f1be1c581cd2b4795ec2acac9599d1236926 (patch) | |
tree | 7979350b6efb22cd0ac68beb04fc77fe84a1c599 /nuttx | |
parent | 779556a689e16cb40e464737c31fb10333c605bd (diff) | |
download | px4-nuttx-6fd1f1be1c581cd2b4795ec2acac9599d1236926.tar.gz px4-nuttx-6fd1f1be1c581cd2b4795ec2acac9599d1236926.tar.bz2 px4-nuttx-6fd1f1be1c581cd2b4795ec2acac9599d1236926.zip |
Fixes to windows path logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1156 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/drivers/Makefile | 6 | ||||
-rwxr-xr-x | nuttx/tools/incdir.sh | 19 |
2 files changed, 15 insertions, 10 deletions
diff --git a/nuttx/drivers/Makefile b/nuttx/drivers/Makefile index a4a3c826d..33d9c096a 100644 --- a/nuttx/drivers/Makefile +++ b/nuttx/drivers/Makefile @@ -35,8 +35,6 @@ -include $(TOPDIR)/Make.defs -COMPILER = ${shell basename $(CC)} - ifeq ($(CONFIG_NET),y) include net/Make.defs ROOTDEPPATH = --dep-path . @@ -47,13 +45,13 @@ ifeq ($(CONFIG_USBDEV),y) include usbdev/Make.defs ROOTDEPPATH = --dep-path . USBDEVDEPPATH = --dep-path usbdev -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh "$CC" $(TOPDIR)/drivers/usbdev} +CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh "$(CC)" $(TOPDIR)/drivers/usbdev} endif include mmcsd/Make.defs ROOTDEPPATH = --dep-path . MMCSDDEPPATH = --dep-path mmcsd -CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh "$CC" $(TOPDIR)/drivers/mmcsd} +CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh "$(CC)" $(TOPDIR)/drivers/mmcsd} ASRCS = $(NET_ASRCS) $(USBDEV_ASRCS) $(MMCSD_ASRCS) AOBJS = $(ASRCS:.S=$(OBJEXT)) diff --git a/nuttx/tools/incdir.sh b/nuttx/tools/incdir.sh index c23103d23..71c87c10e 100755 --- a/nuttx/tools/incdir.sh +++ b/nuttx/tools/incdir.sh @@ -36,13 +36,13 @@ # $1 : Compiler name as it appears in config/*/*/Make.defs # $2, $3, ...: Include file paths -compiler=$1 +ccpath=$1 shift dirlist=$@ usage="USAGE: $0 <compiler-path> <dir1> [<dir2> [<dir3> ...]]" -if [ -z "$compiler" ]; then +if [ -z "$ccpath" ]; then echo "Missing compiler path" echo $usage exit 1 @@ -74,13 +74,20 @@ fi # toolchains, we have to use the full windows-style paths to the header # files. -fmt=std -windows=no +os=`uname -o` +if [ "X$os" = "XCygwin" ]; then + windows=yes + compiler=`cygpath -u "$ccpath"` +else + windows=no + compiler="$ccpath" +fi +exefile=`basename "$compiler"` -exefile=`basename $compiler` if [ "X$exefile" = "Xez8cc.exe" -o "X$exefile" = "Xzneocc.exe" -o "X$exefile" = "XeZ80cc.exe" ]; then fmt=userinc - windows=yes +else + fmt=std fi # Now process each directory in the directory list |