projects-dir.mk: Fix: clean-dirs does too much

The clean-dirs target does not only clean the repos present in PROJECTS, but all repos it finds to be dirty, and clean-all-dirs does the opposite. I suppose that was an oversight, swap their recipes.

Moreover, cleaning all directories goes about its business in an overly complicated and unecessarily time-consuming way, fix that, too.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-18 11:49:10 +02:00
commit d31768cbef
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -270,12 +270,11 @@ pkg-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
# --- generic cleanup targets
clean-dirs:
echo $(sort $(subst /,,$(dir $(wildcard */*.done)))) | xargs -r $(JW_PKG_PY_BUILD) clean
clean-all-dirs:
$(JW_PKG_PY_BUILD) clean $(sort $(subst /,,$(dir $(wildcard */*.done))) $(PROJECTS))
clean-dirs:
$(JW_PKG_PY_BUILD) clean $(PROJECTS)
make clean-dirs
purge: $(SSH_WRAPPER_SH)
ifneq ($(PURGE_SH),/bin/bash purge-not-found)