[telepathy-doc/master] Only rsync files that are listed as source

Davyd Madeley davyd at madeley.id.au
Tue Apr 7 00:47:18 PDT 2009


---
 .gitignore                                         |    1 +
 docs/book/Makefile.am                              |    5 +++-
 docs/examples/.gitignore                           |    1 +
 docs/examples/Makefile.am                          |   26 +++++--------------
 docs/examples/glib_get_roster/Makefile.am          |    2 +
 .../glib_get_user_defined_groups/Makefile.am       |    2 +
 docs/examples/glib_list_protocols/Makefile.am      |    2 +
 docs/examples/glib_salut_ft/Makefile.am            |    2 +
 docs/examples/pygtk_chat_client/Makefile.am        |    2 +
 docs/examples/python_get_parameters/Makefile.am    |    2 +
 docs/examples/python_iface_messaging/Makefile.am   |    2 +
 docs/examples/python_irc_roomlist/Makefile.am      |    2 +
 docs/examples/python_simple_presence/Makefile.am   |    2 +
 docs/rsync-dist.make                               |    7 +++++
 14 files changed, 38 insertions(+), 20 deletions(-)
 create mode 100644 docs/rsync-dist.make

diff --git a/.gitignore b/.gitignore
index 5d716b6..9f246f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ configure
 depcomp
 *.sw?
 *.pyc
+/py-compile
diff --git a/docs/book/Makefile.am b/docs/book/Makefile.am
index 4ac4dd6..7800133 100644
--- a/docs/book/Makefile.am
+++ b/docs/book/Makefile.am
@@ -68,7 +68,8 @@ xslt/db2html.xsl: xslt/db2html.xsl.in
 html/index.html: $(MAIN) Makefile.am $(DOCBOOK_STYLESHEET) $(DOC_FIGURES) figures-png
 	rm -rf html
 	$(mkinstalldirs) html
-	cp -r ../examples/ html/
+	$(MAKE) -C ../examples prep-rsync
+	mv ../examples/dist html/examples
 	cp -r C/figures html/
 	$(mkinstalldirs) html/icons
 	cp $(ICONS_DIR)/* html/icons/
@@ -125,3 +126,5 @@ post-pdf: pdf
 
 CLEANFILES = C/telepathy-with-examples.xml
 EXTRA_DIST = 
+
+.PHONY: html pdf validate raw-validate post-online post-html post-pdf
diff --git a/docs/examples/.gitignore b/docs/examples/.gitignore
index b330614..801bbe4 100644
--- a/docs/examples/.gitignore
+++ b/docs/examples/.gitignore
@@ -1,3 +1,4 @@
 */.deps/
 *.o
 example
+/dist/
diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am
index 24e55e4..bb94399 100644
--- a/docs/examples/Makefile.am
+++ b/docs/examples/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/docs/rsync-properties.make
-
 example_dirs = \
 	glib_list_protocols \
 	glib_get_user_defined_groups \
@@ -13,21 +11,11 @@ example_dirs = \
 
 SUBDIRS = $(example_dirs)
 
-exclude_args = \
-	--delete-excluded \
-	--exclude *.o \
-	--exclude .libs \
-	--exclude .deps \
-	--exclude core \
-	--exclude .cvsignore \
-	--exclude a.out \
-	--exclude Makefile \
-	--exclude Makefile.in \
-	--exclude example \
-	--exclude .svn \
-	--exclude .git
-
-post-html:
-	rsync $(rsync_args) -a $(exclude_args) $(example_dirs) $(rsync_target_html)/examples/
-
+prep-rsync:
+	rm -rf $(builddir)/dist/
+	mkdir -p $(builddir)/dist/
+	for subdir in $(example_dirs); do \
+		$(MAKE) -C $$subdir $@ DIR=$(builddir)/dist/$$subdir; \
+	done
 
+.PHONY: prep-rsync
diff --git a/docs/examples/glib_get_roster/Makefile.am b/docs/examples/glib_get_roster/Makefile.am
index 2fa83cd..409e2b6 100644
--- a/docs/examples/glib_get_roster/Makefile.am
+++ b/docs/examples/glib_get_roster/Makefile.am
@@ -5,3 +5,5 @@ noinst_PROGRAMS = example
 
 example_SOURCES = \
 	example.c
