7919df829c
Typical (to-be-refactored when having settled down) "cd/git .../cd -" sequences are tweaked to safeguard against changing back without having actually changed to, just in case. features.in/Makefile left with pushd/popd due to its three-level diving course (which somewhat asks to be refactores in functions either but is intrinsically somewhat complex OTOH).
27 lines
660 B
Makefile
27 lines
660 B
Makefile
# step 3: copy package groups referenced in distro configuration
|
|
# (and only those!) over to $(BUILDDIR)
|
|
|
|
ifndef BUILDDIR
|
|
$(error BUILDDIR not defined)
|
|
endif
|
|
|
|
include $(BUILDDIR)/distcfg.mk
|
|
SUFFIX := pkg/groups
|
|
TARGET := $(BUILDDIR)/$(SUFFIX)
|
|
|
|
all: $(GLOBAL_DEBUG)
|
|
@if [ -n "$(MAIN_GROUPS)" ]; then \
|
|
mkdir -p $(TARGET) && \
|
|
cp -at $(TARGET) -- $(addsuffix .directory,$(MAIN_GROUPS)); \
|
|
if type -t git >&/dev/null && cd $(TARGET); then \
|
|
if [ -n "`git status -s`" ]; then \
|
|
git add . && \
|
|
git commit -qam "requested $(SUFFIX) copied over"; \
|
|
fi; \
|
|
cd - >&/dev/null; \
|
|
fi; \
|
|
fi
|
|
|
|
debug:
|
|
@echo "** MAIN_GROUPS: $(MAIN_GROUPS)"
|