[jhbuild] make addpath prepend to some environment variables



commit a01a787c9d7a24fd62dc4be0ce6b9b4c2520b0be
Author: Richard Hult <richard imendio com>
Date:   Fri Apr 24 10:51:38 2009 +0200

    make addpath prepend to some environment variables
    
    Add a special case for some environment variables (LDFLAGS, CFLAGS,
    and CXXFLAGS) so addpath() prepends the new path, instead of appending
    it.  (GNOME #556622)
---
 jhbuild/config.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/jhbuild/config.py b/jhbuild/config.py
index 45f5e9a..d720119 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -73,6 +73,12 @@ def addpath(envvar, path):
             else:
                 i += 1
         envval = ' '.join(parts)
+    elif envvar in [ 'LDFLAGS', 'CFLAGS', 'CXXFLAGS' ]:
+        envval = os.environ.get(envvar)
+        if envval:
+            envval = path + ' ' + envval
+        else:
+            envval = path
     else:
         envval = os.environ.get(envvar, path)
         parts = envval.split(':')



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