ifneq ($(PROJECTS),) export PGIT_CLONE_PROJECTS = $(PROJECTS) endif ifneq ($(CLONE_FROM_USER),) export PGIT_CLONE_FROM_USER = $(CLONE_FROM_USER) endif ifneq ($(wildcard projects.txt),) PROJECTS = $(shell cat projects.txt | sed '/^ *\#/ d') # TODO: this could be nicer CVS_PROJECTS = $(PROJECTS) else PROJECTS ?= $(dir $(wildcard */CVS */.git)) CVS_PROJECTS = $(filter $(dir $(wildcard */CVS)),$(PROJECTS)) endif WHOAMI = $(shell id -un) PGIT = CLONE_PROJECTS="$(PROJECTS)" CLONE_FROM_USER="$(shell whoami)" /bin/bash $(firstword $(wildcard ./ytools/devutil/scripts/pgit.sh /opt/ytools/bin/pgit.sh)) all: for p in $(PROJECTS); do make -C $$p || break; done clean: for p in $(PROJECTS); do make -C $$p clean || break; done clean-dirs: ls */dirs-all.done 2>/dev/null | sed 's%/.*%%' | xargs -r build.py -b $(shell pwd) clean cpp: @find $(PROJECTS) -name '*.cpp' | grep /worker/ | grep -ve "old\|tmp\|nomake\|new" | \ while read f; do d=`dirname $$f`; if [ $$d/generate_code.sh ]; then echo $$f; fi ;\ done clone diff commit push: $(PGIT) $@ git-push: $(PGIT) push update pull: cvs update -dP $(CVS_PROJECTS) $(PGIT) pull git-pull: $(PGIT) pull status: for p in $(CVS_PROJECTS); do test -f $$d/CVS || echo $$p; done cvs status $(addsuffix VERSION,$(CVS_PROJECTS)) $(PGIT) status git-conv-%: [ -e $*/.git ] || { \ mv $* old/ ;\ if PROJECTS="$*" make clone; then \ sed -i "/^D\/$*\// d" CVS/Entries ;\ else \ mv old/$* . ;\ fi \ } check-conv: for p in `ssh git.jannet.de /opt/ytools/bin/git-srv-admin.sh -u jan -j list-personal-projects`; do \ make git-conv-$$p ;\ done