[tasque/xbuild] [xbuild] Create target "Bootstrap" in build.csproj



commit bc6772c131615ecd77ff1c252e324a0fc17b4b6c
Author: Antonius Riha <antoniusriha gmail com>
Date:   Tue Sep 18 16:26:05 2012 +0200

    [xbuild] Create target "Bootstrap" in build.csproj
    
    The Bootstrap target is invoked during ./configure and takes care of
    placing all the build files in the right places. Additionally it copies the
    build tasks' source files, since those are compiled first in the sln build.
    All "Proj" items are part of that bootstrap.
    
    configure.ac: AC_CONFIG_FILES only needs to "process" (meaning copy)
    build.csproj and the base Makefile from now on. The rest is done by
    build.csproj's "Bootstrap" target
    
    tasque.sln: build.csproj needs to build first, hence move it to the top
    of the sln file

 build/build.csproj |   67 ++++++++++++++++++++++++++++++++++------------------
 configure.ac       |   32 +++---------------------
 tasque.sln         |    4 +-
 3 files changed, 50 insertions(+), 53 deletions(-)
---
diff --git a/build/build.csproj b/build/build.csproj
index 822035a..a38b38e 100644
--- a/build/build.csproj
+++ b/build/build.csproj
@@ -38,41 +38,62 @@
     <Compile Include="GetSrcDirStrip.cs" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="build.csproj" />
-    <None Include="..\src\Gtk.Tasque\Gtk.Tasque.csproj">
+    <Proj Include="..\src\Gtk.Tasque\Gtk.Tasque.csproj">
       <Link>Gtk.Tasque.csproj</Link>
-    </None>
-    <None Include="..\src\libtasque\libtasque.csproj">
+    </Proj>
+    <Proj Include="..\src\libtasque\libtasque.csproj">
       <Link>libtasque.csproj</Link>
-    </None>
-    <None Include="..\src\MonoMac.Tasque\MonoMac.Tasque.csproj">
-      <Link>MonoMac.Tasque.csproj</Link>
-    </None>
-    <None Include="..\src\tasque\tasque.csproj">
+    </Proj>
+    <Proj Include="..\src\tasque\tasque.csproj">
       <Link>tasque.csproj</Link>
-    </None>
-    <None Include="..\src\Libraries\RtmNet\RtmNet.csproj">
+    </Proj>
+    <Proj Include="..\src\Libraries\RtmNet\RtmNet.csproj">
       <Link>RtmNet.csproj</Link>
-    </None>
-    <None Include="..\src\Addins\Backends\Dummy\DummyBackend.csproj">
+    </Proj>
+    <Proj Include="..\src\Addins\Backends\Dummy\DummyBackend.csproj">
       <Link>Addins\Backends\DummyBackend.csproj</Link>
-    </None>
-    <None Include="..\src\Addins\Backends\Rtm\RtmBackend.csproj">
+    </Proj>
+    <Proj Include="..\src\Addins\Backends\Rtm\RtmBackend.csproj">
       <Link>Addins\Backends\RtmBackend.csproj</Link>
-    </None>
-    <None Include="..\src\Addins\Backends\Sqlite\SqliteBackend.csproj">
+    </Proj>
+    <Proj Include="..\src\Addins\Backends\Sqlite\SqliteBackend.csproj">
       <Link>Addins\Backends\SqliteBackend.csproj</Link>
-    </None>
-    <None Include="..\po\po.mdproj">
+    </Proj>
+    <Proj Include="..\po\po.mdproj">
       <Link>po.mdproj</Link>
-    </None>
-    <None Include="..\data\data.mdproj">
+    </Proj>
+    <Proj Include="..\data\data.mdproj">
       <Link>data.mdproj</Link>
+    </Proj>
+    <Proj Include="Tasque.targets" />
+    <Proj Include="Tasque.CSharp.targets" />
+    <Proj Include="..\src\Addins\Backends\IceCore\IceCoreBackend.csproj">
+      <Link>Addins\Backends\IceCoreBackend.csproj</Link>
+    </Proj>
+    <Proj Include="..\src\Addins\Backends\Hiveminder\HiveminderBackend.csproj">
+      <Link>Addins\Backends\HiveminderBackend.csproj</Link>
+    </Proj>
+    <Proj Include="..\tests\tests.csproj">
+      <Link>tests.csproj</Link>
+    </Proj>
+    <Proj Include="..\tasque.sln">
+      <Link>tasque.sln</Link>
+    </Proj>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="build.csproj" />
+    <None Include="..\src\MonoMac.Tasque\MonoMac.Tasque.csproj">
+      <Link>MonoMac.Tasque.csproj</Link>
     </None>
-    <None Include="Tasque.targets" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Addins\" />
     <Folder Include="Addins\Backends\" />
   </ItemGroup>
