parser.add_argument('-c', '--checkout', help='string to pass to git for checkout')
parser.add_argument('-o', '--output', help='output directory', default='.')
parser.add_argument('-q', '--quiet', help='be quiet', action='store_true')
- parser.add_argument('-t', '--target', help='target')
+ parser.add_argument('-t', '--target', help='target', action='append')
parser.add_argument('-k', '--keep', help='keep working tree', action='store_true')
parser.add_argument('--debug', help='build with debugging symbols where possible', action='store_true')
parser.add_argument('-w', '--work', help='override default work directory')
parser.add_argument('--ccache', help='use ccache', action='store_true')
args = parser.parse_args()
+ # Check for incorrect multiple parameters
+ if args.target is not None:
+ if len(args.target) > 1:
+ parser.error('multiple -t options specified')
+ sys.exit(1)
+ else:
+ args.target = args.target[0]
+
# Override configured stuff
if args.git_prefix is not None:
config.set('git_prefix', args.git_prefix)