Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 23b2c1a

Browse files
committed
gherkin: Allow mono to fail. Idempotent BOM removal.
1 parent 14bb163 commit 23b2c1a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,23 @@ libs_so: ./include/rule_type.h src/parser.c src/dialect.c $(SRC_FILES) src/Makef
6161
touch $@
6262

6363
./include/rule_type.h: gherkin.berp gherkin-c-rule-type.razor
64-
mono berp/berp.exe -g gherkin.berp -t gherkin-c-rule-type.razor -o $@
64+
# Some build environments (Travis) mess up timestamps
65+
# so that all files have the same timestamp, causing make to think this
66+
# file needs to be rebuilt when it's actually uptodate. Our travis build doesn't
67+
# have mono, so we'll allow this line to fail.
68+
-mono berp/berp.exe -g gherkin.berp -t gherkin-c-rule-type.razor -o $@
6569
# Remove BOM
66-
tail -c +4 $@ > $@.nobom
70+
sed '1s/^\xEF\xBB\xBF//' < $@ > $@.nobom
6771
mv $@.nobom $@
6872

6973
src/parser.c: gherkin.berp gherkin-c-parser.razor
70-
mono berp/berp.exe -g gherkin.berp -t gherkin-c-parser.razor -o $@
74+
# Some build environments (Travis) mess up timestamps
75+
# so that all files have the same timestamp, causing make to think this
76+
# file needs to be rebuilt when it's actually uptodate. Our travis build doesn't
77+
# have mono, so we'll allow this line to fail.
78+
-mono berp/berp.exe -g gherkin.berp -t gherkin-c-parser.razor -o $@
7179
# Remove BOM
72-
tail -c +4 $@ > $@.nobom
80+
sed '1s/^\xEF\xBB\xBF//' < $@ > $@.nobom
7381
mv $@.nobom $@
7482

7583
src/dialect.c: gherkin-languages.json dialect.c.jq

0 commit comments

Comments
 (0)