You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/06/07 17:47:11 UTC

svn commit: r1490692 - in /subversion/trunk: ./ build/generator/ build/generator/templates/ subversion/libsvn_subr/ subversion/libsvn_subr/utf8proc/

Author: brane
Date: Fri Jun  7 15:47:10 2013
New Revision: 1490692

URL: http://svn.apache.org/r1490692
Log:
Tell the Visual Studio project file generator to not compile C files that
appear in the project's dependency list but are not in the source list.
This fixes the issue with embedding utf8proc sources in libsvn_subr.

* build/generator/gen_win.py (WinGeneratorBase.get_proj_sources):
   Mark header dependencies for exclusion from the build.
  (ProjectItem): Set files to not excluded by default.

* build/generator/templates/vcnet_vcproj.ezt,
  build/generator/templates/vcnet_vcxproj.ezt: Tweak the .vc(x)proj templates
  to treat excluded sources differently, and to treat *.hpp as header files.

* build.conf (private-includes): Remove the .inline suffix from
   utf8proc/utf8proc.c and utf8proc/utf8proc_data.c.
* subversion/libsvn_subr/utf8proc.c:
   Update directive to include utf8proc/utf8proc.c.
* subversion/libsvn_subr/utf8proc/utf8proc.c: Rename from utf8proc.c.inline.
   Update directive to include utf8proc_data.c.
* subversion/libsvn_subr/utf8proc/utf8proc_data.c:
   Rename from utf8proc_data.c.inline.

Added:
    subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.c
      - copied, changed from r1490684, subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.c.inline
    subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc_data.c
      - copied unchanged from r1488135, subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc_data.c.inline
Removed:
    subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.c.inline
    subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc_data.c.inline
Modified:
    subversion/trunk/build.conf
    subversion/trunk/build/generator/gen_win.py
    subversion/trunk/build/generator/templates/vcnet_vcproj.ezt
    subversion/trunk/build/generator/templates/vcnet_vcxproj.ezt
    subversion/trunk/subversion/libsvn_subr/utf8proc.c

