Update of /cvsroot/monetdb/MonetDB/src/common
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19384

Modified Files:
      Tag: MonetDB_1-20
        monet_options.py.in 
Log Message:
On Windows, not only substitute ${prefix} and ${exec_prefix}, but also
%prefix% and %exec_prefix%.


Index: monet_options.py.in
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/common/monet_options.py.in,v
retrieving revision 1.32
retrieving revision 1.32.2.1
diff -u -d -r1.32 -r1.32.2.1
--- monet_options.py.in 18 Aug 2007 22:48:09 -0000      1.32
+++ monet_options.py.in 5 Oct 2007 14:59:48 -0000       1.32.2.1
@@ -63,12 +63,17 @@
             changed = False
             for var in 'prefix', 'exec_prefix':
                 dvar = '${%s}' % var
-                if string.find(val, dvar) < 0:
-                    # variable does not occur, skip further processing
-                    continue
-                # replace variable with its value (recursive call)
-                val = string.replace(val, dvar, self.get(var))
-                changed = True
+                if string.find(val, dvar) >= 0:
+                    # replace variable with its value (recursive call)
+                    val = string.replace(val, dvar, self.get(var))
+                    changed = True
+                if os.name == 'nt':
+                    # on Windows, also replace %prefix% and %exec_prefix%
+                    dvar = '%%%s%%' % var
+                    if string.find(val, dvar) >= 0:
+                        # replace variable with its value (recursive call)
+                        val = string.replace(val, dvar, self.get(var))
+                        changed = True
         return val
 
 class SystemOptions(BuiltinOptions):


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to