forked from Samsung/TizenFX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[Build] Improve performance of GenDummy (Samsung#270)" (Samsu…
- Loading branch information
1 parent
ff4a9bb
commit a9524b6
Showing
25 changed files
with
1,804 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
@if not defined _echo @echo off | ||
setlocal | ||
|
||
if /I [%1] == [] goto Usage | ||
if /I [%1] == [build] goto ModuleBuild | ||
if /I [%1] == [full] goto FullBuild | ||
if /I [%1] == [dummy] goto DummyBuild | ||
if /I [%1] == [pack] goto Pack | ||
if /I [%1] == [clean] goto Clean | ||
|
||
goto :EOF | ||
|
||
:Usage | ||
echo Usage: %0 [command] [args] | ||
echo Commands: | ||
echo build [module] Build a specific module | ||
echo full Build all modules in src/ directory | ||
echo dummy Generate dummy assemblies of all modules | ||
echo pack [version] Make a NuGet package with build artifacts | ||
echo clean Clean all artifacts | ||
echo. | ||
goto :EOF | ||
|
||
:ModuleBuild | ||
if /I [%2] == [] ( | ||
echo No module specified. | ||
exit /b !ERRORLEVEL! | ||
) | ||
call dotnet msbuild %~dp0build\build.proj /nologo /t:restore /p:Project=%2 | ||
call dotnet msbuild %~dp0build\build.proj /nologo /t:build /p:Project=%2 | ||
goto :EOF | ||
|
||
:FullBuild | ||
call dotnet msbuild %~dp0build\build.proj /nologo /t:clean | ||
call dotnet msbuild %~dp0build\build.proj /nologo /t:restore | ||
call dotnet msbuild %~dp0build\build.proj /nologo /t:build | ||
goto :EOF | ||
|
||
:DummyBuild | ||
call dotnet msbuild %~dp0build\build.proj /nologo /t:dummy | ||
call dotnet msbuild %~dp0build\build.proj /nologo /t:afterdummy | ||
goto :EOF | ||
|
||
:Pack | ||
set VERSION=%2 | ||
call :GetUnixTime TIMESTAMP | ||
if /I [%VERSION%] == [] set VERSION=5.0.0-local-%TIMESTAMP% | ||
call dotnet msbuild %~dp0build\build.proj /nologo /t:pack /p:Version=%VERSION% | ||
goto :EOF | ||
|
||
:Clean | ||
call dotnet msbuild %~dp0build\build.proj /nologo /t:clean | ||
goto :EOF | ||
|
||
:GetUnixTime | ||
setlocal enableextensions | ||
for /f %%x in ('wmic path win32_utctime get /format:list ^| findstr "="') do ( | ||
set %%x) | ||
set /a z=(14-100%Month%%%100)/12, y=10000%Year%%%10000-z | ||
set /a ut=y*365+y/4-y/100+y/400+(153*(100%Month%%%100+12*z-3)+2)/5+Day-719469 | ||
set /a ut=ut*86400+100%Hour%%%100*3600+100%Minute%%%100*60+100%Second%%%100 | ||
endlocal & set "%1=%ut%" & goto :EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,15 @@ | ||
<Project> | ||
|
||
<UsingTask TaskName="GenDummyTask" AssemblyFile="$(MSBuildThisFileDirectory)tasks\GenDummy.Tasks.dll" /> | ||
|
||
<Target Name="CopyToArtifactsDirectory" | ||
Condition="'$(ArtifactsDirectory)' != ''" | ||
DependsOnTargets="GetCopyToOutputDirectoryItems"> | ||
<ItemGroup> | ||
<OutputFilesToCopy Include="$(OutDir)**" /> | ||
</ItemGroup> | ||
|
||
<Copy SourceFiles="@(OutputFilesToCopy)" | ||
DestinationFiles="$(ArtifactsDirectory)%(RecursiveDir)%(Filename)%(Extension)" /> | ||
</Target> | ||
|
||
<Target Name="CopyToDummyArtifactsDirectory" | ||
DependsOnTargets="GetCopyToOutputDirectoryItems"> | ||
<Copy SourceFiles="$(TargetPath)" | ||
DestinationFiles="$(OutputDummyDir)$(TargetFileName)" /> | ||
</Target> | ||
|
||
<Target Name="BeforeCompile" | ||
Condition="'$(IsDummyBuild)' == 'True'"> | ||
|
||
<GenDummyTask Sources="@(Compile)" OutputDirectory="$(IntermediateOutputPath)dummy\"> | ||
<Output TaskParameter="GeneratedFiles" ItemName="_DummyCompile" /> | ||
</GenDummyTask> | ||
<ItemGroup> | ||
<Compile Remove="@(Compile)" /> | ||
<Compile Include="@(_DummyCompile)" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.