Modified: subversion/trunk/build.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1490692&r1=1490691&r2=1490692&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Fri Jun  7 15:47:10 2013
@@ -41,8 +41,8 @@ private-includes =
         subversion/bindings/cxxhl/include/*.hpp
         subversion/bindings/cxxhl/include/svncxxhl/*.hpp
         subversion/libsvn_subr/utf8proc/utf8proc.h
-        subversion/libsvn_subr/utf8proc/utf8proc.c.inline
-        subversion/libsvn_subr/utf8proc/utf8proc_data.c.inline
+        subversion/libsvn_subr/utf8proc/utf8proc.c
+        subversion/libsvn_subr/utf8proc/utf8proc_data.c
 private-built-includes =
         subversion/svn_private_config.h
         subversion/libsvn_fs_fs/rep-cache-db.h

Modified: subversion/trunk/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win.py?rev=1490692&r1=1490691&r2=1490692&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win.py (original)
+++ subversion/trunk/build/generator/gen_win.py Fri Jun  7 15:47:10 2013
@@ -514,6 +514,7 @@ class WinGeneratorBase(GeneratorBase):
         cbuild = None
         ctarget = None
         cdesc = None
+        cignore = None
         if isinstance(target, gen_base.TargetJavaHeaders):
           classes = self.path(target.classes)
           if self.junit_path is not None:
@@ -548,9 +549,17 @@ class WinGeneratorBase(GeneratorBase):
         if quote_path and '-' in rsrc:
           rsrc = '"%s"' % rsrc
 
+        if (not isinstance(source, gen_base.SourceFile)
+            and cbuild is None and ctarget is None and cdesc is None):
+          # Make sure include dependencies are excluded from the build.
+          # This is an 'orrible 'ack that relies on the source being a
+          # string if it's an include dependency, or a SourceFile object
+          # otherwise.
+          cignore = 'yes'
+
         sources.append(ProjectItem(path=rsrc, reldir=reldir, user_deps=[],
                                    custom_build=cbuild, custom_target=ctarget,
-                                   custom_desc=cdesc,
+                                   custom_desc=cdesc, ignored = cignore,
                                    extension=os.path.splitext(rsrc)[1]))
 
     if isinstance(target, gen_base.TargetJavaClasses) and target.jar:
@@ -1641,6 +1650,7 @@ class WinGeneratorBase(GeneratorBase):
 class ProjectItem:
   "A generic item class for holding sources info, config info, etc for a project"
   def __init__(self, **kw):
+    self.ignored = None
     vars(self).update(kw)
 
 # ============================================================================

Modified: subversion/trunk/build/generator/templates/vcnet_vcproj.ezt
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/templates/vcnet_vcproj.ezt?rev=1490692&r1=1490691&r2=1490692&view=diff
==============================================================================
--- subversion/trunk/build/generator/templates/vcnet_vcproj.ezt (original)
+++ subversion/trunk/build/generator/templates/vcnet_vcproj.ezt Fri Jun  7 15:47:10 2013
@@ -121,9 +121,15 @@
 		<Filter
 			Name="Source Files"
 			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-[for sources][is sources.extension ".h"][else]		<File
+[for sources][is sources.extension ".h"][else][is sources.extension ".hpp"][else]		<File
 			RelativePath="[sources.path]">
-[if-any sources.custom_build][for platforms][for configs]
+[if-any sources.ignored][for platforms][for configs]			<FileConfiguration
+				Name="[configs.name]|[platforms]"
+				ExcludedFromBuild="TRUE">
+				<Tool
+					Name="VCCustomBuildTool"/>
+			</FileConfiguration>
+[end][end][else][if-any sources.custom_build][for platforms][for configs]
 			<FileConfiguration
 				Name="[configs.name]|[platforms]">
 				<Tool
@@ -142,9 +148,9 @@
 					ObjectFile="$(IntDir)/[sources.reldir]/"
 					ProgramDataBaseFileName="$(IntDir)/[sources.reldir]/[target.proj_name]-[sources.reldir].pdb"/>
 			</FileConfiguration>
-[end][end][end]
+[end][end][end][end]
 		</File>
-[end][end]
+[end][end][end]
 [is target_type "2"]		<File RelativePath="..\empty.c"/>[end]
         </Filter>
 		<Filter
@@ -153,7 +159,10 @@
 [for sources][is sources.extension ".h"]
 		<File
 			RelativePath="[sources.path]" />
-[end][end]
+[else][is sources.extension ".hpp"]
+		<File
+			RelativePath="[sources.path]" />
+[end][end][end]
         </Filter>
 	</Files>
 	<Globals>

Modified: subversion/trunk/build/generator/templates/vcnet_vcxproj.ezt
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/templates/vcnet_vcxproj.ezt?rev=1490692&r1=1490691&r2=1490692&view=diff
==============================================================================
--- subversion/trunk/build/generator/templates/vcnet_vcxproj.ezt (original)
+++ subversion/trunk/build/generator/templates/vcnet_vcxproj.ezt Fri Jun  7 15:47:10 2013
@@ -94,20 +94,21 @@
 [end][end]    </ResourceCompile>
   </ItemGroup>
 [end]  <ItemGroup>
-[for sources][is sources.extension ".h"][else][if-any sources.custom_build]    <CustomBuild Include="[sources.path]">
+[for sources][is sources.extension ".h"][else][is sources.extension ".hpp"][else][if-any sources.custom_build]    <CustomBuild Include="[sources.path]">
       <FileType>Document</FileType>
 [for configs][for platforms]      <Command Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'">[sources.custom_build]</Command>
       <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'">[for sources.user_deps][sources.user_deps];[end]%(AdditionalInputs)</AdditionalInputs>
       <Outputs Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'">[sources.custom_target];%(Outputs)</Outputs>
 [if-any sources.custom_desc]<Message Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'">[sources.custom_desc]</Message>
 [end][end][end]    </CustomBuild>
-[else][is sources.extension ".c"]    <ClCompile Include="[sources.path]" />
-[else][is sources.extension ".cpp"]    <ClCompile Include="[sources.path]" />
+[else][is sources.extension ".c"][if-any sources.ignored]    <None Include="[sources.path]" />[else]    <ClCompile Include="[sources.path]" />[end]
+[else][is sources.extension ".cpp"][if-any sources.ignored]    <None Include="[sources.path]" />[else]    <ClCompile Include="[sources.path]" />[end]
 [else]    <None Include="[sources.path]" />
-[end][end][end][end][end]  </ItemGroup>
+[end][end][end][end][end][end]  </ItemGroup>
   <ItemGroup>
 [for sources][is sources.extension ".h"]    <ClInclude Include="[sources.path]" />
-[end][end]  </ItemGroup>
+[else][is sources.extension ".hpp"]    <ClInclude Include="[sources.path]" />
+[end][end][end]  </ItemGroup>
   <ItemGroup>
 [for depends]    <ProjectReference Include="[depends.path]">
       <Project>[depends.guid]</Project>

Modified: subversion/trunk/subversion/libsvn_subr/utf8proc.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf8proc.c?rev=1490692&r1=1490691&r2=1490692&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf8proc.c (original)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc.c Fri Jun  7 15:47:10 2013
@@ -24,7 +24,7 @@
 
 
 #define UTF8PROC_INLINE
-#include "utf8proc/utf8proc.c.inline"
+#include "utf8proc/utf8proc.c"
 
 #include <apr_fnmatch.h>
 

Copied: subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.c (from r1490684, subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.c.inline)
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.c?p2=subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.c&p1=subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.c.inline&r1=1490684&r2=1490692&rev=1490692&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.c.inline (original)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.c Fri Jun  7 15:47:10 2013
@@ -40,7 +40,7 @@
 
 
 #include "utf8proc.h"
-#include "utf8proc_data.c.inline"
+#include "utf8proc_data.c"
 
 
 UTF8PROC_DATA



Re: svn commit: r1490692 - in /subversion/trunk: ./ build/generator/ build/generator/templates/ subversion/libsvn_subr/ subversion/libsvn_subr/utf8proc/

Posted by Branko Čibej <br...@wandisco.com>.
On 07.06.2013 16:47, brane@apache.org wrote:
> Author: brane
> Date: Fri Jun  7 15:47:10 2013
> New Revision: 1490692
>
> URL: http://svn.apache.org/r1490692
> Log:
> Tell the Visual Studio project file generator to not compile C files that
> appear in the project's dependency list but are not in the source list.
> This fixes the issue with embedding utf8proc sources in libsvn_subr.

I could only visually inspect the output of the Windows build generator
... so I won't be surprised if this breaks a buildbot or two.

I didn't touch the MSVC6 project generator; I propose to remove it
completely instead. It's time, IMO.

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com