1 # |
1 # |
2 # Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 # Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 # All rights reserved. |
3 # All rights reserved. |
4 # This component and the accompanying materials are made available |
4 # This component and the accompanying materials are made available |
5 # under the terms of the License "Eclipse Public License v1.0" |
5 # under the terms of the License "Eclipse Public License v1.0" |
6 # which accompanies this distribution, and is available |
6 # which accompanies this distribution, and is available |
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
182 parser.add_option("-p","--preinclude",action="store",dest="preinclude",help="Pre-include file ") |
187 parser.add_option("-p","--preinclude",action="store",dest="preinclude",help="Pre-include file ") |
183 parser.add_option("-s","--source",action="append",dest="sourcefiles",help="List of source files") |
188 parser.add_option("-s","--source",action="append",dest="sourcefiles",help="List of source files") |
184 parser.add_option("-u","--userinc",action="append",dest="user_include",help="User Include Folders") |
189 parser.add_option("-u","--userinc",action="append",dest="user_include",help="User Include Folders") |
185 parser.add_option("-x","--systeminc",action="append",dest="system_include",help="System Include Folders") |
190 parser.add_option("-x","--systeminc",action="append",dest="system_include",help="System Include Folders") |
186 |
191 |
187 (options, leftover_args) = parser.parse_args(sys.argv[1:]) |
192 |
|
193 # The following allows the use of the --command option. |
|
194 # The add_option() is redundant since --command is |
|
195 # expanded well before it can take effect but it does |
|
196 # allow us to print out a useful help message. |
|
197 parser.add_option("--command",action="store", |
|
198 dest="preinclude", |
|
199 help="""Specify a command file with more commandline options |
|
200 in it (for very large components)""") |
|
201 expanded_args = expand_command_options(sys.argv[1:]) |
|
202 |
|
203 (options, leftover_args) = parser.parse_args(expanded_args) |
188 |
204 |
189 if leftover_args: |
205 if leftover_args: |
190 for invalids in leftover_args: |
206 for invalids in leftover_args: |
191 warning("Unknown parameter '%s'" % invalids) |
207 warning("Unknown parameter '%s'" % invalids) |
192 |
208 |