subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1567046 - in /subversion/trunk: build/generator/gen_win.py build/generator/gen_win_dependencies.py gen-make.py
Date Tue, 11 Feb 2014 11:10:39 GMT
Author: rhuijben
Date: Tue Feb 11 11:10:39 2014
New Revision: 1567046

URL: http://svn.apache.org/r1567046
Log:
In the Windows build: make it much easier to apply a define through
all projects when building via project systems such as Visual Studio
by adding an optional -D option to gen-make.py.

* build/generator/gen_win.py
  (get_win_defines): Add cpp_defines when set.
  
* build/generator/gen_win_dependencies.py
  Initialize cpp_defines. Parse -D options. 
  
* gen-make.py
  Allow and document -D option.

Modified:
    subversion/trunk/build/generator/gen_win.py
    subversion/trunk/build/generator/gen_win_dependencies.py
    subversion/trunk/gen-make.py

Modified: subversion/trunk/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win.py?rev=1567046&r1=1567045&r2=1567046&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win.py (original)
+++ subversion/trunk/build/generator/gen_win.py Tue Feb 11 11:10:39 2014
@@ -750,6 +750,9 @@ class WinGeneratorBase(gen_win_dependenc
       if target.name == 'mod_dav_svn':
         fakedefines.extend(["AP_DECLARE_EXPORT"])
 
+    if self.cpp_defines:
+      fakedefines.extend(self.cpp_defines)
+
     if isinstance(target, gen_base.TargetSWIG):
       fakedefines.append("SWIG_GLOBAL")
 
@@ -768,7 +771,6 @@ class WinGeneratorBase(gen_win_dependenc
     if self.enable_nls:
       fakedefines.append("ENABLE_NLS")
 
-    # check we have sasl
     if target.name.endswith('svn_subr'):
       fakedefines.append("SVN_USE_WIN32_CRASHHANDLER")
 

Modified: subversion/trunk/build/generator/gen_win_dependencies.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win_dependencies.py?rev=1567046&r1=1567045&r2=1567046&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win_dependencies.py (original)
+++ subversion/trunk/build/generator/gen_win_dependencies.py Tue Feb 11 11:10:39 2014
@@ -164,6 +164,7 @@ class GenDependenciesBase(gen_base.Gener
     self.instrument_purify_quantify = None
     self.configure_apr_util = None
     self.sasl_path = None
+    self.cpp_defines = []
 
     # NLS options
     self.enable_nls = None
@@ -218,6 +219,8 @@ class GenDependenciesBase(gen_base.Gener
         self.static_apr = 1
       elif opt == '--with-static-openssl':
         self.static_openssl = 1
+      elif opt == '-D':
+        self.cpp_defines.append(val)
       elif opt == '--vsnet-version':
         if val == '2002' or re.match('7(\.\d+)?$', val):
           self.vs_version = '2002'

Modified: subversion/trunk/gen-make.py
URL: http://svn.apache.org/viewvc/subversion/trunk/gen-make.py?rev=1567046&r1=1567045&r2=1567046&view=diff
==============================================================================
--- subversion/trunk/gen-make.py (original)
+++ subversion/trunk/gen-make.py Tue Feb 11 11:10:39 2014
@@ -210,6 +210,10 @@ def _usage_exit(err=None):
   print("           2010, 2012 or 2013)")
   print("           [only valid in combination with '-t vcproj']")
   print("")
+  print(" -D NAME[=value]")
+  print("           define NAME macro during compilation")
+  print("           [only valid in combination with '-t vcproj']")
+  print("")
   print("  --with-apr_memcache=DIR")
   print("           the apr_memcache sources are in DIR")
   print("  --disable-gmock")
@@ -232,7 +236,7 @@ class Options:
 
 if __name__ == '__main__':
   try:
-    opts, args = my_getopt(sys.argv[1:], 'st:',
+    opts, args = my_getopt(sys.argv[1:], 'st:D:',
                            ['debug',
                             'release',
                             'reload',



Mime
View raw message