Bug #907

avatar

Migrate to xbuild?

Added by Andrés G. Aragoneses 4027 days ago. Updated 3206 days ago.

Status:New Start:11/24/2013
Priority:Normal Due date:
Assigned to:avatarMirco Bauer % Done:

0%

Category:Common
Target version:-
Complexity:

Found in Version:

Votes: 0

Description

XBuild is already used by Makefiles to build dependencies in lib/

Wouldn't it be nice to migrate the rest of smuxi to use xbuild too? (So there is no need to specify .cs files in Makefiles, etc.)

So I wondered if this migration could be done progressively, and I decided to do this change:

diff --git a/src/Frontend-GNOME/Makefile.am b/src/Frontend-GNOME/Makefile.am
index 75e6644..da3ccb5 100644
--- a/src/Frontend-GNOME/Makefile.am
+++ b/src/Frontend-GNOME/Makefile.am
@@ -275,7 +275,7 @@ $(build_resx_resources) : %.resources: %.resx

 $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
     mkdir -p $(dir $(ASSEMBLY))
-    $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
+    $(XBUILD) Frontend-GNOME.csproj

 %.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po-Frontend-GNOME/*.po)
     LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po-Frontend-GNOME/.intltool-merge-cache $(top_srcdir)/po-Frontend-GNOME $< $@

However, when trying to run "make" after this change, I get these errors (which I don't really understand):

/home/knocte/Documents/Code/smuxiCLEAN/src/Frontend-GNOME/Frontend-GNOME.csproj (default targets) ->
/usr/lib/mono/4.0/Microsoft.Common.targets (ResolveProjectReferences target) ->
/home/knocte/Documents/Code/smuxiCLEAN/src/Engine/Engine.csproj (default targets) ->
/usr/lib/mono/4.0/Microsoft.Common.targets (ResolveProjectReferences target) ->
/home/knocte/Documents/Code/smuxiCLEAN/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o-2010.csproj (default targets) ->
/usr/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) ->

    Db4objects.Db4o/Config/IConfiguration.cs(1,26): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
    Db4objects.Db4o/Config/IConfiguration.cs(1,26): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
    Db4objects.Db4o/Config/IObjectClass.cs(1,26): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
    Db4objects.Db4o/Config/IObjectField.cs(1,26): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
    Db4objects.Db4o/Ext/IExtObjectContainer.cs(1,26): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
    Db4objects.Db4o/Ext/IExtObjectContainer.cs(1,26): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
    Db4objects.Db4o/Ext/IExtObjectContainer.cs(1,26): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line

     60 Warning(s)
     7 Error(s)

Time Elapsed 00:00:02.3871930
make[2]: *** [../../bin/debug/smuxi-frontend-gnome.exe] Error 1
make[2]: Leaving directory `/home/knocte/Documents/Code/smuxiCLEAN/src/Frontend-GNOME'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/knocte/Documents/Code/smuxiCLEAN/src'
make: *** [all-recursive] Error 1

It turns out that these errors are the same ones I get when trying to build smuxi with MonoDevelop (I use MonoDevelop 4.x and Mono 3.2.1 packages from directhex's PPA).

History

Updated by Andrés G. Aragoneses 4027 days ago

avatar

The diff I posted got corrupted by f***ing redmine. I post it here instead: https://gist.github.com/knocte/7631301

Also available in: Atom PDF