[xbuild] Add a Microsoft.Portable.CSharp.targets file
authorJeffrey Stedfast <jeff@xamarin.com>
Tue, 17 Apr 2012 20:45:17 +0000 (16:45 -0400)
committerJeffrey Stedfast <jeff@xamarin.com>
Tue, 17 Apr 2012 20:45:17 +0000 (16:45 -0400)
mcs/tools/xbuild/Makefile
mcs/tools/xbuild/xbuild/Microsoft.Portable.CSharp.targets [new file with mode: 0644]

index d06b6b25447b2076b47a32869362dfb092fb4d0a..1aff818f22ac98050d78b0229f3de348c5cd5197 100644 (file)
@@ -36,6 +36,7 @@ install-local:        install-extras
 
 WEBAPP_DIR = Microsoft/VisualStudio/v9.0/WebApplications
 SILVERLIGHT_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Silverlight
+PORTABLE_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Portable
 EXTRAS_DIR = $(mono_libdir)/mono/$(INSTALL_FRAMEWORK_VERSION)
 install-extras: 
        $(MKINSTALLDIRS) $(DESTDIR)$(EXTRAS_DIR) $(DESTDIR)$(REDISTLIST_DIR) $(DESTDIR)$(XBUILD_FRAMEWORKS_DIR)/v3.0/RedistList $(DESTDIR)$(XBUILD_FRAMEWORKS_DIR)/v4.0/RedistList
@@ -62,6 +63,8 @@ install-extras:
        $(INSTALL_DATA) xbuild/Microsoft.Silverlight.VisualBasic.targets $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0
        sed -e 's/@SILVERLIGHT_VERSION@/2.0/g' xbuild/Microsoft.Silverlight.Common.targets > $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0/Microsoft.Silverlight.Common.targets
        sed -e 's/@SILVERLIGHT_VERSION@/3.0/g' xbuild/Microsoft.Silverlight.Common.targets > $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0/Microsoft.Silverlight.Common.targets
+       $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_DIR)/v4.0
+       $(INSTALL_DATA) xbuild/Microsoft.Portable.CSharp.targets $(DESTDIR)$(PORTABLE_DIR)/v4.0
 
 EXTRA_DISTFILES = \
        xbuild/xbuild.rsp \
@@ -87,4 +90,5 @@ EXTRA_DISTFILES = \
        xbuild/Microsoft.Silverlight.Common.targets \
        xbuild/Microsoft.Silverlight.CSharp.targets \
        xbuild/Microsoft.Silverlight.VisualBasic.targets \
+       xbuild/Microsoft.Portable.CSharp.targets \
        xbuild_targets.make
diff --git a/mcs/tools/xbuild/xbuild/Microsoft.Portable.CSharp.targets b/mcs/tools/xbuild/xbuild/Microsoft.Portable.CSharp.targets
new file mode 100644 (file)
index 0000000..91e546f
--- /dev/null
@@ -0,0 +1,35 @@
+<!-- Note: This is a dummy CSharp.targets file that tries to map Portable Library Project targets to something available in Mono on Mac -->
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+       
+       <PropertyGroup>
+               <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
+               <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+               <TargetFrameworkProfile></TargetFrameworkProfile>
+       </PropertyGroup>
+       
+       <PropertyGroup Condition = "Exists ('/Developer/MonoTouch/License.rtf')">
+               <TargetFrameworkIdentifier>MonoTouch</TargetFrameworkIdentifier>
+               <TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
+               <TargetFrameworkProfile></TargetFrameworkProfile>
+       </PropertyGroup>
+       
+       <PropertyGroup Condition = "Exists ('/Developer/MonoAndroid/License.rtf') And !Exists ('/Developer/MonoTouch/License.rtf')">
+               <TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
+       </PropertyGroup>
+       
+       <Import Project="$(MSBuildToolsPath)\Novell\Novell.MonoDroid.CSharp.targets" Condition = "Exists ('/Developer/MonoAndroid/License.rtf') And !Exists ('/Developer/MonoTouch/License.rtf')"/>
+       <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.Targets" Condition = "Exists ('/Developer/MonoTouch/License.rtf') Or !Exists ('/Developer/MonoAndroid/License.rtf')"/>
+       
+       <PropertyGroup>
+               <BuildDependsOn>
+                       PortableCompatWarning;
+                       $(BuildDependsOn);
+               </BuildDependsOn>
+       </PropertyGroup>
+       
+       <Target Name="PortableCompatWarning">
+               <Warning Text="This Portable Library Project has been built against the $(TargetFrameworkIdentifier) framework."/>
+       </Target>
+       
+</Project>