master > master: code - Makefiles

This commit is contained in:
RD 2021-11-06 11:02:53 +01:00
parent a7f3377677
commit d878c0b77d
2 changed files with 13 additions and 10 deletions

View File

@ -3,7 +3,7 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PATH_TO_ARTEFACT:=../../dist/ads
PATH_TO_CONFIG:=../config.yml
COLOUR:=false
COLOUR:=true# <- auf false stellen, falls es Probleme gibt
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# TARGETS
@ -13,9 +13,9 @@ setup:
build:
go build -o ${PATH_TO_ARTEFACT} main.go
run: # non-interactive mode mit config-datei
${PATH_TO_ARTEFACT} run --debug --colour COLOUR --config "${PATH_TO_CONFIG}"
${PATH_TO_ARTEFACT} run --debug --colour ${COLOUR} --config "${PATH_TO_CONFIG}"
run-it: # interactive mode
${PATH_TO_ARTEFACT} run --it --debug --colour COLOUR
${PATH_TO_ARTEFACT} run --it --debug --colour ${COLOUR}
# Do everything:
all: setup build run
all-it: setup build run-it

View File

@ -2,22 +2,25 @@
# LOCAL ARGUMENTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PATH_TO_CONFIG:=../config.yml
COLOUR:=false
COLOUR:=true# <- auf false stellen, falls es Probleme gibt
ifeq ($(OS),Windows_NT)
PYTHON:="py -3"
PYTHON:=py -3
PIP:=py -3 -m pip
else
PYTHON:="python3"
PYTHON:=python3
PIP:=python3 -m pip
endif
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# TARGETS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setup:
${PYTHON} -m pip install -r requirements;
setup: # TODO: Variant mit venv
${PIP} install -r requirements;
run: # non-interactive mode mit config-datei
${PYTHON} src/main.py run --debug --colour COLOUR --config "${PATH_TO_CONFIG}"
${PYTHON} src/main.py run --debug --colour ${COLOUR} --config "${PATH_TO_CONFIG}"
run-it: # interactive mode
${PYTHON} src/main.py run --it --debug --colour COLOUR
${PYTHON} src/main.py run --it --debug --colour ${COLOUR}
# Do everything:
all: setup run
all-it: setup run-it