fix toplevel arch/distro loops

There was a somewhat subtle Makefile->main.mk rename leftover
lurking in "everything" target: the default Makefile got used,
not the supposed main.mk -- which resulted in an attempt to
get way too much job done (the number of builds per target
became $ARCH squared, not just $ARCH).

Huge thanks to led@ for being an inspiring pedantic!
This commit is contained in:
Michael Shigorin 2012-01-17 00:32:54 +04:00
parent b95caa9b73
commit 9304c12c58
2 changed files with 4 additions and 5 deletions

View File

@ -31,6 +31,8 @@ export NUM_TARGETS := $(words $(MAKECMDGOALS))
echo "** goal: $@ [$$n/$(NUM_TARGETS)]"; \ echo "** goal: $@ [$$n/$(NUM_TARGETS)]"; \
fi; \ fi; \
for ARCH in $(ARCHES); do \ for ARCH in $(ARCHES); do \
if [ "$$ARCH" != "$(firstword $(ARCHES))" ]; then echo; fi; \
echo "** ARCH: $$ARCH"; \
$(MAKE) -f main.mk ARCH=$$ARCH $@; \ $(MAKE) -f main.mk ARCH=$$ARCH $@; \
done; \ done; \
if [ "$$n" -lt "$(NUM_TARGETS)" ]; then echo; fi if [ "$$n" -lt "$(NUM_TARGETS)" ]; then echo; fi

View File

@ -61,11 +61,8 @@ everything:
@n=1; sum=$(words $(DISTROS)); \ @n=1; sum=$(words $(DISTROS)); \
for distro in $(DISTROS); do \ for distro in $(DISTROS); do \
echo "** building $$distro [$$n/$$sum]:"; \ echo "** building $$distro [$$n/$$sum]:"; \
$(MAKE) --no-print-directory \ $(MAKE) -f main.mk --no-print-directory $$distro; \
COUNT=$$n/$$sum \ [ "$$n" -lt "$$sum" ] && echo; \
BUILDDIR=$(BUILDDIR) \
$$distro; \
echo; \
n=$$(($$n+1)); \ n=$$(($$n+1)); \
done done