+
+include $(top_srcdir)/docs/rsync-dist.make
diff --git a/docs/examples/glib_get_user_defined_groups/Makefile.am b/docs/examples/glib_get_user_defined_groups/Makefile.am
index 2fa83cd..409e2b6 100644
--- a/docs/examples/glib_get_user_defined_groups/Makefile.am
+++ b/docs/examples/glib_get_user_defined_groups/Makefile.am
@@ -5,3 +5,5 @@ noinst_PROGRAMS = example
 
 example_SOURCES = \
 	example.c
+
+include $(top_srcdir)/docs/rsync-dist.make
diff --git a/docs/examples/glib_list_protocols/Makefile.am b/docs/examples/glib_list_protocols/Makefile.am
index 2fa83cd..409e2b6 100644
--- a/docs/examples/glib_list_protocols/Makefile.am
+++ b/docs/examples/glib_list_protocols/Makefile.am
@@ -5,3 +5,5 @@ noinst_PROGRAMS = example
 
 example_SOURCES = \
 	example.c
+
+include $(top_srcdir)/docs/rsync-dist.make
diff --git a/docs/examples/glib_salut_ft/Makefile.am b/docs/examples/glib_salut_ft/Makefile.am
index 2fa83cd..409e2b6 100644
--- a/docs/examples/glib_salut_ft/Makefile.am
+++ b/docs/examples/glib_salut_ft/Makefile.am
@@ -5,3 +5,5 @@ noinst_PROGRAMS = example
 
 example_SOURCES = \
 	example.c
+
+include $(top_srcdir)/docs/rsync-dist.make
diff --git a/docs/examples/pygtk_chat_client/Makefile.am b/docs/examples/pygtk_chat_client/Makefile.am
index d1abd0a..3c4dfdb 100644
--- a/docs/examples/pygtk_chat_client/Makefile.am
+++ b/docs/examples/pygtk_chat_client/Makefile.am
@@ -2,3 +2,5 @@ noinst_PYTHON = \
 	ChatWindow.py \
 	RosterWindow.py \
 	example.py
+
+include $(top_srcdir)/docs/rsync-dist.make
diff --git a/docs/examples/python_get_parameters/Makefile.am b/docs/examples/python_get_parameters/Makefile.am
index cd7e793..055ac8b 100644
--- a/docs/examples/python_get_parameters/Makefile.am
+++ b/docs/examples/python_get_parameters/Makefile.am
@@ -1,2 +1,4 @@
 noinst_PYTHON = \
 	example.py
+
+include $(top_srcdir)/docs/rsync-dist.make
diff --git a/docs/examples/python_iface_messaging/Makefile.am b/docs/examples/python_iface_messaging/Makefile.am
index cd7e793..055ac8b 100644
--- a/docs/examples/python_iface_messaging/Makefile.am
+++ b/docs/examples/python_iface_messaging/Makefile.am
@@ -1,2 +1,4 @@
 noinst_PYTHON = \
 	example.py
+
+include $(top_srcdir)/docs/rsync-dist.make
diff --git a/docs/examples/python_irc_roomlist/Makefile.am b/docs/examples/python_irc_roomlist/Makefile.am
index cd7e793..055ac8b 100644
--- a/docs/examples/python_irc_roomlist/Makefile.am
+++ b/docs/examples/python_irc_roomlist/Makefile.am
@@ -1,2 +1,4 @@
 noinst_PYTHON = \
 	example.py
+
+include $(top_srcdir)/docs/rsync-dist.make
diff --git a/docs/examples/python_simple_presence/Makefile.am b/docs/examples/python_simple_presence/Makefile.am
index cd7e793..055ac8b 100644
--- a/docs/examples/python_simple_presence/Makefile.am
+++ b/docs/examples/python_simple_presence/Makefile.am
@@ -1,2 +1,4 @@
 noinst_PYTHON = \
 	example.py
+
+include $(top_srcdir)/docs/rsync-dist.make
diff --git a/docs/rsync-dist.make b/docs/rsync-dist.make
new file mode 100644
index 0000000..7d9a0dd
--- /dev/null
+++ b/docs/rsync-dist.make
@@ -0,0 +1,7 @@
+prep-rsync:
+	mkdir -p ../$(DIR)
+	for file in $(DIST_SOURCES) $(noinst_PYTHON); do \
+		$(INSTALL) $$file ../$(DIR); \
+	done
+
+.PHONY: prep-rsync
-- 
1.5.6.5




More information about the telepathy-commits mailing list