update mk files

This commit is contained in:
Kai Tetzlaff 2012-08-05 22:33:54 +02:00
parent 84bfa93de9
commit e46a2eefcb
3 changed files with 116 additions and 136 deletions

View File

@ -26,6 +26,12 @@ else
emacspath = $(1) emacspath = $(1)
endif endif
HG_DIRS :=
GIT_DIRS :=
BZR_DIRS :=
SVN_DIRS :=
CVS_DIRS :=
#SHELL := sh.exe -x #SHELL := sh.exe -x
#$(error E:$(EMACS)) #$(error E:$(EMACS))
#$(error '$(value fixpath-emacs)' '$(value emacspath)') #$(error '$(value fixpath-emacs)' '$(value emacspath)')

View File

@ -86,18 +86,20 @@ ifneq (,$(or $(ComSpec),$(COMSPEC),$(comspec)))
DIRSEP := $(strip \) DIRSEP := $(strip \)
NULL := nul NULL := nul
fixpath-make = $(subst \,/,$(subst $(sp),?,$(1))) fixpath-make = $(subst \,/,$(subst $(sp),?,$(1)))
MD := mkdir
endif endif
endif endif
HOSTENV ?= unix HOSTENV ?= unix
DIRSEP ?= / DIRSEP ?= /
SHQ ?= $(if T,\) SHQ ?= $(strip \)
fixpath-make ?= $(1) fixpath-make ?= $(1)
fixpath-shell ?= $(1) fixpath-shell ?= $(1)
TEST := test TEST := test
RD ?= rm -rf
RM ?= rm -f RM ?= rm -f
RD ?= rm -rf
MD ?= mkdir -p
NULL ?= $(or $(wildcard /dev/null),nul) NULL ?= $(or $(wildcard /dev/null),nul)

64
vcs.mk
View File

