From e1a8253fc21f7e4dd0320a9c4b64febe90c2f4c3 Mon Sep 17 00:00:00 2001 From: Steve Beattie Date: Thu, 23 Jul 2020 18:57:53 -0700 Subject: [PATCH] profiles/Makefile: local target does not depend on parser The "local" make target does not depend on the parser having been built. Create a separate "test-dependencies" target and have the tests that need them depend on that and the "local" target, when validating the profile set against the apparmor tools. Fixes: c8b6d8b393be Bug: https://gitlab.com/apparmor/apparmor/-/issues/98 Signed-off-by: Steve Beattie Acked-by: John Johansen MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/586 --- profiles/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/profiles/Makefile b/profiles/Makefile index 865126b7d..677746f63 100644 --- a/profiles/Makefile +++ b/profiles/Makefile @@ -52,6 +52,8 @@ endif # $(PWD) is wrong when using "make -C profiles" - explicitely set it here to get the right value PWD=$(shell pwd) +.PHONY: test-dependencies +test-dependencies: __parser .PHONY: __parser __parser: @@ -64,7 +66,7 @@ ifndef USE_SYSTEM fi endif -local: __parser +local: for profile in ${TOPLEVEL_PROFILES}; do \ fn=$$(basename $$profile); \ echo "# Site-specific additions and overrides for '$$fn'" > ${PROFILES_SOURCE}/local/$$fn; \ @@ -108,7 +110,7 @@ CHECK_ABSTRACTIONS=$(shell find ${ABSTRACTIONS_SOURCE} -type f -print) check: check-parser check-logprof .PHONY: check-parser -check-parser: local +check-parser: test-dependencies local @echo "*** Checking profiles from ${PROFILES_SOURCE} and ${EXTRAS_SOURCE} against apparmor_parser" $(Q)for profile in ${CHECK_PROFILES} ; do \ [ -n "${VERBOSE}" ] && echo "Testing $${profile}" ; \ @@ -124,6 +126,6 @@ check-parser: local done .PHONY: check-logprof -check-logprof: local +check-logprof: test-dependencies local @echo "*** Checking profiles from ${PROFILES_SOURCE} against logprof" $(Q)${LOGPROF} -d ${PROFILES_SOURCE} -f /dev/null || exit 1