[jhbuild] make: Allow specifying make flags



commit f786b9f4eb250de25861f69f9276102f1e2dd3db
Author: Colin Walters <walters verbum org>
Date:   Thu Nov 17 17:18:36 2011 -0500

    make: Allow specifying make flags
    
    Usage:  jhbuild make CFLAGS='-g -O0'
    
    https://bugzilla.gnome.org/show_bug.cgi?id=664304

 jhbuild/commands/make.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/commands/make.py b/jhbuild/commands/make.py
index 49e128b..f417ff2 100644
--- a/jhbuild/commands/make.py
+++ b/jhbuild/commands/make.py
@@ -19,6 +19,7 @@
 
 import logging
 import os
+import pipes
 import sys
 import time
 from optparse import make_option
@@ -60,6 +61,15 @@ class cmd_make(Command):
         config._internal_noautogen = not options.autogen
         config.set_from_cmdline_options(options)
 
+        makeargs = config.makeargs
+        for arg in args:
+            # pipes.quote (and really, trying to safely quote shell arguments) is
+            # broken, but executing commands as strings is pervasive throughout
+            # jhbuild...this is a hack that will probably live until someone just
+            # replaces jhbuild entirely.
+            makeargs = '%s %s' % (makeargs, pipes.quote(arg))
+        config.makeargs = makeargs
+
         module_set = jhbuild.moduleset.load(config)
 
         if not cwd.startswith(config.checkoutroot):



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