@ -4,27 +4,15 @@ endif
$(call mk-debug-lno,+ included from$(addprefix $(\n) ,$(MAKEFILE_LIST))) $(call mk-debug-lno,+ included from$(addprefix $(\n) ,$(MAKEFILE_LIST)))
.PHONY: updaterepos subrepos clean-subrepos initrepos .PHONY: updaterepos initrepos
all: updaterepos all: updaterepos
initrepos : subrepos
clean-subrepos:
echo $(RD) $^
%/updaterepos: %/updaterepos:
$(MAKE) -C $* $(@F) $(MAKE) -C $* $(@F)
%/initrepos: %/initrepos:
$(MAKE) -C $? $(@F) $(MAKE) -C $* $(@F)
%/subrepos:
$(MAKE) -C $? $(@F)
%/clean-subrepos:
$(MAKE) -C $? $(@F)
HG := hg HG := hg
GIT := git GIT := git
@ -52,14 +40,15 @@ DIR-$(notdir $1) := $1
ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2)) ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2))
.PHONY: pull-$1 .PHONY: pull-$1
updaterepos: pull-$1 updaterepos: pull-$1
subrepos: $1/.hg initrepos: $1/.hg
clean-subrepos: $1/.hg
$1/.hg: $1/.hg:
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@echo +++ Creating[hg]: $(SHQ)'$1$(SHQ)' from $(SHQ)'$2$(SHQ)' @echo +++ Creating[hg]: $(SHQ)'$1$(SHQ)' from $(SHQ)'$2$(SHQ)'
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$(TEST) ! -d $1 || $(RD) $(subst /,$(DIRSEP),$1) $(RD) $(subst /,$(DIRSEP),$1)
$$(pre_init_cmd-$1)
$(HG) clone $2 $1 $(HG) clone $2 $1
$$(post_init_cmd-$1)
pull-$1: pull-$1:
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -78,21 +67,15 @@ DIR-$(notdir $1) := $1
ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2)) ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2))
.PHONY: up-$1 .PHONY: up-$1
updaterepos: up-$1 updaterepos: up-$1
ifneq (,$(filter http:% https:%,$2))
subrepos: $1/.svn
clean-subrepos: $1/.svn
else
.PHONY: $1/.svn
initrepos: $1/.svn initrepos: $1/.svn
endif
$1/.svn: $1/.svn:
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@echo +++ Creating[svn]: $(SHQ)'$1$(SHQ)' from $(SHQ)'$2$(SHQ)' @echo +++ Creating[svn]: $(SHQ)'$1$(SHQ)' from $(SHQ)'$2$(SHQ)'
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ifneq (,$(filter http:% https:%,$2)) $(RD) $(subst /,$(DIRSEP),$1)
$(TEST) ! -d $1 || $(RD) $(subst /,$(DIRSEP),$1) $$(pre_init_cmd-$1)
endif
$(SVN) checkout $2 $1 $(SVN) checkout $2 $1
$$(post_init_cmd-$1)
up-$1: up-$1:
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -110,14 +93,15 @@ DIR-$(notdir $1) := $1
ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2)) ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2))
.PHONY: up-$1 .PHONY: up-$1
updaterepos: up-$1 updaterepos: up-$1
.PHONY: $1/CVS
initrepos: $1/CVS initrepos: $1/CVS
$1/CVS: $1/CVS:
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@echo +++ Creating[cvs]: $(SHQ)'$1$(SHQ)' from $(SHQ)'$2$(SHQ)' @echo +++ Creating[cvs]: $(SHQ)'$1$(SHQ)' from $(SHQ)'$2$(SHQ)'
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$(TEST) ! -d $1/CVS || $(RD) $(subst /,$(DIRSEP),$1) $(RD) $(subst /,$(DIRSEP),$1)
$$(pre_init_cmd-$1)
cd $(subst /,$(DIRSEP),$(dir $1)) && $(CVS) -z3 -d $2 co $(notdir $1) cd $(subst /,$(DIRSEP),$(dir $1)) && $(CVS) -z3 -d $2 co $(notdir $1)
$$(post_init_cmd-$1)
up-$1: up-$1:
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -135,21 +119,15 @@ DIR-$(notdir $1) := $1
ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2)) ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2))
.PHONY: pull-$1 .PHONY: pull-$1
updaterepos: pull-$1 updaterepos: pull-$1
ifneq (,$(filter http:% https:%,$2))
subrepos: $1/.git
clean-subrepos: $1/.git
else
.PHONY: $1/.git
initrepos: $1/.git initrepos: $1/.git
endif
$1/.git: $1/.git:
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@echo +++ Creating[git]: $(SHQ)'$1$(SHQ)' from $(SHQ)'$2$(SHQ)' @echo +++ Creating[git]: $(SHQ)'$1$(SHQ)' from $(SHQ)'$2$(SHQ)'
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ifneq (,$(filter http:% https:%,$2)) $(RD) $(subst /,$(DIRSEP),$1)
$(TEST) ! -d $1 || $(RD) $(subst /,$(DIRSEP),$1) $$(pre_init_cmd-$1)
endif
$(GIT) clone $2 $1 $(GIT) clone $2 $1
$$(post_init_cmd-$1)
pull-$1: pull-$1:
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -167,21 +145,15 @@ DIR-$(notdir $1) := $1
ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2)) ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2))
.PHONY: pull-$1 .PHONY: pull-$1
updaterepos: pull-$1 updaterepos: pull-$1
ifneq (,$(filter http:% https:%,$2))
subrepos: $1/.bzr
clean-subrepos: $1/.bzr
else
.PHONY: $1/.bzr
initrepos: $1/.bzr initrepos: $1/.bzr
endif
$1/.bzr: $1/.bzr:
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@echo +++ Creating[bzr]: $(SHQ)'$1$(SHQ)' from $(SHQ)'$2$(SHQ)' @echo +++ Creating[bzr]: $(SHQ)'$1$(SHQ)' from $(SHQ)'$2$(SHQ)'
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ifneq (,$(filter http:% https:%,$2)) $(RD) $(subst /,$(DIRSEP),$1)
$(TEST) ! -d $1 || $(RD) $(subst /,$(DIRSEP),$1) $$(pre_init_cmd-$1)
endif
$(BZR) branch $2 $1 $(BZR) branch $2 $1
$$(post_init_cmd-$1)
pull-$1: pull-$1:
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++