Current section

Files

Jump to
Raw

Makefile

SHELL := /usr/bin/env bash
GHERKIN_LANGUAGES_JSON = priv/gherkin_languages.json
GHERKIN_PARSER = lib/gherkin/parser.ex
GHERKIN_RAZOR = gherkin-elixir.razor
SOURCE_FILES = $(shell find . -name "*.ex" | grep -v $(GHERKIN_PARSER))
.DEFAULT_GOAL = help
help: ## Show this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make <target>\n\nWhere <target> is one of:\n"} /^[$$()% a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
.PHONY: help
generate: $(GHERKIN_PARSER) ## Generate gherkin parser files
.PHONY: generate
clean-generate: ## Remove generated Gherkin parser files ## Generate gherkin parser files
rm -f $(GHERKIN_PARSER)
.PHONY: clean-generate
copy-gherkin-languages: $(GHERKIN_LANGUAGES_JSON) ## Copy gherkin-languages.json and/or generate derived files
.PHONY: copy-gherkin-languages
clean-gherkin-languages: ## Remove gherkin-languages.json and any derived files
rm -f $(GHERKIN_LANGUAGES_JSON)
.PHONY: clean-gherkin-languages
mostlyclean:
rm -rf acceptance
rm -rf _build
.PHONY: mostlyclean
clean: mostlyclean ## Remove all build artifacts and files generated by the acceptance tests
rm -rf deps
.PHONY: clean
.DELETE_ON_ERROR:
acceptance: ## Build acceptance test dir and compare results with reference
mix local.hex --force
mix deps.get
mix test
touch $@
$(GHERKIN_PARSER): $(GHERKIN_RAZOR) ../gherkin.berp
berp -g ../gherkin.berp -t $< -o $@ --noBOM
$(GHERKIN_LANGUAGES_JSON):
cp ../gherkin-languages.json $@