diff options
author | Alan McGovern <alan.mcgovern@gmail.com> | 2012-06-27 02:28:24 +0400 |
---|---|---|
committer | Alan McGovern <alan.mcgovern@gmail.com> | 2012-06-27 02:29:34 +0400 |
commit | 7b7eceec9fd19663540be9fba8b90eae99585538 (patch) | |
tree | 4b862f98c513676a2582b413ec5b74942ae44f5f /main/xbuild.include | |
parent | aea26c16d94490c95f4e61329c137b82a4abfe77 (diff) |
[Build] Change the build system to use xbuild instead of makefiles (again)
The build 'regression' was a problem in some makefiles. It was fixed in
aea26c16d94490c95f4e61329c137b82a4abfe77
Diffstat (limited to 'main/xbuild.include')
-rw-r--r-- | main/xbuild.include | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/main/xbuild.include b/main/xbuild.include new file mode 100644 index 0000000000..a8699d9706 --- /dev/null +++ b/main/xbuild.include @@ -0,0 +1,66 @@ +XBUILD=xbuild +XBUILD_ARGS=/verbosity:quiet /nologo /property:CodePage=65001 +ALL_CSPROJ=$(wildcard *.csproj) +MAIN_SLN=$(top_builddir)/Main.sln + +if ENABLE_MACPLATFORM +PROFILE_NAME=DebugMac +endif +if ENABLE_GNOMEPLATFORM +PROFILE_NAME=Debug +endif + +if ENABLE_WINDOWSPLATFORM +PROFILE_NAME=DebugWin32 +endif + +PROFILE=/property:Configuration=$(PROFILE_NAME) + +# Figure out how far we are from top_builddir +DEPTH=$(shell echo "$(top_builddir)" | tr '/' '\n' | grep -c '..') + +all: csproj_build + +clean: csproj_clean + +csproj_build: + @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \ + echo Building $(ALL_CSPROJ); \ + for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p; done \ + fi + +csproj_clean: + @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \ + echo Cleaning $(ALL_CSPROJ); \ + for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p /t:Clean; done \ + fi + +sln_build: + @echo Building $(MAIN_SLN) + @$(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(PROFILE) + +sln_clean: + @echo Cleaning $(MAIN_SLN) + @$(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(PROFILE) /t:Clean + +print_extradist: + @echo $(WILDCARDED_FILES) + +EXTS:=*.bmp *.cs *.csproj *.html *.png *.snk *.config *.stetic *.glade *.xml *.xsd *.exe.addins *.template *.tt *.txt + +ALL_FILES:= $(EXTS) \ + $(addprefix */,$(EXTS)) \ + $(addprefix */*/,$(EXTS)) \ + $(addprefix */*/*/,$(EXTS)) \ + $(addprefix */*/*/*/,$(EXTS)) \ + $(addprefix */*/*/*/*/,$(EXTS)) \ + $(wildcard icons/*) \ + $(wildcard templates/*) + +WILDCARDED_FILES:=$(wildcard $(ALL_FILES)) + +EXTRA_DIST = \ + $(wildcard $(ALL_FILES)) + + +.PHONY: all clean csproj_build csproj_clean sln_build sln_clean |