diff --git a/vcs.mk b/vcs.mk index 4b8fe3a..e76b5ff 100644 --- a/vcs.mk +++ b/vcs.mk @@ -37,8 +37,8 @@ HG := hg GIT := git BZR := bzr SVN := svn -#BZR := "$(subst /,$(DIRSEP),$(or $(wildcard c:/Program?Files/Bazaar/bzr.exe),bzr))" -CVS := "$(subst /,$(DIRSEP),$(or $(wildcard c:/Program?Files/CVS?Suite/cvs.exe),cvs))" +#BZR := $(or $(patsubst %,"%",$(subst /,$(DIRSEP),$(wildcard c:/Program?Files/Bazaar/bzr.exe))),bzr) +CVS := $(or $(patsubst %,"%",$(subst /,$(DIRSEP),$(wildcard c:/Program?Files/CVS?Suite/cvs.exe))),cvs) #CVS := evs CVSFLAGS := $(shell cvs --lf --version 2>$(NULL) >$(NULL)&&echo --lf) @@ -60,6 +60,7 @@ $1: @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo +++ Creating[hg]: $(SHQ)'$$@$(SHQ)' from $(SHQ)'$2$(SHQ)' @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + $(TEST) ! -d $$@ || $(RD) $$@ $(HG) clone $2 $$@ pull-$1: @@ -83,6 +84,7 @@ $1: @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo +++ Creating[svn]: $(SHQ)'$$@$(SHQ)' from $(SHQ)'$2$(SHQ)' @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + $(TEST) ! -d $$@ || $(RD) $$@ $(SVN) checkout $2 $$@ up-$1: @@ -105,8 +107,8 @@ $1: @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo +++ Creating[cvs]: $(SHQ)'$$@$(SHQ)' from $(SHQ)'$2$(SHQ)' @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - $(RD) $$@ - $(CVS) -z3 -d:$2 co $$@ + $(TEST) ! -d $$@ || $(RD) $$@ + pushd $$(@D) && $(CVS) -z3 -d:$2 co $$(@F) up-$1: @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -134,7 +136,7 @@ $1: @echo +++ Creating[git]: $(SHQ)'$$@$(SHQ)' from $(SHQ)'$2$(SHQ)' @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ifeq (,$(filter http:% https:%,$2)) - $(RD) $$@ + $(TEST) ! -d $$@ || $(RD) $$@ endif $(GIT) clone $2 $$@ @@ -151,13 +153,21 @@ endef define BZR_TMPL .PHONY: pull-$1 update: pull-$1 -subrepos: $1 -clean-subrepos: $1 +ifneq (,$(filter http:% https:%,$2)) + subrepos: $1 + clean-subrepos: $1 +else + .PHONY: $1 + initrepos: $1 +endif DIR-$1 := $1 $1: @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo +++ Creating[bzr]: $(SHQ)'$$@$(SHQ)' from $(SHQ)'$2$(SHQ)' @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +ifeq (,$(filter http:% https:%,$2)) + $(TEST) ! -d $$@ || $(RD) $$@ +endif $(BZR) branch $2 $$@ pull-$1: