summaryrefslogtreecommitdiff
path: root/nuttx/tools/incdir.bat
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-23 14:13:57 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-23 14:13:57 +0000
commit302877eafc373d8ae61d7ecc66f17968d4e1e643 (patch)
treeea307eb5f1582a00a29acfdb8e9b8e2dd32b62b6 /nuttx/tools/incdir.bat
parent5d8459bbc994e69d80127776d82faa185ae42f9c (diff)
downloadpx4-nuttx-302877eafc373d8ae61d7ecc66f17968d4e1e643.tar.gz
px4-nuttx-302877eafc373d8ae61d7ecc66f17968d4e1e643.tar.bz2
px4-nuttx-302877eafc373d8ae61d7ecc66f17968d4e1e643.zip
Add common Toolchain.defs for AVR/AVR32; Add Toolchain.defs for ARM; Add more toolchain options (from Mike); incdir.sh and .bat now take -s option
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5384 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/tools/incdir.bat')
-rwxr-xr-xnuttx/tools/incdir.bat56
1 files changed, 44 insertions, 12 deletions
diff --git a/nuttx/tools/incdir.bat b/nuttx/tools/incdir.bat
index 093c5bd2e..f7383fc9a 100755
--- a/nuttx/tools/incdir.bat
+++ b/nuttx/tools/incdir.bat
@@ -36,14 +36,21 @@ rem
rem Handle command line options
set progname=%0
+set pathtype=user
:ArgLoop
-rem [-d] [-w] [-h]. [-w] and [-d] Ignored for compatibility with incdir.sh
+rem [-d] [-w] [-s] [-h]. [-w] and [-d] Ignored for compatibility with incdir.sh
if "%1"=="-d" goto :NextArg
if "%1"=="-w" goto :NextArg
if "%1"=="-h" goto :Usage
+
+if "%1"=="-s" (
+ set pathtype=system
+ goto :NextArg
+)
+
goto :CheckCompiler
:NextArg
@@ -97,21 +104,43 @@ if not exist %1 (
)
if "%fmt%"=="zds" goto :GenerateZdsPath
+if "%response%"=="" goto :FirstStdPath
+if "%pathtype%"=="system" goto :NextStdSystemPath
-if "%response"=="" (
- set response=-I "%1"
-) else (
- set response=%response% -I "%1"
-)
+set response=%response% -I "%1"
+goto :EndOfDirLoop
+
+:NextStdSystemPath
+
+set response=%response% -isystem "%1"
+goto :EndOfDirLoop
+
+:FirstStdPath
+
+if "%pathtype%"=="system" goto :FirstStdSystemPath
+set response=-I "%1"
+goto :EndOfDirLoop
+
+:FirstStdSystemPath
+
+set response=-isystem "%1"
goto :EndOfDirLoop
:GenerateZdsPath
-if "%response"=="" (
- set response=-usrinc:%1
-) else (
- set response=%response%;%1
-)
+if "%response%"=="" goto :FirstZdsPath
+set response=%response%;%1
+goto :EndOfDirLoop
+
+:FirstZdsPath
+
+if "%pathtype%"=="system" goto :FirstZdsSystemPath
+set response=-usrinc:%1
+goto :EndOfDirLoop
+
+:FirstZdsSystemPath
+
+set response=-stdinc:%1
:EndOfDirLoop
shift
@@ -120,7 +149,7 @@ goto :DirLoop
:Usage
echo %progname% is a tool for flexible generation of include path arguments for a
echo variety of different compilers in a variety of compilation environments
-echo USAGE: %progname% [-w] [-d] [-h] ^<compiler-path^> ^<dir1^> [^<dir2^> [^<dir3^> ...]]
+echo USAGE: %progname% [-w] [-d] [-s] [-h] ^<compiler-path^> ^<dir1^> [^<dir2^> [^<dir3^> ...]]
echo Where:
echo ^<compiler-path^>
echo The full path to your compiler
@@ -128,6 +157,9 @@ echo ^<dir1^> [^<dir2^> [^<dir3^> ...]]
echo A list of include directories
echo -w, -d
echo For compatibility with incdir.sh (ignored)
+echo -s
+echo Generate standard, system header file paths instead of normal user
+echo header file paths.
echo -h
echo Shows this help text and exits.
:End