-</Project>
\ No newline at end of file
+  <Target Name="Bootstrap">
+    <Error Condition=" '$(TopSrcDir)' == '' " Text="TopSrcDir cannot be empty." />
+    <Error Condition=" '$(TopBuildDir)' == '' " Text="TopBuildDir cannot be empty." />
+    <Copy SourceFiles="$(TopSrcDir)\..\build\%(Proj.Identity)" DestinationFiles="$(TopBuildDir)\..\build\%(Identity)" SkipUnchangedFiles="true" />
+    <Copy SourceFiles="$(TopSrcDir)\..\build\%(Compile.Identity)" DestinationFiles="$(TopBuildDir)\..\build\%(Identity)" SkipUnchangedFiles="true" />
+  </Target>
+</Project>
diff --git a/configure.ac b/configure.ac
index d2570d8..59cbca7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -336,38 +336,14 @@ AC_SUBST(SQLITEBACKENDCSPROJ)
 
 AC_CONFIG_FILES([
 Makefile
-build/Tasque.targets:build/Tasque.targets
-src/Makefile
-src/Libraries/RtmNet/Makefile
-src/Libraries/RtmNet/${RTMNETCSPROJ}:src/Libraries/RtmNet/RtmNet.csproj
-src/libtasque/Makefile
-src/libtasque/${LIBTASQUECSPROJ}:src/libtasque/libtasque.csproj
-src/Gtk.Tasque/Makefile
-src/Gtk.Tasque/${GTKTASQUECSPROJ}:src/Gtk.Tasque/Gtk.Tasque.csproj
-src/tasque/Makefile
-src/tasque/${TASQUECSPROJ}:src/tasque/tasque.csproj
-src/tasque/tasque.pc
-src/Addins/Backends/Makefile
-src/Addins/Backends/Dummy/Makefile
-src/Addins/Backends/Dummy/${DUMMYBACKENDCSPROJ}:src/Addins/Backends/Dummy/DummyBackend.csproj
-src/Addins/Backends/Eds/Makefile
-src/Addins/Backends/Eds/${EDSBACKENDCSPROJ}:src/Addins/Backends/Eds/EdsBackend.csproj
-src/Addins/Backends/Hiveminder/Makefile
-src/Addins/Backends/Hiveminder/${HIVEMINDERBACKENDCSPROJ}:src/Addins/Backends/Hiveminder/HiveminderBackend.csproj
-src/Addins/Backends/IceCore/Makefile
-src/Addins/Backends/IceCore/${ICECOREBACKENDCSPROJ}:src/Addins/Backends/IceCore/IceCoreBackend.csproj
-src/Addins/Backends/Rtm/Makefile
-src/Addins/Backends/Rtm/${RTMBACKENDCSPROJ}:src/Addins/Backends/Rtm/RtmBackend.csproj
-src/Addins/Backends/Sqlite/Makefile
-src/Addins/Backends/Sqlite/${SQLITEBACKENDCSPROJ}:src/Addins/Backends/Sqlite/SqliteBackend.csproj
-data/Makefile
-data/${DATAMDPROJ}:data/data.mdproj
-po/Makefile
-po/${POMDPROJ}:po/po.mdproj
+build/build.csproj:build/build.csproj
 ])
 
 AC_OUTPUT
 
+$XBUILD /target:bootstrap /property:TopSrcDir=$srcdir /property:TopBuildDir=. build/build.csproj
+
+
 echo "
 Configuration:
 
diff --git a/tasque.sln b/tasque.sln
index 5b3de05..2541941 100644
--- a/tasque.sln
+++ b/tasque.sln
@@ -1,6 +1,8 @@
 ï
 Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "build", "build\build.csproj", "{BCC1964F-A6E3-4912-B120-6DA22C0EB294}"
+EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gtk.Tasque", "src\Gtk.Tasque\Gtk.Tasque.csproj", "{B19B9840-669D-4984-9772-E1F55193A67F}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RtmNet", "src\Libraries\RtmNet\RtmNet.csproj", "{0AA1B96E-03DE-4D26-B4FD-507E988FD9B7}"
@@ -29,8 +31,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tasque", "src\tasque\tasque
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoMac.Tasque", "src\MonoMac.Tasque\MonoMac.Tasque.csproj", "{67188C62-9332-4402-8702-E8BC1CCA8D2F}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "build", "build\build.csproj", "{BCC1964F-A6E3-4912-B120-6DA22C0EB294}"
-EndProject
 Project("{9344bdbb-3e7f-41fc-a0dd-8665d75ee146}") = "po", "po\po.mdproj", "{51E65E50-71EE-4736-A47C-DA2ECF7F6793}"
 EndProject
 Project("{9344bdbb-3e7f-41fc-a0dd-8665d75ee146}") = "data", "data\data.mdproj", "{6F2F4BAA-3C60-464D-B757-9DD18FED0BAA}"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]