jw-pkg/make/dev-utils.mk

39 lines
1.1 KiB
Makefile
Raw Normal View History

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:
echo-vars:
make -p nothing | grep -B1 "^[A-Z_]* *[?:+]*="
echo-makefiles:
$(Q)strace -f make nothing 2>&1 | sed '/open\(at\)*(.*\(GNUmakefile\|makefile\|Makefile\|\.mk\)/ !d; s/.*open("//; s/.*openat([A-Z_]\+, "//; s/", O_.*//'
cat-makefiles:
Q=@ make --no-print-directory echo-makefiles | while read f; do echo "# =================================================== $$f"; sed 's/^include/#cat include/' $$f; done
link-in:
DEVELOPMENT=false INSTALL_LINK=1 make install
install-to-system:
sudo make DEVELOPMENT=false install
for s in $(RESTART_SERVICES); do \
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