Commit ed0842b7 authored by Michael Shigorin's avatar Michael Shigorin

features.in/Makefile: cosmetic rewrite

The outmost shell loop got replaced with a (hidden) bunch of targets -- it's somewhat controversial as the inner loops are still there (but at least don't wrap around my SXGA+). Full targetization might be beneficial in terms of parallelism achievable *but* that would ruin git history being generated, and building a distro configuration takes a few seconds at most. (upon reading http://stackoverflow.com/questions/5414418/)
parent 390f4f6b
......@@ -25,13 +25,22 @@ include $(BUILDDIR)/distcfg.mk
# still both pieces go into a single destination
### sorry for somewhat complicated and overly long lines
all:
TARGETS := prep $(FEATURES) finalize
.PHONY: $(TARGETS)
all: | $(TARGETS)
prep:
@echo "** starting feature configuration"
@if [ -n "$(GLOBAL_DEBUG)" ]; then \
echo "** target subprofiles: $(SUBPROFILES)"; \
echo "** requested features: $(FEATURES)"; \
fi
@for feat in $(FEATURES); do \
# feat
$(FEATURES):
@feat=$@; \
if [ -n "$(GLOBAL_DEBUG)" ]; then \
echo "** adding $$feat feature"; \
fi; \
......@@ -105,8 +114,10 @@ all:
fi; \
popd >/dev/null; \
fi; \
popd >/dev/null; \
done
popd >/dev/null
finalize:
@find "$(BUILDDIR)/" -name '*~' \
| sed "s,$(BUILDDIR)/,** warning: file clash: ," >&2
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