jw-pkg/make/projects-dir.mk

42 lines
1 KiB
Makefile
Raw Normal View History

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
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:
$(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