* 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
+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.
install-local: install-extras
+WEBAPP_DIR = Microsoft/VisualStudio/v9.0/WebApplications
EXTRAS_DIR = $(mono_libdir)/mono/2.0
install-extras:
$(MKINSTALLDIRS) $(DESTDIR)$(EXTRAS_DIR)
$(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 \
-<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>
<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)"/>
<PropertyGroup>
<BuildDependsOn>
+ _ValidateEssentialProperties;
BeforeBuild;
CoreBuild;
AfterBuild
CopyFilesMarkedCopyLocal;
BuildResources;
Compile;
+ PrepareForRun;
DeployOutputFiles;
_RecordCleanFile;
PostBuildEvent
<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>
--- /dev/null
+<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>