Add --define option. #540
authorHuang Hao <hao.h.huang@intel.com>
Mon, 19 Nov 2012 03:54:34 +0000 (11:54 +0800)
committerHuang Hao <hao.h.huang@intel.com>
Mon, 19 Nov 2012 03:54:34 +0000 (11:54 +0800)
Change-Id: Ic924d639908a1ce731bb525cbcaba02217930377

gitbuildsys/cmd_build.py
tools/gbs

index 21e3567338f8e86ab4bb403330ecb36714e1ea47..5ab3329385dfebd5360b676598136c3a255c5a01 100644 (file)
@@ -316,6 +316,8 @@ def main(args):
     if args.squash_patches_until:
         cmd += ['--squash-patches-until=%s' % args.squash_patches_until]
 
+    if args.define:
+        cmd += [('--define="%s"' % i) for i in args.define]
     if args.spec:
         cmd += [args.spec]
 
index eb9efcd4f57f478c920b9c398ab61d5c106bcdfa..1faeb63e74447d3066a59269ce130fbdaada73ef 100755 (executable)
--- a/tools/gbs
+++ b/tools/gbs
@@ -216,6 +216,8 @@ def build_parser(parser):
                         help='keep unused packages in build root. without '
                         'this option, unused packages will be removed from '
                         'build root')
+    parser.add_argument('--define', action="append",
+                        help='define macro X with value Y with format "X Y"')
 
     parser.set_defaults(alias="lb")
     return parser