c4311108ea
There were heaps of "if type -t git" there already; it wasn't an unintentional mishap but rather a moderate copy-paste to get the use cases, and now these seem to have essentially settled. So time to scrap some dups. NB: the scripts in the generated profile can't rely on the contents of the metaprofile (these need to be able to work in standalone case either), so a bit of crap still lurks there.
29 lines
704 B
Makefile
29 lines
704 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 -qa "$$src/" "$(BUILDDIR)/$$dst/" && \
|
|
mp-commit "$(BUILDDIR)/$$dst/" \
|
|
"$$dst subprofile initialized$${neq:+ (using $$src)}"; \
|
|
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
|