Optimize code and rename files 90/285390/1
authorj-h.choi <j-h.choi@samsung.com>
Mon, 12 Dec 2022 05:13:35 +0000 (14:13 +0900)
committerj-h.choi <j-h.choi@samsung.com>
Mon, 12 Dec 2022 05:13:35 +0000 (14:13 +0900)
Change-Id: I2d3818568dc931a6b6b1a01dc364b114c025e2ed

packaging/dotnet-build-tools.spec
targets/Tizen.Pre.AOT.Reference.targets [deleted file]
targets/Tizen.Pre.AOT.targets [deleted file]
targets/Tizen.Pre.Compiled.Reference.targets [new file with mode: 0644]
targets/Tizen.Pre.Compiled.targets [new file with mode: 0644]

index 111388dbf2672c0e76f6477c0a27cd093def9c73..189d840358bf4a12350853d44b9c2b610c263088 100644 (file)
@@ -93,9 +93,9 @@ ln -s %{TOOLS_PATH}/dotnet-wrapper.sh %{buildroot}%{_bindir}/dotnet
 ln -s %{TOOLS_PATH}/dotnet-validate-struct.sh %{buildroot}%{_bindir}/dotnet-validate-struct
 ln -s %{SDK_PATH}/crossgen2/crossgen2 %{buildroot}%{_bindir}/crossgen2
 
-# Tizen.Pre.AOT.BuildTasks
-install -p -m 644 ./targets/Tizen.Pre.AOT.targets %{buildroot}%{SDK_PATH}/sdk/*/Current/Microsoft.Common.targets/ImportAfter
-install -p -m 644 ./targets/Tizen.Pre.AOT.Reference.targets %{buildroot}%{SDK_PATH}/sdk/*/Current/Microsoft.Common.targets/ImportAfter
+# Tizen.Pre.Compiled.BuildTasks
+install -p -m 644 ./targets/Tizen.Pre.Compiled.targets %{buildroot}%{SDK_PATH}/sdk/*/Current/Microsoft.Common.targets/ImportAfter
+install -p -m 644 ./targets/Tizen.Pre.Compiled.Reference.targets %{buildroot}%{SDK_PATH}/sdk/*/Current/Microsoft.Common.targets/ImportAfter
 
 %files
 %config(noreplace) %{_sysconfdir}/rpm/macros.dotnet-build-tools
