diff options
author | Alan McGovern <alan.mcgovern@gmail.com> | 2012-04-02 14:45:14 +0400 |
---|---|---|
committer | Alan McGovern <alan.mcgovern@gmail.com> | 2012-04-02 18:16:00 +0400 |
commit | 6535b911aa4b81c8fab4b22a6822fa9778f723cf (patch) | |
tree | a4bd3752b898fe54b551c3c26cef29601208c7fa /main/xbuild.include | |
parent | f2ea3136862aa4712e6a4c56e71281aa7cba186f (diff) |
[Build] Change the build system to use xbuild instead of makefiles
The actual compilation process now happens with xbuild. The root makefile
just issues an "xbuild Main.sln" call. If you type 'make' in a subdirectory
you will issue an 'xbuild foo.csproj' for that dir and every subdir. This is
slightly slower than building Main.sln directly if many subdirs are being built.
'make dist' is now implemented with a call to 'git archive' which means our tarball
really does contain everything we need to build monodevelop (yay!).
Makefile integration is now disabled (it's unnecessary).
We now put test assemblies in build/test too to avoid polluting build/bin and build/Addins
Diffstat (limited to 'main/xbuild.include')
-rw-r--r-- | main/xbuild.include | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/main/xbuild.include b/main/xbuild.include new file mode 100644 index 0000000000..47b92543c5 --- /dev/null +++ b/main/xbuild.include @@ -0,0 +1,54 @@ +XBUILD=xbuild +XBUILD_ARGS=/verbosity:quiet /nologo +ALL_CSPROJ=$(wildcard *.csproj) +MAIN_SLN=$(top_builddir)/Main.sln + +if ENABLE_MACPLATFORM +PROFILE_NAME=DebugMac +else +PROFILE_NAME=Debug +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:i + @echo Cleaning $(MAIN_SLN) + @$(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(PROFILE) /t:Clean + +EXTRA_DIST = \ + $(wildcard *.cs) \ + $(wildcard *.csproj) \ + $(wildcard */*.cs) \ + $(wildcard */*.csproj) \ + $(wildcard */*/*.cs) \ + $(wildcard */*/*.csproj) \ + $(wildcard */*/*/*.cs) \ + $(wildcard */*/*/*.csproj) \ + $(wildcard */*/*/*/*.cs) \ + $(wildcard */*/*/*/*.csproj) + + +.PHONY: csproj_build csproj_clean sln_build sln_clean |