Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1 from cucumber/simplify-csharp-build
Browse files Browse the repository at this point in the history
Simplify C# build
  • Loading branch information
gasparnagy committed Mar 30, 2014
2 parents 2f6a6dc + 97a9c56 commit 501e77a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ You need .Net or Mono installed to generate the grammar.

### C# ###

#### Windows

TODO

#### OS X/Linux

Run `make` from the `csharp` directory.

### Ruby

Run `rake` from the `ruby` directory.
Expand Down
18 changes: 13 additions & 5 deletions csharp/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
all: Gherkin/bin/Debug/Gherkin.dll
CS_FILES = $(shell find . -type f \( -iname "*.cs" ! -iname "*.NETFramework*" \))

all: test
.PHONY: all

release: Gherkin/bin/Release/Gherkin.dll
Expand All @@ -7,18 +9,24 @@ release: Gherkin/bin/Release/Gherkin.dll
Gherkin/Parser.cs: ../gherkin.berp gherkin-csharp.razor ../bin/berp.exe
mono ../bin/berp.exe -g ../gherkin.berp -t gherkin-csharp.razor -o $@

Gherkin/bin/Debug/Gherkin.dll: Gherkin/Parser.cs
Gherkin/bin/Debug/Gherkin.dll: Gherkin/Parser.cs $(CS_FILES)
rm -f $@
xbuild

Gherkin/bin/Release/Gherkin.dll: Gherkin/Parser.cs
Gherkin/bin/Release/Gherkin.dll: Gherkin/Parser.cs $(CS_FILES)
rm -f $@
xbuild /p:Configuration=Release

test: all
./nunit.sh Gherkin.Specs/bin/Debug/Gherkin.Specs.dll
packages/NUnit.Runners.2.6.3/tools/nunit-console.exe:
mono --runtime=v4.0 .nuget/NuGet.exe install NUnit.Runners -Version 2.6.3 -o packages

test: Gherkin/bin/Debug/Gherkin.dll packages/NUnit.Runners.2.6.3/tools/nunit-console.exe
mono --runtime=v4.0 packages/NUnit.Runners.2.6.3/tools/nunit-console.exe -noxml -nodots -labels -stoponerror Gherkin.Specs/bin/Debug/Gherkin.Specs.dll
.PHONY: test

clean:
rm -rf */bin
rm -rf */obj
rm -rf */packages
rm -f Gherkin/Parser.cs
.PHONY: clean
20 changes: 0 additions & 20 deletions csharp/nunit.sh

This file was deleted.

0 comments on commit 501e77a

Please sign in to comment.