jw-pkg/make/projects-dir.mk
Jan Lindemann da6a6b5cd8 projects-dir.mk: Add git-push
Signed-off-by: Jan Lindemann <jan@janware.com>
2014-07-23 14:16:34 +00:00

39 lines
962 B
Makefile

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 = $(dir $(wildcard */CVS))
endif
WHOAMI = $(shell id -un)
RGIT = /bin/bash $(firstword $(wildcard ./ytools/devutil/scripts/pgit.sh /opt/ytools/bin/pgit.sh))
all:
por p in $(PROJECTS); do make -C $$p || break; done
clean:
por p in $(PROJECTS); do make -C $$p clean || break; done
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:
$(RGIT) $@
git-push:
$(RGIT) push
update pull:
cvs update -dP $(CVS_PROJECTS)
$(RGIT) pull
git-pull:
$(RGIT) pull
status:
for p in $(CVS_PROJECTS); do test -f $$d/CVS || echo $$p; done
cvs status $(addsuffix VERSION,$(CVS_PROJECTS))
$(RGIT) status