[gtkmm] Bring back demos/ and make it non-recursive



commit 35d02d5fe2ab1a768508b9482cce584816ea1a14
Author: Daniel Elstner <daniel kitta gmail com>
Date:   Thu Aug 13 00:42:09 2009 +0200

    Bring back demos/ and make it non-recursive
    
    * configure.ac (AC_CONFIG_FILES): Add output file demos/Makefile.
    * Makefile.am (SUBDIRS): Recurse into demos/ subdirectory again.
    * demos/Makefile.am: Overhaul, modernize and make non-recursive.
    Build the demo program targets on make check instead of make all.
    Install all gtkmm-demo source files, as there is little point in
    not shipping the full compilable set.  Stop installing gtkmm-demo
    for now.  Do we really need this installed?
    * demos/gtk-demo/Makefile.am: Delete now unused file.

 ChangeLog                  |   13 ++++++
 Makefile.am                |    2 +-
 configure.ac               |    1 +
 demos/Makefile.am          |  103 ++++++++++++++++++++++++++++++++++----------
 demos/gtk-demo/Makefile.am |   72 ------------------------------
 5 files changed, 95 insertions(+), 96 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 421a8fd..c7a0a65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2009-08-12  Daniel Elstner  <danielk openismus com>
 
+	Bring back demos/ and make it non-recursive
+
+	* configure.ac (AC_CONFIG_FILES): Add output file demos/Makefile.
+	* Makefile.am (SUBDIRS): Recurse into demos/ subdirectory again.
+	* demos/Makefile.am: Overhaul, modernize and make non-recursive.
+	Build the demo program targets on make check instead of make all.
+	Install all gtkmm-demo source files, as there is little point in
+	not shipping the full compilable set.  Stop installing gtkmm-demo
+	for now.  Do we really need this installed?
+	* demos/gtk-demo/Makefile.am: Delete now unused file.
+
+2009-08-12  Daniel Elstner  <danielk openismus com>
+
 	Fix GLIBMM vs GTKMM typo
 
 	* gtk/gtkmm/Makefile.am (AM_CXXFLAGS): It's $(GTKMM_WXXFLAGS).
diff --git a/Makefile.am b/Makefile.am
index 96f728c..f7d8e5d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,7 +37,7 @@ doc_subdirs = docs
 else
 doc_subdirs =
 endif
-SUBDIRS = $(src_subdirs) $(atk_built_subdir) gdk/gdkmm gtk/gtkmm tests $(doc_subdirs)
+SUBDIRS = $(src_subdirs) $(atk_built_subdir) gdk/gdkmm gtk/gtkmm tests demos $(doc_subdirs)
 DIST_SUBDIRS = tools atk/src gdk/src gtk/src atk/atkmm gdk/gdkmm gtk/gtkmm tests demos docs scripts
 
 if GTKMM_ATKMM_ENABLED
