]> arthur.barton.de Git - bup.git/blobdiff - Makefile
Merge remote branch 'origin/master' into meta
[bup.git] / Makefile
index a4ca3abad77d389a6fa6f4ce5e4ed3200430c5e6..f95a919492cbbe3952c663a6b83330074eeef1ba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,7 @@ lib/bup/_version.py:
 runtests: all runtests-python runtests-cmdline
 
 runtests-python:
-       $(PYTHON) wvtest.py $(wildcard t/t*.py lib/*/t/t*.py)
+       $(PYTHON) wvtest.py t/t*.py lib/*/t/t*.py
 
 runtests-cmdline: all
        t/test.sh
@@ -104,7 +104,9 @@ bup: main.py
        rm -f $@
        ln -s $< $@
 
-cmds: $(patsubst cmd/%-cmd.py,cmd/bup-%,$(wildcard cmd/*-cmd.py))
+cmds: \
+    $(patsubst cmd/%-cmd.py,cmd/bup-%,$(wildcard cmd/*-cmd.py)) \
+    $(patsubst cmd/%-cmd.sh,cmd/bup-%,$(wildcard cmd/*-cmd.sh))
 
 cmd/bup-%: cmd/%-cmd.py
        rm -f $@
@@ -118,8 +120,41 @@ bup-%: cmd-%.sh
        rm -f $@
        ln -s $< $@
 
+cmd/bup-%: cmd/%-cmd.sh
+       rm -f $@
+       ln -s $*-cmd.sh $@
+
 %.o: %.c
        gcc -c -o $@ $< $(CPPFLAGS) $(CFLAGS)
+       
+# update the local 'man' and 'html' branches with pregenerated output files, for
+# people who don't have pandoc (and maybe to aid in google searches or something)
+export-docs: Documentation/all
+       git update-ref refs/heads/man origin/man '' 2>/dev/null || true
+       git update-ref refs/heads/html origin/html '' 2>/dev/null || true
+       GIT_INDEX_FILE=gitindex.tmp; export GIT_INDEX_FILE; \
+       rm -f $${GIT_INDEX_FILE} && \
+       git add -f Documentation/*.1 && \
+       git update-ref refs/heads/man \
+               $$(echo "Autogenerated man pages for $$(git describe)" \
+                   | git commit-tree $$(git write-tree --prefix=Documentation) \
+                               -p refs/heads/man) && \
+       rm -f $${GIT_INDEX_FILE} && \
+       git add -f Documentation/*.html && \
+       git update-ref refs/heads/html \
+               $$(echo "Autogenerated html pages for $$(git describe)" \
+                   | git commit-tree $$(git write-tree --prefix=Documentation) \
+                               -p refs/heads/html)
+
+# push the pregenerated doc files to origin/man and origin/html
+push-docs: export-docs
+       git push origin man html
+
+# import pregenerated doc files from origin/man and origin/html, in case you
+# don't have pandoc but still want to be able to install the docs.
+import-docs: Documentation/clean
+       git archive origin/html | (cd Documentation; tar -xvf -)
+       git archive origin/man | (cd Documentation; tar -xvf -)
 
 clean: Documentation/clean
        rm -f *.o lib/*/*.o *.so lib/*/*.so *.dll *.exe \