[glib] Visual Studio builds: Fix .pc generation



commit bbf07fb15e90abe2d31609d388e89b852962b028
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jun 20 10:50:39 2016 +0800

    Visual Studio builds: Fix .pc generation
    
    The previous update did not account for when no exec_prefix is spcified,
    so update that, and use ${prefix} by default.  Clean up a bit as well.

 build/win32/pc_base.py |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/build/win32/pc_base.py b/build/win32/pc_base.py
index 3ae8c49..587ba83 100644
--- a/build/win32/pc_base.py
+++ b/build/win32/pc_base.py
@@ -50,9 +50,13 @@ class BasePCItems:
         if not os.path.exists(args.prefix):
             raise SystemExit('Specified prefix \'%s\' is invalid' % args.prefix)
 
+        # use absolute paths for prefix
+        self.prefix = os.path.abspath(args.prefix).replace('\\','/')
+
         # check and setup the exec_prefix
         if getattr(args, 'exec_prefix', None) is None:
-            input_exec_prefix = args.prefix
+            exec_prefix_use_shorthand = True
+            self.exec_prefix = '${prefix}'
         else:
             if args.exec_prefix.startswith('${prefix}'):
                 exec_prefix_use_shorthand = True
@@ -112,13 +116,6 @@ class BasePCItems:
             else:
                 self.libdir = os.path.abspath(input_libdir).replace('\\','/')
 
-        # use absolute paths for prefix and exec_prefix
-        self.prefix = os.path.abspath(args.prefix).replace('\\','/')
-        if exec_prefix_use_shorthand is True:
-            self.exec_prefix = args.exec_prefix.replace('\\','/')
-        else:
-            self.exec_prefix = os.path.abspath(input_exec_prefix).replace('\\','/')
-
         # setup dictionary for replacing items in *.pc.in
         self.base_replace_items.update({'@VERSION@': self.version})
         self.base_replace_items.update({'@prefix@': self.prefix})


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