diff --git a/targets/Tizen.Pre.AOT.Reference.targets b/targets/Tizen.Pre.AOT.Reference.targets
deleted file mode 100644 (file)
index 5a036c1..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Target Name="PreAOTReference"
-          AfterTargets="coreGenerateSatelliteAssemblies">
-
-    <PropertyGroup>
-      <AppReferencePath>@(ReferencePath)</AppReferencePath>
-    </PropertyGroup>
-
-    <ItemGroup>
-      <Split Include="$(AppReferencePath.Split(';'))" />
-    </ItemGroup>
-
-    <Exec Command="mkdir -p $(IntermediateOutputPath)crossgen2/ref" />
-    <Exec Command="cp -rf %(Split.Identity) $(IntermediateOutputPath)crossgen2/ref/%(Filename)%(Extension)" Condition="'%(Split.Identity)' != ''" />
-  </Target>
-</Project>
diff --git a/targets/Tizen.Pre.AOT.targets b/targets/Tizen.Pre.AOT.targets
deleted file mode 100644 (file)
index 0ae5395..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Target Name="PreAOT"
-          AfterTargets="_TizenPrepareTpkPackage"
-          BeforeTargets="TizenPrepareCertificate">
-
-    <PropertyGroup>
-      <TpkRootPath>$(OutputPath)tpkroot/</TpkRootPath>
-      <BinPath>$(TpkRootPath)bin/</BinPath>
-      <LibPath>$(TpkRootPath)lib/</LibPath>
-      <BinNativeImagePath>$(BinPath).native_image/</BinNativeImagePath>
-      <LibNativeImagePath>$(LibPath).native_image/</LibNativeImagePath>
-    </PropertyGroup>
-
-    <Exec Command ="find $(BinPath) -maxdepth 1 -name '*.dll'" ConsoleToMSBuild="true" >
-      <Output TaskParameter="ConsoleOutput" PropertyName="FindDllOfBin" />
-    </Exec>
-    <Exec Command ="find $(LibPath) -maxdepth 1 -name '*.dll'" ConsoleToMSBuild="true" >
-      <Output TaskParameter="ConsoleOutput" PropertyName="FindDllOfLib" />
-    </Exec>
-    <Exec Command ="find $(BinPath) -maxdepth 1 -name '*.pdb'" ConsoleToMSBuild="true" >
-      <Output TaskParameter="ConsoleOutput" PropertyName="FindPdbOfBin" />
-    </Exec>
-    <Exec Command ="find $(LibPath) -maxdepth 1 -name '*.pdb'" ConsoleToMSBuild="true" >
-      <Output TaskParameter="ConsoleOutput" PropertyName="FindPdbOfLib" />
-    </Exec>
-
-    <ItemGroup>
-      <DllListOfBin Include="$(FindDllOfBin)" />
-    </ItemGroup>
-    <ItemGroup>
-      <DllListOfLib Include="$(FindDllOfLib)" />
-    </ItemGroup>
-    <ItemGroup>
-      <PdbListOfBin Include="$(FindPdbOfBin)" />
-    </ItemGroup>
-    <ItemGroup>
-      <PdbListOfLib Include="$(FindPdbOfLib)" />
-    </ItemGroup>
-
-    <Exec Command="mkdir $(BinNativeImagePath)" Condition="@(DllListOfBin->Count()) != 0 OR @(PdbListOfBin->Count()) != 0" />
-    <Exec Command="mkdir $(LibNativeImagePath)" Condition="@(DllListOfLib->Count()) != 0 OR @(PdbListOfLib->Count()) != 0" />
-
-    <Exec Command="crossgen2 --jitpath /usr/share/dotnet-build-tools/sdk/crossgen2/libclrjit_unix_$(TizenGBSBuildArch)_x64.so --targetarch $(TizenGBSBuildArch) -o $(BinNativeImagePath)%(DllListOfBin.Filename).ni%(DllListOfBin.Extension) --resilient --Ot -r:/usr/share/dotnet-build-tools/sdk/crossgen2/ref/*.dll -r:$(IntermediateOutputPath)crossgen2/ref/*.dll %(DllListOfBin.Identity)" EnvironmentVariables="DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" Condition="'$(TizenGBSBuildArch)' != '' and '%(DllListOfBin.Identity)' != ''" />
-    <Exec Command="crossgen2 --jitpath /usr/share/dotnet-build-tools/sdk/crossgen2/libclrjit_unix_$(TizenGBSBuildArch)_x64.so --targetarch $(TizenGBSBuildArch) -o $(LibNativeImagePath)%(DllListOfLib.Filename).ni%(DllListOfLib.Extension) --resilient --Ot -r:/usr/share/dotnet-build-tools/sdk/crossgen2/ref/*.dll -r:$(IntermediateOutputPath)crossgen2/ref/*.dll %(DllListOfLib.Identity)" EnvironmentVariables="DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" Condition="'$(TizenGBSBuildArch)' != '' and '%(DllListOfLib.Identity)' != ''" />
-
-    <Exec Command="cp %(PdbListOfBin.Identity) $(BinNativeImagePath)" Condition="'%(PdbListOfBin.Identity)' != ''" />
-    <Exec Command="cp %(PdbListOfLib.Identity) $(LibNativeImagePath)" Condition="'%(PdbListOfLib.Identity)' != ''" />
-
-    <Exec Command="touch $(BinPath)._TIZEN_DOTNET_PRE_COMPILED_PACKAGE" />
-  </Target>
-</Project>
diff --git a/targets/Tizen.Pre.Compiled.Reference.targets b/targets/Tizen.Pre.Compiled.Reference.targets
new file mode 100644 (file)
index 0000000..822db36
--- /dev/null
@@ -0,0 +1,17 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Target Name="PreCompiledReference"
+          AfterTargets="coreGenerateSatelliteAssemblies"
+          Condition="'$(TizenGBSBuildArch)' !=''">
+
+    <PropertyGroup>
+      <AppReferencePath>@(ReferencePath)</AppReferencePath>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <Split Include="$(AppReferencePath.Split(';'))" />
+    </ItemGroup>
+
+    <Exec Command="mkdir -p $(IntermediateOutputPath)crossgen2/ref" />
+    <Exec Command="cp -rf %(Split.Identity) $(IntermediateOutputPath)crossgen2/ref/%(Filename)%(Extension)" Condition="'%(Split.Identity)' != ''" />
+  </Target>
+</Project>
diff --git a/targets/Tizen.Pre.Compiled.targets b/targets/Tizen.Pre.Compiled.targets
new file mode 100644 (file)
index 0000000..cfb8240
--- /dev/null
@@ -0,0 +1,39 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Target Name="PreCompiled"
+          AfterTargets="_TizenPrepareTpkPackage"
+          BeforeTargets="TizenPrepareCertificate"
+          Condition="'$(TizenGBSBuildArch)' !=''">
+
+    <PropertyGroup>
+      <TpkRootPath>$(OutputPath)tpkroot/</TpkRootPath>
+      <BinPath>$(TpkRootPath)bin/</BinPath>
+      <LibPath>$(TpkRootPath)lib/</LibPath>
+      <BinNativeImagePath>$(BinPath).native_image/</BinNativeImagePath>
+      <LibNativeImagePath>$(LibPath).native_image/</LibNativeImagePath>
+    </PropertyGroup>
+
+    <Exec Command ="find $(BinPath) -maxdepth 1 -name '*.dll'" ConsoleToMSBuild="true" >
+      <Output TaskParameter="ConsoleOutput" ItemName="DllListOfBin" />
+    </Exec>
+    <Exec Command ="find $(LibPath) -maxdepth 1 -name '*.dll'" ConsoleToMSBuild="true" >
+      <Output TaskParameter="ConsoleOutput" ItemName="DllListOfLib" />
+    </Exec>
+    <Exec Command ="find $(BinPath) -maxdepth 1 -name '*.pdb'" ConsoleToMSBuild="true" >
+      <Output TaskParameter="ConsoleOutput" ItemName="PdbListOfBin" />
+    </Exec>
+    <Exec Command ="find $(LibPath) -maxdepth 1 -name '*.pdb'" ConsoleToMSBuild="true" >
+      <Output TaskParameter="ConsoleOutput" ItemName="PdbListOfLib" />
+    </Exec>
+
+    <Exec Command="mkdir $(BinNativeImagePath)" Condition="@(DllListOfBin->Count()) != 0 OR @(PdbListOfBin->Count()) != 0" />
+    <Exec Command="mkdir $(LibNativeImagePath)" Condition="@(DllListOfLib->Count()) != 0 OR @(PdbListOfLib->Count()) != 0" />
+
+    <Exec Command="crossgen2 --jitpath /usr/share/dotnet-build-tools/sdk/crossgen2/libclrjit_unix_$(TizenGBSBuildArch)_x64.so --targetarch $(TizenGBSBuildArch) -o $(BinNativeImagePath)%(DllListOfBin.Filename).ni%(DllListOfBin.Extension) --resilient --Ot -r:/usr/share/dotnet-build-tools/sdk/crossgen2/ref/*.dll -r:$(IntermediateOutputPath)crossgen2/ref/*.dll %(DllListOfBin.Identity)" EnvironmentVariables="DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" Condition="'$(TizenGBSBuildArch)' != '' and '%(DllListOfBin.Identity)' != ''" />
+    <Exec Command="crossgen2 --jitpath /usr/share/dotnet-build-tools/sdk/crossgen2/libclrjit_unix_$(TizenGBSBuildArch)_x64.so --targetarch $(TizenGBSBuildArch) -o $(LibNativeImagePath)%(DllListOfLib.Filename).ni%(DllListOfLib.Extension) --resilient --Ot -r:/usr/share/dotnet-build-tools/sdk/crossgen2/ref/*.dll -r:$(IntermediateOutputPath)crossgen2/ref/*.dll %(DllListOfLib.Identity)" EnvironmentVariables="DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" Condition="'$(TizenGBSBuildArch)' != '' and '%(DllListOfLib.Identity)' != ''" />
+
+    <Exec Command="cp %(PdbListOfBin.Identity) $(BinNativeImagePath)" Condition="'%(PdbListOfBin.Identity)' != ''" />
+    <Exec Command="cp %(PdbListOfLib.Identity) $(LibNativeImagePath)" Condition="'%(PdbListOfLib.Identity)' != ''" />
+
+    <Exec Command="touch $(BinPath)._TIZEN_DOTNET_PRE_COMPILED_PACKAGE" />
+  </Target>
+</Project>