[glibmm] Convert examples/ sub-tree to non-recursive build



commit 1eab10eaec738e1987b3f402929b3539ef2e6382
Author: Daniel Elstner <danielk openismus com>
Date:   Sun Aug 9 10:25:39 2009 +0200

    Convert examples/ sub-tree to non-recursive build
    
    * examples/Makefile.am: Rewrite to a non-recursive build of
    all example programs with a single control file.  Hook the
    build of the example programs to the make check target.
    * examples/Makefile.am_fragment: Delete obsolete file.
    * examples/*/Makefile.am: Delete obsolete files.
    * examples/README: Delete file, as it was empty anyway apart
    from a single whitespace character.
    * configure.ac (AC_CONFIG_FILES): Remove examples/*/Makefile
    output files from the list.

 ChangeLog                             |   14 ++++++
 configure.ac                          |   11 -----
 examples/Makefile.am                  |   77 +++++++++++++++++++++++++++------
 examples/Makefile.am_fragment         |   43 ------------------
 examples/README                       |    1 -
 examples/child_watch/Makefile.am      |   11 -----
 examples/compose/Makefile.am          |    6 ---
 examples/iochannel_stream/Makefile.am |   11 -----
 examples/keyfile/Makefile.am          |    7 ---
 examples/markup/Makefile.am           |    8 ---
 examples/network_io/Makefile.am       |    8 ---
 examples/options/Makefile.am          |    6 ---
 examples/properties/Makefile.am       |    6 ---
 examples/regex/Makefile.am            |    6 ---
 examples/thread/Makefile.am           |   19 --------
 15 files changed, 78 insertions(+), 156 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6e2a550..caf96dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2009-08-09  Daniel Elstner  <danielk openismus com>
 
+	Convert examples/ sub-tree to non-recursive build
+
+	* examples/Makefile.am: Rewrite to a non-recursive build of
+	all example programs with a single control file.  Hook the
+	build of the example programs to the make check target.
+	* examples/Makefile.am_fragment: Delete obsolete file.
+	* examples/*/Makefile.am: Delete obsolete files.
+	* examples/README: Delete file, as it was empty anyway apart
+	from a single whitespace character.
+	* configure.ac (AC_CONFIG_FILES): Remove examples/*/Makefile
+	output files from the list.
+
+2009-08-09  Daniel Elstner  <danielk openismus com>
+
 	Convert tests/ sub-tree to non-recursive build
 
 	* tests/Makefile.am: Rewrite to a non-recursive build of all
diff --git a/configure.ac b/configure.ac
index a6542f1..a8cd4c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,18 +171,7 @@ AC_CONFIG_FILES([
 
 AC_CONFIG_FILES([
   tests/Makefile
-
   examples/Makefile
-    examples/compose/Makefile
-    examples/keyfile/Makefile
-    examples/markup/Makefile
-    examples/options/Makefile
-    examples/properties/Makefile
-    examples/thread/Makefile
-    examples/iochannel_stream/Makefile
-    examples/child_watch/Makefile
-    examples/regex/Makefile
-    examples/network_io/Makefile
 
   docs/Makefile
     docs/images/Makefile
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 46fcd26..5d69948 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,21 +1,72 @@
-example_dirs = child_watch compose iochannel_stream markup options properties regex thread keyfile network_io
+## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
+##
+## This file is part of glibmm.
+##
+## glibmm is free software: you can redistribute it and/or modify it
+## under the terms of the GNU Lesser General Public License as published
+## by the Free Software Foundation, either version 2.1 of the License,
+## or (at your option) any later version.
+##
+## glibmm is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+## See the GNU Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public License
+## along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
-# These use gtkmm stuff:
-# thread
+AUTOMAKE_OPTIONS = subdir-objects
 
-SUBDIRS = $(example_dirs)
-EXTRA_DIST = README Makefile.am_fragment
+check_PROGRAMS =			\
+	child_watch/child_watch		\
+	compose/example			\
+	iochannel_stream/example	\
+	keyfile/example			\
+	markup/parser			\
+	network_io/resolve		\
+	options/example			\
+	properties/example		\
+	regex/example			\
+	thread/dispatcher		\
+	thread/dispatcher2		\
+	thread/thread			\
+	thread/threadpool
 
-#Web upload:
-include $(top_srcdir)/docs/Makefile_web.am_fragment
+glibmm_includes = -I$(top_builddir)/glib $(if $(srcdir:.=),-I$(top_srcdir)/glib)
+giomm_includes  = -I$(top_builddir)/gio $(if $(srcdir:.=),-I$(top_srcdir)/gio)
+local_cppflags  = -I$(top_builddir) $(glibmm_includes) $(giomm_includes)
 
-web_path = $(web_path_gtkmm)examples
+AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS) $(GIOMM_CFLAGS)
+AM_CXXFLAGS = $(GLIBMM_WXXFLAGS)
 
-#rsync --cvs-exclude ignores *.o and anything in .cvsignore and some more:
-rsync_options = -vzr --rsh ssh --cvs-exclude --delete-excluded --exclude=.libs --exclude=.deps --exclude=core --exclude=.cvsignore --exclude=a.out --exclude=Makefile --exclude=Makefile.in
+local_libglibmm = $(top_builddir)/glib/glibmm/libglibmm-$(GLIBMM_API_VERSION).la
+local_libgiomm  = $(top_builddir)/gio/giomm/libgiomm-$(GIOMM_API_VERSION).la
 
-post-html:
-	rsync $(rsync_options) $(example_dirs) $$USER $(web_host):$(web_path)
+LDADD        = $(GLIBMM_LIBS) $(local_libglibmm)
+giomm_ldadd  = $(GIOMM_LIBS) $(local_libglibmm) $(local_libgiomm)
+thread_ldadd = $(GTHREAD_LIBS) $(GLIBMM_LIBS) $(local_libglibmm)
 
-.PHONY: post-html
+child_watch_child_watch_SOURCES  = child_watch/main.cc
+iochannel_stream_example_SOURCES =	\
+	iochannel_stream/fdstream.cc	\
+	iochannel_stream/fdstream.h	\
+	iochannel_stream/main.cc
 
+compose_example_SOURCES    = compose/main.cc
+keyfile_example_SOURCES    = keyfile/main.cc
+markup_parser_SOURCES      = markup/parser.cc
+options_example_SOURCES    = options/main.cc
+properties_example_SOURCES = properties/properties_example.cc
+regex_example_SOURCES      = regex/main.cc
+
+thread_dispatcher_SOURCES  = thread/dispatcher.cc
+thread_dispatcher_LDADD    = $(thread_ldadd)
+thread_dispatcher2_SOURCES = thread/dispatcher2.cc
+thread_dispatcher2_LDADD   = $(thread_ldadd)
+thread_thread_SOURCES      = thread/thread.cc
+thread_thread_LDADD        = $(thread_ldadd)
+thread_threadpool_SOURCES  = thread/threadpool.cc
+thread_threadpool_LDADD    = $(thread_ldadd)
+
+network_io_resolve_SOURCES = network_io/resolve.cc
+network_io_resolve_LDADD   = $(giomm_ldadd)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]