diff options
author | Ankit Jain <radical@corewars.org> | 2009-09-24 19:09:45 +0400 |
---|---|---|
committer | Ankit Jain <radical@corewars.org> | 2009-09-24 19:09:45 +0400 |
commit | 3d6f3137bca6045c3fda2f48787cc9c9f5ee5d7b (patch) | |
tree | 91be20f1fb117b1cb197887f409a5d8e36471c03 /mcs/tools | |
parent | 87bcf6da5b1a29274fac99fd7866bc98ba9634a0 (diff) |
* Makefile: Create dir for WebApplication.targets .
* Microsoft.Common.targets (_ValidateEssentialProperties): New.
(BuildDependsOn): Add _ValidateEssentialProperties, temporary.
This should actually work via InitialTargets, which will be fixed
in a subsequent commit. Add PrepareForRun.
(PrepareForRun): New.
* xbuild/Microsoft.WebApplication.targets: New.
svn path=/trunk/mcs/; revision=142580
Diffstat (limited to 'mcs/tools')
-rw-r--r-- | mcs/tools/xbuild/ChangeLog | 10 | ||||
-rw-r--r-- | mcs/tools/xbuild/Makefile | 3 | ||||
-rw-r--r-- | mcs/tools/xbuild/xbuild/Microsoft.Common.targets | 19 | ||||
-rw-r--r-- | mcs/tools/xbuild/xbuild/Microsoft.WebApplication.targets | 31 |
4 files changed, 62 insertions, 1 deletions
diff --git a/mcs/tools/xbuild/ChangeLog b/mcs/tools/xbuild/ChangeLog index a6e3afaa93e..1b0818d9b98 100644 --- a/mcs/tools/xbuild/ChangeLog +++ b/mcs/tools/xbuild/ChangeLog @@ -1,3 +1,13 @@ +2009-09-24 Ankit Jain <jankit@novell.com> + + * Makefile: Create dir for WebApplication.targets . + * Microsoft.Common.targets (_ValidateEssentialProperties): New. + (BuildDependsOn): Add _ValidateEssentialProperties, temporary. + This should actually work via InitialTargets, which will be fixed + in a subsequent commit. Add PrepareForRun. + (PrepareForRun): New. + * xbuild/Microsoft.WebApplication.targets: New. + 2009-09-23 Ankit Jain <jankit@novell.com> * xbuild/Microsoft.Common.targets: Add 'Rebuild' target. diff --git a/mcs/tools/xbuild/Makefile b/mcs/tools/xbuild/Makefile index ddf6942017c..bfbb8d7a8da 100644 --- a/mcs/tools/xbuild/Makefile +++ b/mcs/tools/xbuild/Makefile @@ -9,6 +9,7 @@ include ../../build/executable.make install-local: install-extras +WEBAPP_DIR = Microsoft/VisualStudio/v9.0/WebApplications EXTRAS_DIR = $(mono_libdir)/mono/2.0 install-extras: $(MKINSTALLDIRS) $(DESTDIR)$(EXTRAS_DIR) @@ -22,6 +23,8 @@ install-extras: $(INSTALL_DATA) xbuild/MSBuild/Microsoft.Build.CommonTypes.xsd $(DESTDIR)$(EXTRAS_DIR)/MSBuild $(INSTALL_DATA) xbuild/MSBuild/Microsoft.Build.Core.xsd $(DESTDIR)$(EXTRAS_DIR)/MSBuild $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild + $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR) + $(INSTALL_DATA) xbuild/Microsoft.WebApplication.targets $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR) EXTRA_DISTFILES = \ xbuild/xbuild.rsp \ diff --git a/mcs/tools/xbuild/xbuild/Microsoft.Common.targets b/mcs/tools/xbuild/xbuild/Microsoft.Common.targets index e4489c21838..d22c9b48296 100644 --- a/mcs/tools/xbuild/xbuild/Microsoft.Common.targets +++ b/mcs/tools/xbuild/xbuild/Microsoft.Common.targets @@ -1,4 +1,4 @@ -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" InitialTargets="_ValidateEssentialProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TargetExt Condition="'$(OutputType)' == 'Winexe'">.exe</TargetExt> @@ -50,6 +50,14 @@ <TargetPath>@(_OutDirItem->'%(FullPath)\$(AssemblyName)$(TargetExt)')</TargetPath> </PropertyGroup> + <Target Name="_ValidateEssentialProperties"> + <!-- If OutDir is specified via the command line, then the earlier check + to add a trailing slash won't have any affect, so error here. --> + <Error + Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')" + Text="OutDir property must end with a slash."/> + </Target> + <Target Name="PrepareForBuild"> <Message Importance="High" Text="Configuration: $(Configuration) Platform: $(Platform)"/> @@ -183,6 +191,7 @@ <PropertyGroup> <BuildDependsOn> + _ValidateEssentialProperties; BeforeBuild; CoreBuild; AfterBuild @@ -202,6 +211,7 @@ CopyFilesMarkedCopyLocal; BuildResources; Compile; + PrepareForRun; DeployOutputFiles; _RecordCleanFile; PostBuildEvent @@ -233,6 +243,13 @@ <Target Name="Compile" DependsOnTargets="$(CompileDependsOn)"/> + <PropertyGroup> + <PrepareForRunDependsOn> + DeployOutputFiles + </PrepareForRunDependsOn> + </PropertyGroup> + <Target Name="PrepareForRun" DependsOnTargets="$(PrepareForRunDependsOn)"/> + <Target Name="BuildResources" DependsOnTargets="AssignTargetPaths;SplitResourcesByCulture;CreateManifestResourceNames;CopyNonResxEmbeddedResources;GenerateResources;GenerateSatelliteAssemblies"> </Target> diff --git a/mcs/tools/xbuild/xbuild/Microsoft.WebApplication.targets b/mcs/tools/xbuild/xbuild/Microsoft.WebApplication.targets new file mode 100644 index 00000000000..0f619042502 --- /dev/null +++ b/mcs/tools/xbuild/xbuild/Microsoft.WebApplication.targets @@ -0,0 +1,31 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <WebApplicationOutputDir Condition="'$(OutDir)' != '$(OutputPath)'">$(OutDir)_PublishedWebsites\$(MSBuildProjectName)</WebApplicationOutputDir> + + <PrepareForRunDependsOn> + $(PrepareForRunDependsOn); + _CopyWebApplication + </PrepareForRunDependsOn> + </PropertyGroup> + + <!-- OutDir has been overridden, so copy all the relevant files to that --> + <Target Name="_CopyWebApplication" Condition="'$(OutDir)' != '$(OutputPath)'"> + <MakeDir Directories="$(WebApplicationOutputDir)\bin"/> + <Copy SourceFiles="@(IntermediateAssembly)" DestinationFolder="$(WebApplicationOutputDir)\bin" SkipUnchangedFiles="true"/> + <Copy + SourceFiles="$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb" + Condition="Exists('$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb')" + DestinationFolder="$(WebApplicationOutputDir)\bin" + SkipUnchangedFiles="true" /> + + <Copy + SourceFiles = "@(IntermediateSatelliteAssemblies)" + DestinationFiles = "@(IntermediateSatelliteAssemblies->'$(WebApplicationOutputDir)\bin\%(Culture)\$(AssemblyName).resources.dll')" + Condition = "'@(IntermediateSatelliteAssemblies)' != ''" + SkipUnchangedFiles="true" /> + + <!-- Copy the referenced assemblies --> + <Copy SourceFiles="@(ReferenceCopyLocalPaths)" DestinationFolder="$(WebApplicationOutputDir)\bin" SkipUnchangedFiles="true" /> + <Copy SourceFiles="@(Content)" DestinationFolder="$(WebApplicationOutputDir)\%(Content.RelativeDir)" /> + </Target> +</Project> |