From cb9223d3b895f1edb35bf7a6fd3aa9305de3f1db Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 17 Mar 2019 20:57:43 +0100 Subject: [PATCH] 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. --- Makefile | 1 + 1 file changed, 1 insertion(+) 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 -- 2.39.5