dev-utils.mk: Add target indent-makefiles

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-03-03 16:13:24 +00:00
commit e3142c9624
2 changed files with 14 additions and 0 deletions

View file

@ -1,6 +1,10 @@
ifndef DEV_UTILS_MK_INCLUDED
DEV_UTILS_MK_INCLUDED = true
MAKEFILE_INDENT_EQUAL_POS ?= 35
MAKEFILE_INDENT_NAME_REGEX ?= (\.mk$$|makefile$$|Makefile$$|GNUmakefile$$)
MAKEFILE_INDENT_ROOT ?= .
all:
install:
clean distclean:
@ -23,4 +27,13 @@ install-to-system:
sudo systemctl restart $$s ;\
done
indent-makefiles:
$(PYTHON) /opt/jw-python/bin/process-text-files.py \
indent-makefiles \
--equal-pos $(MAKEFILE_INDENT_EQUAL_POS) \
--skip-short 6 \
--name-regex="$(MAKEFILE_INDENT_NAME_REGEX)" \
--root=$(MAKEFILE_INDENT_ROOT) \
--min-assignments=4
endif # ifndef DEV_UTILS_MK_INCLUDED