Commit eae7b38c authored by Michael Shigorin's avatar Michael Shigorin

groups: added `make check'

This one has became direly needed while reworking Centaurus' pkglists/groups into a tree.
parent 4c2ff130
......@@ -2,8 +2,35 @@
# (and only those!) over to $(BUILDDIR)
ifndef BUILDDIR
$(error BUILDDIR not defined)
endif
check all: check-parents check-echo check-pkglists; @:
check-parents:
@find -name "*.directory" \
| xargs -r -- sed -rn 's,^X-Alterator-Parent=(.*)$$,\1,p' \
| sort -u \
| while read group; do \
if ! [ -f "$$group.directory" ]; then \
echo "** Error: missing parent group referenced in:"; \
grep -rl "=$$group$$" $$(find -name "*.directory"); \
fi >&2; \
done
check-echo:
@echo
check-pkglists:
@find -name "*.directory" \
| xargs -r -- sed -rn 's,^X-Alterator-PackageList=(.*)$$,\1,p' \
| sort -u \
| while read list; do \
if ! [ -f "../lists/$$list" ]; then \
echo "** Error: missing pkglist referenced in:"; \
grep -rl "=$$list$$" $$(find -name "*.directory"); \
fi >&2; \
done
else
include $(BUILDDIR)/distcfg.mk
SUFFIX := pkg/groups
......@@ -20,3 +47,5 @@ all: $(GLOBAL_DEBUG)
debug:
@echo "** THE_GROUPS: $(THE_GROUPS)"
@echo "** MAIN_GROUPS: $(MAIN_GROUPS)"
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment