Skip to content

Commit d99dc97

Browse files
authored
Add a target mostlyclean to Makefiles (cucumber#395)
* [Makefile] add a target mostlyclean * [Makefile] remove external dependencies only with clean * [Makefile] update CONTRIBUTING with mostlyclean
1 parent 4632a30 commit d99dc97

File tree

14 files changed

+54
-15
lines changed

14 files changed

+54
-15
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ good), but writing a few during development might help you progress.
131131
You'll spend quite a bit of time fiddling with the `.razor` template to make it
132132
generate code that is syntactically correct.
133133
134-
When you get to that stage, `make clean acceptance` will run the acceptance tests, which iterate
134+
When you get to that stage, `make mostlyclean acceptance` will run the acceptance tests, which iterate
135135
over all the `.feature` files under `../testdata`, passes them through your
136136
`bin/gherkin-generate-tokens` and `bin/gherkin-generate-ast` command-line programs,
137137
and compares the output using `diff`.

c/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@ clean-gherkin-languages: ## Remove gherkin-languages.json and any derived files
5656
$(MAKE) --directory=src
5757
touch $@
5858

59-
clean:
59+
mostlyclean:
6060
rm -rf .compared .built .run acceptance
61-
$(MAKE) --directory=src $@
61+
$(MAKE) --directory=src clean
62+
.PHONY: mostlyclean
63+
64+
clean: mostlyclean ## Remove all build artifacts and files generated by the acceptance tests
6265
.PHONY: clean
6366

6467
cli: ./include/rule_type.h src/parser.c src/dialect.c $(SRC_FILES) src/Makefile

cpp/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ clean-gherkin-languages: ## Remove gherkin-languages.json and any derived files
5353
echo "Nothing to do"
5454
.PHONY: clean-gherkin-languages
5555

56-
clean: clean-deps ## Remove all build artifacts and files generated by the acceptance tests
56+
mostlyclean:
5757
rm -rf .built .configured
5858
rm -rf acceptance
5959
rm -rf build
60+
.PHONY: mostlyclean
61+
62+
clean: clean-deps mostlyclean ## Remove all build artifacts and files generated by the acceptance tests
6063
.PHONY: clean
6164

6265
.DELETE_ON_ERROR:

dart/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ clean-gherkin-languages: ## Remove gherkin-languages.json and any derived files
2323
rm -f $(GHERKIN_LANGUAGES_JSON)
2424
.PHONY: clean-gherkin-languages
2525

26-
clean:
26+
mostlyclean:
2727
echo "Nothing to do"
28+
.PHONY: mostlyclean
29+
30+
clean: mostlyclean
2831
.PHONY: clean
2932

3033
acceptance:

dotnet/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ clean-gherkin-languages: ## Remove gherkin-languages.json and any derived files
3737
echo "Nothing to do"
3838
.PHONY: clean-gherkin-languages
3939

40-
clean: ## Remove all build artifacts and files generated by the acceptance tests
40+
mostlyclean:
4141
rm -f .built
4242
rm -rf acceptance
4343
rm -rf */bin
4444
rm -rf */obj
45+
.PHONY: mostlyclean
46+
47+
clean: mostlyclean ## Remove all build artifacts and files generated by the acceptance tests
4548
.PHONY: clean
4649

4750
.DELETE_ON_ERROR:

elixir/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ clean-gherkin-languages: ## Remove gherkin-languages.json and any derived files
2525
rm -f $(GHERKIN_LANGUAGES_JSON)
2626
.PHONY: clean-gherkin-languages
2727

28-
clean: ## Remove all build artifacts and files generated by the acceptance tests
28+
mostlyclean:
2929
rm -rf acceptance
3030
rm -rf _build
31+
.PHONY: mostlyclean
32+
33+
clean: mostlyclean ## Remove all build artifacts and files generated by the acceptance tests
3134
rm -rf deps
3235
.PHONY: clean
3336

go/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ clean-gherkin-languages: ## Remove gherkin-languages.json and any derived files
3737
rm -f $(GHERKIN_LANGUAGES_JSON)
3838
.PHONY: clean-gherkin-languages
3939

40-
clean: ## Remove all build artifacts and files generated by the acceptance tests
40+
mostlyclean:
4141
rm -rf .built
4242
rm -rf acceptance
4343
rm -rf bin
44+
.PHONY: mostlyclean
45+
46+
clean: mostlyclean ## Remove all build artifacts and files generated by the acceptance tests
4447
.PHONY: clean
4548

4649
.DELETE_ON_ERROR:

java/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ clean-gherkin-languages: ## Remove gherkin-languages.json and any derived files
3737
echo "Nothing to do"
3838
.PHONY: clean-gherkin-languages
3939

40-
clean: ## Remove all build artifacts and files generated by the acceptance tests
40+
mostlyclean:
4141
rm -rf .built
4242
rm -rf acceptance
4343
rm -rf target
44+
.PHONY: mostlyclean
45+
46+
clean: mostlyclean ## Remove all build artifacts and files generated by the acceptance tests
4447
.PHONY: clean
4548

4649
.DELETE_ON_ERROR:

javascript/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ clean-gherkin-languages: ## Remove gherkin-languages.json and any derived files
3535
rm -f $(GHERKIN_LANGUAGES_JSON)
3636
.PHONY: clean-gherkin-languages
3737

38-
clean: ## Remove all build artifacts and files generated by the acceptance tests
38+
mostlyclean:
3939
rm -rf .built
4040
rm -rf acceptance
4141
rm -rf dist
42+
.PHONY: mostlyclean
43+
44+
clean: mostlyclean ## Remove all build artifacts and files generated by the acceptance tests
4245
rm -rf node_modules
4346
.PHONY: clean
4447

objective-c/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ acceptance/testdata/%.feature.errors.ndjson: ../testdata/%.feature ../testdata/%
4747
bin/gherkin $< | jq --sort-keys --compact-output "." > $@
4848
diff --unified <(jq "." $<.errors.ndjson) <(jq "." $@)
4949

50-
clean:
50+
mostlyclean:
5151
rm -rf .compared .built acceptance
5252
rm -rf build/
5353
rm -rf *~
54+
.PHONY: mostlyclean
55+
56+
clean: mostlyclean
5457
.PHONY: clean
5558

5659
clobber: clean

0 commit comments

Comments
 (0)