From: Guus Sliepen Date: Sun, 17 Mar 2019 19:57:43 +0000 (+0100) Subject: Check for astyle version 3 before formatting the code. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=cb9223d3b895f1edb35bf7a6fd3aa9305de3f1db;p=utcp Check for astyle version 3 before formatting the code. Unfortunately, code formatters change their behaviour between versions. The code currently requires astyle version 3.x, so check this before running astyle. If the wrong version is installed, print an error. --- diff --git a/Makefile b/Makefile index faa2f66..6cb1bc9 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ clean: rm -f *.o $(BIN) astyle: + @astyle --version | grep -q "Version 3" || (echo 'ERROR: astyle version 3 required!' 1>&2 && exit 1) astyle --options=.astylerc -nQ *.c *.h .PHONY: clean astyle