Commit 7919df82 authored by Michael Shigorin's avatar Michael Shigorin

avoid "nothing to commit" in build.log

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).
parent d5a5941f
......@@ -27,6 +27,7 @@ include $(BUILDDIR)/distcfg.mk
### {image-,}scripts.d/ get rsynced twice :-/
### still we don't want the trimmed-down case
### sorry for somewhat complicated and overly long lines
all:
@echo "** starting feature configuration"
@if [ -n "$(GLOBAL_DEBUG)" ]; then \
......@@ -47,32 +48,38 @@ all:
rsync -qab "$$dir/" "$$destdir/"; \
fi; \
if [ -d "tagged/$$dir" ]; then \
pushd "tagged/$$dir" && \
echo "$$feat && ($$src || $$dst)" \
| tags2lists . \
| xargs -r cp -v -pLt "$$destdir" --; \
popd; \
if pushd "tagged/$$dir"; then \
echo "$$feat && ($$src || $$dst)" \
| tags2lists . \
| xargs -r cp -v -pLt "$$destdir" --; \
popd; \
fi; \
fi; \
fi; \
done; \
type -t git >&/dev/null && \
pushd "$(BUILDDIR)/$$dst/" && \
git add . && \
if [ -n "$$dst" ]; then \
the="$$sub subprofile"; \
else \
the="toplevel"; \
if type -t git >&/dev/null && \
pushd "$(BUILDDIR)/$$dst/"; then \
test -n "`git status -s`" && \
git add . && \
if [ -n "$$dst" ]; then \
the="$$sub subprofile"; \
else \
the="toplevel"; \
fi && \
git commit -qam "$$feat feature ($$the part)"; \
popd; \
fi; \
git commit -qam "$$feat feature ($$the part)" ||:; \
popd; \
done; \
if [ -x "generate.sh" ]; then sh generate.sh; fi; \
if [ -s "generate.mk" ]; then $(MAKE) -f generate.mk; fi; \
type -t git >&/dev/null && \
pushd "$(BUILDDIR)/" && \
git add . && \
git commit -qam "$$feat feature generation complete" ||:; \
popd; \
if type -t git >&/dev/null && \
pushd "$(BUILDDIR)/"; then \
if test -n "`git status -s`"; then \
git add . && \
git commit -qam "$$feat feature generation complete"; \
fi; \
popd; \
fi; \
popd; \
done
@find "$(BUILDDIR)/" -name '*~' \
......
......@@ -13,11 +13,13 @@ all: $(GLOBAL_DEBUG)
@if [ -n "$(MAIN_GROUPS)" ]; then \
mkdir -p $(TARGET) && \
cp -at $(TARGET) -- $(addsuffix .directory,$(MAIN_GROUPS)); \
type -t git >&/dev/null && \
cd $(TARGET) && \
git add . && \
git commit -qam "requested $(SUFFIX) copied over"; \
cd - >&/dev/null; \
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:
......
......@@ -38,10 +38,12 @@ all: $(TARGET) $(GLOBAL_DEBUG)
@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"; \
@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
# do beforehand as foreach gets expanded before recipe execution
......
......@@ -13,12 +13,14 @@ all:
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; \
rsync -qa "$$src/" "$(BUILDDIR)/$$dst/" && \
if type -t git >&/dev/null && cd "$(BUILDDIR)/$$dst/"; then \
if [ -n "`git status -s`" ]; then \
git add . && \
git commit -qam "$$dst subprofile initialized$${neq:+ (using $$src)}"; \
fi; \
cd - >&/dev/null; \
fi; \
done
clean:
......
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