mkimage-profiles/sub.in/Makefile
Michael Shigorin 3a5b47e712 improved logging during profile creation
- better *_LISTS printout
- somewhat cleaner .base comments
- more comprehensible git log messages
  + special handling for complex subprofiles
  + no need to commit build.log ;-)
2011-11-04 16:15:30 +02:00

32 lines
784 B
Makefile

# step 3: copy the needed subprofiles to $(BUILDDIR)
ifndef BUILDDIR
$(error BUILDDIR not defined)
endif
include $(BUILDDIR)/distcfg.mk
# if the subprofile is specified in src/dst notation,
# take src/ and put it as dst/ (for stage2 variants)
all:
@for sub in $(SUBPROFILES); do \
src="$${sub%/*}" && \
dst="$${sub#*/}" && \
neq="$${src#$$dst}" && \
rsync -a "$$src/" "$(BUILDDIR)/$$dst/" && \
type -t git >&/dev/null && \
cd "$(BUILDDIR)/$$dst/" && \
git add . && \
git commit -qam "$$dst subprofile initialized$${neq:+ (using $$src)}"; \
cd - >&/dev/null; \
done
clean:
@for sub in $(SUBPROFILES); do \
dst="${sub#*/}" && \
if [ -n "$$dst" -a -n "$(BUILDDIR)" ]; then \
rm -r "$(BUILDDIR)/$$dst" && \
mkdir -p "$(BUILDDIR)/$$dst"; \
fi; \
done