[PATCH rdma-core 1/2] cbuild: extend CLI to pass --with[out] options to rpmbuild

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As optional feature (static, pyverbs) have appeared, add a CLI option
to enable/disable them through cbuild

Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@xxxxxxxx>
---
 buildlib/cbuild | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/buildlib/cbuild b/buildlib/cbuild
index 1cc54f313ca1..71a3fc9b3573 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -548,6 +548,11 @@ os.symlink({tarfn!r},os.path.join(b"SOURCES",tarfn));
 
             extra_opts = getattr(env,"rpmbuild_options", [])
             bopts = ["-bb",tspec_file] + extra_opts;
+            for arg in args.with_flags:
+                bopts.extend(["--with", arg]);
+            for arg in args.without_flags:
+                bopts.extend(["--without", arg]);
+
 
             print >> F,'os.execlp("rpmbuild","rpmbuild",%s)'%(
                 ",".join(repr(I) for I in bopts));
@@ -717,6 +722,10 @@ def args_pkg(parser):
                         help="Instead of running the build, enter a shell");
     parser.add_argument("--use-prebuilt-pandoc",default=False,action="store_true",
                         help="Do not rebuild the pandoc cache in build-travis/pandoc-prebuilt/");
+    parser.add_argument("--with", default=[],action="append", dest="with_flags",
+                        help="Enable specified feature in RPM builds");
+    parser.add_argument("--without", default=[],action="append", dest="without_flags",
+                        help="Disable specified feature in RPM builds");
 def cmd_pkg(args):
     """Build a package in the given environment."""
     for env in args.ENV:
-- 
2.18.0





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux