From 57d31b9c948a596600e5f8569728148549e14ef4 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Tue, 24 Apr 2012 11:11:04 +0300 Subject: [PATCH] initial `make check' Thanks glebfm@ yet again :) --- Makefile | 5 +++-- lib/check.mk | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 lib/check.mk diff --git a/Makefile b/Makefile index d3a7040b..fa192ad5 100644 --- a/Makefile +++ b/Makefile @@ -23,8 +23,9 @@ endif # recursive make considered useful for m-p MAKE += -r --no-print-directory -.PHONY: clean distclean help -clean distclean help: +DIRECT_TARGETS := clean distclean check help +.PHONY: $(DIRECT_TARGETS) +$(DIRECT_TARGETS): @$(MAKE) -f main.mk $@ export NUM_TARGETS := $(words $(MAKECMDGOALS)) diff --git a/lib/check.mk b/lib/check.mk new file mode 100644 index 00000000..d8a15fee --- /dev/null +++ b/lib/check.mk @@ -0,0 +1,11 @@ +ifndef MKIMAGE_PROFILES +$(error this makefile is designed to be included in toplevel one) +endif + +check: + @find sub.in features.in \ + -path '*scripts.d/*' \ + \! \( -perm 755 -o -name .gitignore \) \ + | while read line; do \ + echo "chmod 755 $$line"; \ + done