summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-06-14 13:25:45 +0200
committerJonas Smedegaard <dr@jones.dk>2008-06-14 13:25:45 +0200
commit84d7ec94513943eb534f44555e5f7c3e700b0a01 (patch)
tree9927efd44e14663fd3e98d866d10c42854b3f3aa
parent1da62670810ccb26988c676982ab29d3f407183f (diff)
Let git init target do init (we don't use it anyway currently).
-rw-r--r--make/git.mk10
-rw-r--r--make/rules.mk3
2 files changed, 4 insertions, 9 deletions
diff --git a/make/git.mk b/make/git.mk
index 068e7f3..0059448 100644
--- a/make/git.mk
+++ b/make/git.mk
@@ -17,13 +17,9 @@ update:
$(if $(noncurrentbranches),$(foreach branch,$(noncurrentbranches),git branch -f "$(branch)" "$(origin)/$(branch)" && git checkout "$(branch)" && git merge --no-commit "$(origin)" &&) git checkout "$(master)")
init:
-# Assume that initial cloning is done already when invoking this target
-# git init
-# git remote add -f -t "$(master)" -m "$(master)" origin "$(origin)"
-# git merge origin
+ git init
+ git remote add -f -m "$(master)" origin "$(origin)"
+ git merge origin
# git config remote.origin.push +"refs/heads/$(master)":"refs/heads/$(master)"
- $(if $(filter $(currentbranch),$(master)),,git branch -f "$(master)" "$(origin)/$(master)")
- $(if $(noncurrentbranches),$(foreach branch,$(noncurrentbranches),git branch -f "$(branch)" "$(origin)/$(branch)" &&) true)
- $(if $(filter $(currentbranch),$(master)),,git checkout -f "$(master)")
.PHONY: update init
diff --git a/make/rules.mk b/make/rules.mk
index 2dcfc96..973af61 100644
--- a/make/rules.mk
+++ b/make/rules.mk
@@ -21,14 +21,13 @@ ifneq ($(2),)
$(1): $$(subst module,$(3),$$(masterdir))
endif
-$(1): action = $$(if $(wildcard $(1)/.git),update,init)
$(1): origin = $$(if $(2),$(3),$$(subst MODULE,$(3),$$($(4)_ORIGIN)))
$(1): master = $$(subst -LOCALE,$(2:%=-$(2)),$$($(4)_BRANCH))
$(1): branches = $$(if $(2),,$$(filter-out $$(master),$$($(3)_BRANCHES)))
$(1):
@[ -d "$$(dir $$@)" ] || ( echo mkdir -p "$$(dir $$@)" && mkdir -p "$$(dir $$@)" )
@[ -d "$$@" ] || ( echo git clone "$$(origin)" "$$@" && git clone -o "$(4)" "$$(origin)" "$$@" )
- @$(MAKE) -f "$$(CURDIR)/make/git.mk" -C "$$@" master="$$(master)" branches="$$(branches)" origin="$(4)" "$$(action)"
+ @$(MAKE) -f "$$(CURDIR)/make/git.mk" -C "$$@" master="$$(master)" branches="$$(branches)" origin="$(4)" update
# WARNING: this may wipe unrelated files too!
ultraclean::