Documentation/Makefile: create tarballs for the man pages and html files
[jc: rewrote by stealing from what I run to update html and man branches automatically] Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Tilman Sauerbeck committed
May 18, 2006 at 12:57 UTC
52db0495dcb88f38590bc00607052fc5758b07d1
2 files changed
+27
-3
Documentation/install-webdoc.sh
+6
-2
@@ -4,12 +4,16 @@ T="$1"
4
5
for h in *.html *.txt howto/*.txt howto/*.html
6
do
7
- diff -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h" || {
7
+ if test -f "$T/$h" &&
8
+ diff -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h"
9
+ then
10
+ :; # up to date
11
+ else
12
echo >&2 "# install $h $T/$h"
13
rm -f "$T/$h"
14
mkdir -p `dirname "$T/$h"`
15
cp "$h" "$T/$h"
12
- }
16
+ fi
17
done
18
strip_leading=`echo "$T/" | sed -e 's|.|.|g'`
19
for th in "$T"/*.html "$T"/*.txt "$T"/howto/*.txt "$T"/howto/*.html
Makefile
+21
-1
@@ -652,6 +652,25 @@ dist: git.spec git-tar-tree
652
rpm: dist
653
$(RPMBUILD) -ta $(GIT_TARNAME).tar.gz
654
655
+htmldocs = git-htmldocs-$(GIT_VERSION)
656
+manpages = git-manpages-$(GIT_VERSION)
657
+dist-doc:
658
+ rm -fr .doc-tmp-dir
659
+ mkdir .doc-tmp-dir
660
+ $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc
661
+ cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar .
662
+ gzip -n -9 -f $(htmldocs).tar
663
+ :
664
+ rm -fr .doc-tmp-dir
665
+ mkdir .doc-tmp-dir .doc-tmp-dir/man1 .doc-tmp-dir/man7
666
+ $(MAKE) -C Documentation DESTDIR=. \
667
+ man1=../.doc-tmp-dir/man1 \
668
+ man7=../.doc-tmp-dir/man7 \
669
+ install
670
+ cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar .
671
+ gzip -n -9 -f $(manpages).tar
672
+ rm -fr .doc-tmp-dir
673
+
674
### Cleaning rules
675
676
clean:
@@ -659,8 +678,9 @@ clean:
678
$(LIB_FILE) $(XDIFF_LIB)
679
rm -f $(ALL_PROGRAMS) $(BUILT_INS) git$X
680
rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags
662
- rm -rf $(GIT_TARNAME)
681
+ rm -rf $(GIT_TARNAME) .doc-tmp-dir
682
rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
683
+ rm -f $(htmldocs).tar $(manpages).tar
684
$(MAKE) -C Documentation/ clean
685
$(MAKE) -C templates clean
686
$(MAKE) -C t/ clean