diff --git a/Makefile b/Makefile index 34329c41..5e4f5657 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ RPM_UPLOAD_URLPREFIX ?= rsync_ssh://$(JANWARE_USER)@pkg.janware.com:/srv/ft include $(TOPDIR)/make/proj.mk include $(MODDIR)/make/topdir.mk include $(MODDIR)/make/srcdist.mk +include $(MODDIR)/make/git-cvs-bridge.mk all: clean: clean.pkgconfig diff --git a/make/git-cvs-bridge.mk b/make/git-cvs-bridge.mk new file mode 100644 index 00000000..46f60ad5 --- /dev/null +++ b/make/git-cvs-bridge.mk @@ -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) diff --git a/make/srcdist.mk b/make/srcdist.mk index 602bb72d..d1b5b468 100644 --- a/make/srcdist.mk +++ b/make/srcdist.mk @@ -12,22 +12,3 @@ WD_PKG = $(WD_PKG_BASE_NAME).tar.bz2 WD_PKG_PATH = $(WD_PKG_DIR)/$(WD_PKG) WD_PKG_UPLOAD_SERVER = pkg.janware.com WD_PKG_UPLOAD_PATH = /srv/dav/pub/clients/jw - -all: - -ifeq ($(VCS),cvs) -ifneq ($(GIT_BUDDY_DIR),) -git2cvs: - cvs up -dP - git -C $(GIT_BUDDY_DIR) cherry origin HEAD | sed -n 's/^+ //p' | xargs -l1 git -C $(GIT_BUDDY_DIR) cvsexportcommit -w $(CWD) -c -p -v -endif -else ifeq ($(VCS),git) -cvs2git: - git cvsimport -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)