From 8a3443959397203dc65e2ba9d431813ffabab055 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Thu, 2 Feb 2023 13:33:58 +0100 Subject: [PATCH] Check if extra profiles have a local/ include ... now that they all got it added. Also remove a superfluous backslash in another make target. --- profiles/Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/profiles/Makefile b/profiles/Makefile index 19d39a796..b68c2ac4b 100644 --- a/profiles/Makefile +++ b/profiles/Makefile @@ -83,7 +83,7 @@ local: fn=$$(basename $$profile); \ echo "# Site-specific additions and overrides for '$$fn'" > ${PROFILES_SOURCE}/local/$$fn; \ grep "include[[:space:]]\\+if[[:space:]]\\+exists[[:space:]]\\+" "$$profile" >/dev/null || { echo "$$profile doesn't contain include if exists " ; exit 1; } ; \ - done; \ + done .PHONY: install install: local @@ -119,7 +119,7 @@ CHECK_PROFILES=$(filter-out ${IGNORE_FILES} ${SUBDIRS}, $(wildcard ${PROFILES_SO CHECK_ABSTRACTIONS=$(shell find ${ABSTRACTIONS_SOURCE} -type f -print) .PHONY: check -check: check-parser check-logprof check-abstractions.d +check: check-parser check-logprof check-abstractions.d check-extras .PHONY: check-parser check-parser: test-dependencies local @@ -151,3 +151,11 @@ check-abstractions.d: test "$$file" = 'ubuntu-helpers' && continue ; \ grep -q "^ include if exists $$" $$file || { echo "$$file does not contain 'include if exists '"; exit 1; } ; \ done + +.PHONY: check-extras +check-extras: + @echo "*** Checking if all extra profiles contain include if exists " + $(Q)cd ${EXTRAS_SOURCE} && for file in * ; do \ + test "$$file" = 'README' && continue ; \ + grep -q "^ include if exists $$" $$file || { echo "$$file does not contain 'include if exists '"; exit 1; } ; \ + done