A semi-automatic parser of Ancient Greek and Latin languages. https://lexis.glossa.info/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

45 lines
1.1 KiB

APP?=lexis
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
CONTAINER_RUNTIME ?= podman
CONTAINER_VERSION ?= $(shell date --iso-8601)
help: ## Display this help.
@awk 'BEGIN { \
FS = ":.*##"; \
printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n" \
} \
/^[a-zA-Z_-]+:.*?##/ { \
printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 \
} \
END { \
print \
}' \
$(MAKEFILE_LIST)
.PHONY: run
run: ## Run lexis
GOPATH=${ROOT_DIR}/vendor go run ${APP}.go $(filter-out $@, $(MAKECMDGOALS))
.PHONY: build
build: ## Build lexis binary
GOPATH=${ROOT_DIR}/vendor go build ${APP}.go
.PHONY: serve
serve: build ## Build and run lexis -serve
${APP} --serve
container: container-build ## Build container image
container-build:
$(CONTAINER_RUNTIME) build -t lexis/lexis:$(CONTAINER_VERSION) -f Containerfile .
container-run: ## Run lexis container
$(CONTAINER_RUNTIME) run lexis/lexis:$(CONTAINER_VERSION)
container-save: ## Save lexis container to a file
$(CONTAINER_RUNTIME) save lexis/lexis:$(CONTAINER_VERSION) -o lexis_$(CONTAINER_VERSION).tar
%:
@true