From d878c0b77d49d853a56d6273e9148d05d5f0e2d9 Mon Sep 17 00:00:00 2001 From: raj_mathe Date: Sat, 6 Nov 2021 11:02:53 +0100 Subject: [PATCH] master > master: code - Makefiles --- code/golang/Makefile | 6 +++--- code/python/Makefile | 17 ++++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/code/golang/Makefile b/code/golang/Makefile index fc51e8c..58e1154 100644 --- a/code/golang/Makefile +++ b/code/golang/Makefile @@ -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 diff --git a/code/python/Makefile b/code/python/Makefile index 4a63cd3..38f02da 100644 --- a/code/python/Makefile +++ b/code/python/Makefile @@ -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