Skip to content
Browse files

[xbuild] Add a Microsoft.Portable.CSharp.targets file

  • Loading branch information...
1 parent cf4f567 commit 80ed5ee5b57020aa94fcdedfc08cd7bbc12f26e4 @jstedfast jstedfast committed Apr 17, 2012
Showing with 39 additions and 0 deletions.
  1. +4 −0 mcs/tools/xbuild/Makefile
  2. +35 −0 mcs/tools/xbuild/xbuild/Microsoft.Portable.CSharp.targets
View
4 mcs/tools/xbuild/Makefile
@@ -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
View
35 mcs/tools/xbuild/xbuild/Microsoft.Portable.CSharp.targets
@@ -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>

0 comments on commit 80ed5ee

Please sign in to comment.
Something went wrong with that request. Please try again.