mkimage-profiles/pkg.in/lists/Makefile
Michael Shigorin 774169c6cd COMMON_PACKAGES and SYSTEM_PACKAGES
It was clear that "common" isn't very apt for packages that
will get *everywhere*, and became apparent when the need for
a "base+live packages" variable arrived with powerbutton feature.

So:
- the former COMMON_PACKAGES are now SYSTEM_PACKAGES;
- COMMON_PACKAGES act as "BASE+LIVE_PACKAGES".

Note that SYSTEM_PACKAGES also got factored out from stage2 based
features into stage2 subprofile itself; cleanups were due as well.
2011-11-04 16:15:30 +02:00

57 lines
1.7 KiB
Makefile

# step 3: copy package lists referenced in distro configuration
# (and only those!) over to $(BUILDDIR)
ifndef BUILDDIR
$(error BUILDDIR not defined)
endif
include $(BUILDDIR)/distcfg.mk
SUFFIX := pkg/lists
TARGET := $(BUILDDIR)/$(SUFFIX)
all: $(TARGET) $(GLOBAL_DEBUG)
@# env | sort -u | grep _LISTS | xargs cp
@$(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(shell cp --parents -at $(TARGET) \
-- $(value $V))))
@# construct .base packagelist for alterator-pkg
@{ \
echo "## generated by pkg.in/lists/Makefile"; \
if [ -n "$(BRANDING)" ]; then \
echo "branding-$(BRANDING)-release"; \
fi; \
if [ -n "$(SYSTEM_PACKAGES)" ]; then \
echo -e "\n## SYSTEM_PACKAGES\n$(SYSTEM_PACKAGES)"; \
fi; \
if [ -n "$(COMMON_PACKAGES)" ]; then \
echo -e "\n## COMMON_PACKAGES\n$(COMMON_PACKAGES)"; \
fi; \
if [ -n "$(BASE_PACKAGES)" ]; then \
echo -e "\n## BASE_PACKAGES\n$(BASE_PACKAGES)"; \
fi; \
if [ -n "$(BASE_LISTS)" ]; then \
echo -e "\n## BASE_LISTS"; cat $(BASE_LISTS); \
fi; \
} | sed -re '/^[^[:space:]#]/ s/[[:space:]]+/\n/g' >$(TARGET)/.base
@if [ -n "$(MAIN_GROUPS)" ]; then \
cp -at $(TARGET) -- $(MAIN_GROUPS); \
fi
@if type -t git >&/dev/null; then \
cd $(TARGET) && \
git add . && \
git commit -qam "requested $(SUFFIX) copied over"; \
fi
# do beforehand as foreach gets expanded before recipe execution
$(TARGET):
@mkdir -p $(TARGET)
# figure out *_LISTS variables and print them out nicely
debug:
@echo -e $(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(shell echo '\\n"**"' $V: $(value $V)))) '\n'