2015-06-12 15:22:25 +00:00
|
|
|
ifneq ($(PROJECTS),)
|
|
|
|
|
export PGIT_CLONE_PROJECTS = $(PROJECTS)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifneq ($(CLONE_FROM_USER),)
|
|
|
|
|
export PGIT_CLONE_FROM_USER = $(CLONE_FROM_USER)
|
|
|
|
|
endif
|
|
|
|
|
|
2013-12-11 19:25:42 +00:00
|
|
|
ifneq ($(wildcard projects.txt),)
|
2014-03-21 12:35:28 +00:00
|
|
|
PROJECTS = $(shell cat projects.txt | sed '/^ *\#/ d')
|
|
|
|
|
# TODO: this could be nicer
|
|
|
|
|
CVS_PROJECTS = $(PROJECTS)
|
2013-12-11 19:25:42 +00:00
|
|
|
else
|
2016-02-23 21:33:10 +00:00
|
|
|
PROJECTS ?= $(patsubst %/,%,$(dir $(wildcard */CVS */.git)))
|
2015-06-12 15:22:25 +00:00
|
|
|
CVS_PROJECTS = $(filter $(dir $(wildcard */CVS)),$(PROJECTS))
|
2013-12-11 19:25:42 +00:00
|
|
|
endif
|
2013-12-11 19:13:33 +00:00
|
|
|
|
2012-08-06 10:45:27 +00:00
|
|
|
WHOAMI = $(shell id -un)
|
2015-06-12 15:22:25 +00:00
|
|
|
PGIT = CLONE_PROJECTS="$(PROJECTS)" CLONE_FROM_USER="$(shell whoami)" /bin/bash $(firstword $(wildcard ./ytools/devutil/scripts/pgit.sh /opt/ytools/bin/pgit.sh))
|
2012-08-06 10:45:27 +00:00
|
|
|
|
2016-02-23 21:33:10 +00:00
|
|
|
EXCLUDE_FROM_BUILD = \
|
|
|
|
|
dspider-btools \
|
|
|
|
|
dspider-shared \
|
|
|
|
|
feedfs-dspcd \
|
|
|
|
|
casview \
|
|
|
|
|
dspfs \
|
|
|
|
|
feedfs-qt \
|
|
|
|
|
jux3
|
|
|
|
|
|
2012-08-01 18:37:01 +00:00
|
|
|
all:
|
2016-02-23 21:33:10 +00:00
|
|
|
|
|
|
|
|
all clean:
|
|
|
|
|
python ./ytools/devutil/scripts/build.py -b $(shell pwd) $@ $(filter-out $(EXCLUDE_FROM_BUILD),$(PROJECTS))
|
2012-08-01 18:37:01 +00:00
|
|
|
|
2014-07-24 14:22:36 +00:00
|
|
|
clean-dirs:
|
|
|
|
|
ls */dirs-all.done 2>/dev/null | sed 's%/.*%%' | xargs -r build.py -b $(shell pwd) clean
|
|
|
|
|
|
2012-08-01 18:37:01 +00:00
|
|
|
cpp:
|
2013-12-11 19:25:42 +00:00
|
|
|
@find $(PROJECTS) -name '*.cpp' | grep /worker/ | grep -ve "old\|tmp\|nomake\|new" | \
|
2012-09-24 16:48:07 +00:00
|
|
|
while read f; do d=`dirname $$f`; if [ $$d/generate_code.sh ]; then echo $$f; fi ;\
|
|
|
|
|
done
|
2012-08-01 18:37:01 +00:00
|
|
|
|
2015-10-25 12:12:51 +00:00
|
|
|
clone diff commit push:
|
2015-06-12 15:22:25 +00:00
|
|
|
$(PGIT) $@
|
2013-12-11 19:13:33 +00:00
|
|
|
|
2014-07-23 14:16:34 +00:00
|
|
|
git-push:
|
2015-06-12 15:22:25 +00:00
|
|
|
$(PGIT) push
|
2014-07-23 14:16:34 +00:00
|
|
|
|
2015-07-06 15:02:12 +00:00
|
|
|
git-diff:
|
|
|
|
|
$(PGIT) diff
|
|
|
|
|
|
2013-12-11 19:13:33 +00:00
|
|
|
update pull:
|
2013-12-11 19:25:42 +00:00
|
|
|
cvs update -dP $(CVS_PROJECTS)
|
2015-06-12 15:22:25 +00:00
|
|
|
$(PGIT) pull
|
2013-12-11 19:13:33 +00:00
|
|
|
|
2014-07-23 14:15:37 +00:00
|
|
|
git-pull:
|
2015-06-12 15:22:25 +00:00
|
|
|
$(PGIT) pull
|
2014-07-23 14:15:37 +00:00
|
|
|
|
2014-06-05 21:24:48 +00:00
|
|
|
status:
|
|
|
|
|
for p in $(CVS_PROJECTS); do test -f $$d/CVS || echo $$p; done
|
|
|
|
|
cvs status $(addsuffix VERSION,$(CVS_PROJECTS))
|
2015-06-12 15:22:25 +00:00
|
|
|
$(PGIT) status
|
2015-06-11 14:29:48 +00:00
|
|
|
|
|
|
|
|
git-conv-%:
|
2015-06-12 19:43:39 +00:00
|
|
|
[ -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
|
|
|
|
|
|
2015-10-25 12:12:51 +00:00
|
|
|
projects.txt:
|
|
|
|
|
echo $(PROJECTS) | sed 's/ /\n/g; s%/%%g' > $@
|
2015-06-12 19:43:39 +00:00
|
|
|
|