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