diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-30 10:54:45 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-30 11:01:50 +0100 |
commit | 999c713a639a6247fb182425e5e86d043b887807 (patch) | |
tree | 471467835b7528269e10cd4f8cfa3b22709f9790 | |
parent | 66dafdd364b90962cc0a3eb9166c1ea556620a7c (diff) |
documentation: reuse git checkouts for documentation
Instead of doing a fresh git clone of all our modules everytime
you do 'make', keep a checkout cache around and update it.
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | src/htdocs/documentation/Makefile.am | 37 |
3 files changed, 38 insertions, 6 deletions
@@ -1,6 +1,8 @@ Makefile media +cache/ data config.log -config.status +config.status* htdocs/ +*~ @@ -12,6 +12,9 @@ FILE LAYOUT ----------- src/ contains the content source, managed in CVS +cache/ + local git checkouts of our modules for documentation purposes + (can be deleted at any time) data/ contains the rsync'd data diff --git a/src/htdocs/documentation/Makefile.am b/src/htdocs/documentation/Makefile.am index 3858cdf4..1146c53b 100644 --- a/src/htdocs/documentation/Makefile.am +++ b/src/htdocs/documentation/Makefile.am @@ -1,15 +1,42 @@ built_pages = index.html licensing.html rtp.html plugins.html splitup.html gstreamer010.html -plugins.xml: +CHECKOUT_DIR = $(abs_top_builddir)/cache/plugin-inspect-checkouts + +checkoutdir: + echo "Check plugin documentation checkout directory $(CHECKOUT_DIR)"; \ + mkdir -p $(CHECKOUT_DIR) || { \ + echo "Failed to create $(CHECKOUT_DIR)"; \ + exit 1; \ + } + +# Note: using pushd/popd because GIT_DIR doesn't seem to work properly +plugins.xml: checkoutdir for m in gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad gst-plugins-gl; do \ - rm -rf $$m-checkouts.git $$m\-checkouts\-plugins-inspect > /dev/null; \ - git clone --depth 1 git://anongit.freedesktop.org/gstreamer/$$m $$m-checkouts.git; \ - ln -s $$m-checkouts.git/docs/plugins/inspect $$m\-checkouts\-plugins-inspect; \ + moduledir=$(CHECKOUT_DIR)/$$m; \ + if [ -d $$moduledir ] ; then \ + pushd $$moduledir >/dev/null; \ + echo "$$m checkout: cleaning"; \ + git clean -f -d -x || { \ + echo "Cleaning $$m checkout failed"; exit 1; \ + } ; \ + echo "$$m checkout: updating..."; \ + git pull || { \ + echo "Updating $$m checkout failed"; exit 1; \ + } ; \ + popd >/dev/null; \ + else \ + echo "$$m checkout: creating (cloning)"; \ + git clone git://anongit.freedesktop.org/gstreamer/$$m $$moduledir || { \ + echo "git clone failed"; exit 1; \ + } ; \ + fi; \ + rm -f $$m\-checkouts\-plugins-inspect 2> /dev/null; \ + ln -s $$moduledir/docs/plugins/inspect $$m\-checkouts\-plugins-inspect; \ done echo "<plugins>" > plugins.xml cat */*.xml >> plugins.xml echo "</plugins>" >> plugins.xml - rm -rf *-checkouts.git *-checkouts-plugins-inspect + rm -f *-checkouts-plugins-inspect plugins.xml-update: rm -f plugins.xml |