Makefile, git-cvs-bridge.mk, srcdist.mk: Add git-cvs-bridge.mk

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-01-08 08:55:17 +00:00
commit c8e664bcb9
3 changed files with 22 additions and 19 deletions

21
make/git-cvs-bridge.mk Normal file
View file

@ -0,0 +1,21 @@
# is "origin" by default, but this clashes with the remote's name in some situations
CVS_HEAD_BRANCH ?= cvs-head
all:
ifeq ($(VCS),cvs)
ifneq ($(GIT_BUDDY_DIR),)
git2cvs:
cvs up -dP
git -C $(GIT_BUDDY_DIR) cherry $(CVS_HEAD_BRANCH) HEAD | sed -n 's/^+ //p' | xargs -r -l1 git -C $(GIT_BUDDY_DIR) cvsexportcommit -w $(CWD) -c -p -v
endif
else ifeq ($(VCS),git)
cvs2git:
git cvsimport -o $(CVS_HEAD_BRANCH) -v -kk proj/$(PROJECT)
endif
$(WD_PKG_DIR):
mkdir -p $@
pkg-upload-wd: | $(WD_PKG_DIR)
make -s list-files | xargs echo $(WD_PKG_VCS_FILES) | xargs tar --transform "s|^|$(WD_PKG_BASE_NAME)/|" -cjf $(WD_PKG_PATH)