Homebrew/homebrew — pull request #31457 by Ventero (2014-08-08 21:48:15+00:00)
Title: mono: Don't clean mono's runtime directories.

xbuild requires the various .exe files in the runtime directories to be executable, as it executes them directly from a running mono process through `Process.Start()`.

**Steps to reproduce:**
1. Install `mono` with homebrew
2. Download the two files [from this gist](https://gist.github.com/Ventero/e6568729f522b3a57a6a) (save them in the same directory as `test.cs` and `test.csproj`, respectively)
3. Run `xbuild test.csproj`

**Expected result:** `xbuild` compiles the `test.cs` file into an executable
**Actual result:** `/usr/local/Cellar/mono/3.4.0/lib/mono/4.5/Microsoft.CSharp.targets: error : Error executing tool '/usr/local/Cellar/mono/3.4.0/lib/mono/4.5/mcs.exe' [...] Native error= Cannot find the specified file`

This commit also adds a test that `xbuild` is working correctly to the formula.

One more thing (slightly unrelated): Instead of manually downloading `monolite` and moving it into the build tree, one could just run `make get-monolite-latest` - this would add a build dependency on wget though. Would this be an acceptable tradeoff, or is a some complexity in the formula preferred over adding new build dependencies?