From f58fe9cd5220e9b3b1b704e48f204c9969587cb3 Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki Date: Mon, 25 Nov 2024 13:54:03 +0100 Subject: [PATCH] parser: quote BISON_MAJOR in case it is empty On a test system without bison installed, make setup fails with: /bin/sh: 1: bison: not found /bin/sh: 1: test: -ge: unexpected operator Signed-off-by: Zygmunt Krynicki --- parser/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/Makefile b/parser/Makefile index e61165d10..57a699d1c 100644 --- a/parser/Makefile +++ b/parser/Makefile @@ -38,7 +38,7 @@ MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 aa-teardown.8 apparmor_xattrs # parse.error=verbose supported from 3.0 so just test on that # TODO move to autoconf BISON_MAJOR:=$(shell bison --version | awk '/^bison/ { print ($$NF) }' | awk -F. '{print $$1 }') -USE_PARSE_ERROR:=$(shell test ${BISON_MAJOR} -ge 3 && echo true) +USE_PARSE_ERROR:=$(shell test "${BISON_MAJOR}" -ge 3 && echo true) YACC := bison YFLAGS := -d