diff --git a/configure.ac b/configure.ac
index 681cb61..2a33462 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,6 +141,7 @@ AC_CONFIG_FILES([
 ])
 
 AC_CONFIG_FILES([
+  demos/Makefile
   tests/Makefile
     tests/child_widget/Makefile
     tests/child_widget2/Makefile
diff --git a/demos/Makefile.am b/demos/Makefile.am
index 0dbdada..21e0020 100644
--- a/demos/Makefile.am
+++ b/demos/Makefile.am
@@ -1,35 +1,92 @@
-SUBDIRS		= gtk-demo
+## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
+##
+## This file is part of gtkmm.
+##
+## gtkmm 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.
+##
+## gtkmm 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/>.
 
-pixmap_files	= background.jpg apple-red.png gnome-applets.png	\
-		  gnome-foot.png gnome-gmush.png gnu-keys.png		\
-		  gnome-calendar.png gnome-gimp.png gnome-gsame.png
+AUTOMAKE_OPTIONS = subdir-objects
 
-EXTRA_DIST	= README $(pixmap_files)
-
-
-noinst_PROGRAMS	= pixbuf-demo
+check_PROGRAMS = pixbuf-demo gtk-demo/gtkmm-demo
 
 pixbuf_demo_SOURCES = pixbuf-demo.cc
 
-if GTKMM_ATKMM_ENABLED
-ATKMMINC = -I$(top_builddir)/atk -I$(top_srcdir)/atk
-endif
+gtk_demo_gtkmm_demo_SOURCES =				\
+	gtk-demo/demo-common.cc				\
+	gtk-demo/demo-common.h				\
+	gtk-demo/demos.h				\
+	gtk-demo/demowindow.cc				\
+	gtk-demo/demowindow.h				\
+	gtk-demo/example_appwindow.cc			\
+	gtk-demo/example_buttonbox.cc			\
+	gtk-demo/example_change_display.cc		\
+	gtk-demo/example_colorsel.cc			\
+	gtk-demo/example_dialog.cc			\
+	gtk-demo/example_drawingarea.cc			\
+	gtk-demo/example_iconview.cc			\
+	gtk-demo/example_images.cc			\
+	gtk-demo/example_menus.cc			\
+	gtk-demo/example_panes.cc			\
+	gtk-demo/example_pixbufs.cc			\
+	gtk-demo/example_sizegroup.cc			\
+	gtk-demo/example_stockbrowser.cc		\
+	gtk-demo/example_textview.cc			\
+	gtk-demo/example_treeview_editable_cells.cc	\
+	gtk-demo/example_treeview_liststore.cc		\
+	gtk-demo/example_treeview_treestore.cc		\
+	gtk-demo/example_uimanager.cc			\
+	gtk-demo/main.cc				\
+	gtk-demo/textwidget.cc				\
+	gtk-demo/textwidget.h
 
-#Where to find the header files needed by the source files:
-all_includes = -I$(top_builddir)/gtk -I$(top_srcdir)/gtk \
-               -I$(top_builddir)/gdk -I$(top_srcdir)/gdk \
-               $(ATKMMINC) \
-               $(GTKMM_WXXFLAGS) $(GTKMM_CFLAGS)
+image_files =				\
+	gtk-demo/alphatest.png		\
+	gtk-demo/apple-red.png		\
+	gtk-demo/background.jpg		\
+	gtk-demo/floppybuddy.gif	\
+	gtk-demo/gnome-applets.png	\
+	gtk-demo/gnome-calendar.png	\
+	gtk-demo/gnome-foot.png		\
+	gtk-demo/gnome-fs-directory.png	\
+	gtk-demo/gnome-fs-regular.png	\
+	gtk-demo/gnome-gimp.png		\
+	gtk-demo/gnome-gmush.png	\
+	gtk-demo/gnome-gsame.png	\
+	gtk-demo/gnu-keys.png		\
+	gtk-demo/gtk-logo-rgb.gif
 
-INCLUDES = $(strip $(all_includes))
+democodedir = $(datadir)/$(GTKMM_MODULE_NAME)/demo
+dist_democode_DATA = $(gtk_demo_gtkmm_demo_SOURCES) $(image_files)
 
 if GTKMM_ATKMM_ENABLED
-ATKMMLIB = $(local_atkmm_lib)
+atkmm_includes = -I$(top_builddir)/atk $(if $(srcdir:.=),-I$(top_srcdir)/atk)
+atkmm_ldadd    = $(top_builddir)/atk/atkmm/libatkmm-$(ATKMM_API_VERSION).la
+else
+atkmm_includes =
+atkmm_ldadd    =
 endif
+gdkmm_includes = -I$(top_builddir)/gdk $(if $(srcdir:.=),-I$(top_srcdir)/gdk)
+gdkmm_ldadd    = $(top_builddir)/gdk/gdkmm/libgdkmm-$(GDKMM_API_VERSION).la
+
+gtkmm_includes = -I$(top_builddir)/gtk $(if $(srcdir:.=),-I$(top_srcdir)/gtk)
+gtkmm_ldadd    = $(top_builddir)/gtk/gtkmm/libgtkmm-$(GTKMM_API_VERSION).la
+
+local_includes = -I$(top_builddir) $(atkmm_includes) $(gdkmm_includes) $(gtkmm_includes)
+local_ldadd    = $(atkmm_ldadd) $(gdkmm_ldadd) $(gtkmm_ldadd)
+local_cppflags = -DDEMOCODEDIR=\""$(democodedir)"\"
 
-#The libraries that the executable needs to link against:
-LIBS = $(ATKMMLIB) \
-       $(top_builddir)/gdk/gdkmm/libgdkmm-2.4.la \
-       $(top_builddir)/gtk/gtkmm/libgtkmm-2.4.la \
-       $(GTKMM_LIBS)
+AM_CPPFLAGS = $(local_includes) $(GTHREAD_CFLAGS) $(GTKMM_CFLAGS) $(local_cppflags)
+AM_CXXFLAGS = $(GTKMM_WXXFLAGS)
 
+pixbuf_demo_LDADD         = $(GTKMM_LIBS) $(local_ldadd)
+gtk_demo_gtkmm_demo_LDADD = $(GTKMM_LIBS) $(local_ldadd)



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