Commit 75fd7952 authored by Michael Shigorin's avatar Michael Shigorin

ensure that distcfg.mk gets included once at most

This was done while debugging GLOBAL_CLEANUP_PACKAGES getting doubled... as it got no hard initial value but rather was always added to, it appeared that at least stage2/Makefile would obtain a once-initialized value from upstream and double it while including distcfg.mk itself. It's way less hassle to just proxy the value once.
parent c5bf0529
# dump interesting variables' effective values;
# based on http://stackoverflow.com/questions/7117978
SPAM := $(.VARIABLES)
SPAM := $(.VARIABLES) DISTCFG_MK
-include distcfg.mk
HAM := $(.VARIABLES)
......
......@@ -28,7 +28,10 @@ SHORTEN = $(shell [ "$(DEBUG)" != 2 -a -s "$(SYMLINK)" ] \
profile/init: distclean
@echo -n "** initializing BUILDDIR: "
@rsync -qaH --delete image.in/ "$(BUILDDIR)"/
@:> "$(BUILDDIR)"/distcfg.mk
@{ \
echo "ifndef DISTCFG_MK"; \
echo "DISTCFG_MK = 1"; \
} > "$(BUILDDIR)"/distcfg.mk
@{ \
git show-ref --head -d -s -- HEAD && \
git status -s && \
......@@ -48,6 +51,9 @@ profile/init: distclean
echo "$(BUILDDIR)/"; \
fi
profile/finalize: distro/.rc
@echo "endif" >> "$(BUILDDIR)"/distcfg.mk
# requires already formed distcfg.mk for useful output
profile/dump-vars:
@if [ -s "$(SYMLINK)" ]; then \
......@@ -56,7 +62,7 @@ profile/dump-vars:
fi $(LOG)
# step 3 entry point: copy the needed parts into BUILDDIR
profile/populate: profile/init distro/.rc profile/dump-vars
profile/populate: profile/init profile/finalize profile/dump-vars
@for dir in sub.in features.in pkg.in; do \
$(MAKE) -C $$dir $(LOG); \
done
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