summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2007-11-02 13:33:04 +0100
committerJonas Smedegaard <dr@jones.dk>2007-11-02 13:33:04 +0100
commit0a47a506c73f56a003d478c6b27f147d2a2ecb31 (patch)
treeaae9692f37697b0572ea256ab2bca35d4cb52f08 /Makefile
parent6fa3064fb5115e91cce64ab56c0b3b5c14b8b368 (diff)
Extend Makefile to support updating repositories with subsequent bare make invocations.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 9775eb1..b2072eb 100644
--- a/Makefile
+++ b/Makefile
@@ -19,10 +19,16 @@ all: $(underlays) $(dummies)
$(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@))
$(underlays): underlay=$(@:%_l10n/$(locale)=%)
$(underlays):
- mkdir -p $@
- cd $@ && git init
- cd $@ && git remote add -f -t $(master) -m $(master) origin $(origin)
- cd $@ && git merge origin
+ @mkdir -p $@
+ @if [ -d "$@/.git" ]; then \
+ cd $@ && \
+ git pull; \
+ else \
+ cd $@ && \
+ git init && \
+ git remote add -f -t $(master) -m $(master) origin $(origin) && \
+ git merge origin; \
+ fi
$(dummies):
mkdir -p $@
@@ -32,3 +38,5 @@ ultraclean:
rm -rf $(underlays)
rm -rf $(dir $(underlays_l10n))
rm -rf $(dummies)
+
+.PHONY: $(underlays)