summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: e404bf162844e328a35a0fbd44f2515301e2b0c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = \
	tp-qt4-tools \
	tp-glib-tools \
	docs

if ENABLE_QT4
SUBDIRS += TelepathyYtstenutQt4
endif

if ENABLE_GLIB
SUBDIRS += telepathy-ytstenut-glib
endif

GIT = git
GZIP = gzip
TAR = tar

XMLS = $(wildcard $(srcdir)/spec/*.xml)
TEMPLATES = $(wildcard $(srcdir)/docs/templates/*)
TOOLS = \
	tools/doc-generator.py \
	tools/specparser.py \
	tools/xincludator.py

GENERATED_FILES = \
	docs/spec/index.html \
	docs/telepathy-ytstenut-spec.tar.bz2

docs/spec/index.html: $(XMLS) $(TOOLS) $(TEMPLATES)
	@install -d doc
	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/doc-generator.py $(top_srcdir)/spec/all.xml $(top_builddir)/docs/spec/ $(PACKAGE) com.example.Ytstenut
	@echo '  NOTE  ' file://$$PWD/$@

docs/telepathy-ytstenut-spec.tar.bz2: docs/spec/index.html
	$(AM_V_GEN)tar cjvf $@ --transform s,docs/spec,telepathy-ytstenut-spec, docs/spec

if SPEC_DOCUMENTATION
all: docs/spec/index.html
else
all:
endif

doc-tarball: docs/telepathy-ytstenut-spec.tar.bz2

EXTRA_DIST = $(XMLS) $(TEMPLATES) tools

CLEANFILES = $(GENERATED_FILES) \
	$(wildcard $(srcdir)/tools/*.pyc)

clean-local:
	-rm -rf docs/spec tmp

BRANCH = $(shell sh $(top_srcdir)/tools/git-which-branch.sh misc | tr -d '\n' | tr -C "[:alnum:]" _)
UPLOAD_BRANCH_TO = dhansak.collabora.co.uk:public_html/telepathy-ytstenut

# Usage: make upload-branch BRANCH=discussion
upload-branch: all
	rsync -rzvP $(patsubst %.txt,%.html,$(RST)) docs/spec \
		$(UPLOAD_BRANCH_TO)-$(BRANCH)/
	@echo Your spec branch might be at:
	@echo '  ' http://people.collabora.co.uk/~$$USER/telepathy-ytstenut-$(BRANCH)/spec/