Skip to content

Commit

Permalink
Makefile: add more git support
Browse files Browse the repository at this point in the history
  • Loading branch information
presbrey committed Mar 9, 2012
1 parent 69fd4cb commit 595b711
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
all: update
all: update_submodules
make -C js/rdf all
make -C js/mashup all

.PHONY: all update
update: pull

update:
git submodule update --init
update_submodules:
@@if [ -d .git ]; then \
if git submodule status | grep -q -E '^-'; then \
git submodule update --init --recursive; \
else \
git submodule update --init --recursive --merge; \
fi; \
fi;

pull_submodules:
@@git submodule foreach "git pull \$$(git config remote.origin.url)"
@@git submodule summary

pull: pull_submodules
@@git pull ${REMOTE} ${BRANCH}

gh-pages: all
git branch -D gh-pages ||:
Expand All @@ -28,3 +41,5 @@ status:
writable:
@sed -i -re 's/git:\/\/github.com\//git@github.com:/' .git/config
@make -sC js/rdf writable

.PHONY: all clean update update_submodules pull_submodules pull

0 comments on commit 595b711

Please sign in to comment.