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/tools | |
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/tools')
-rwxr-xr-x | nuttx/tools/incdir.sh | 19 |
1 files changed, 13 insertions, 6 deletions
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 |