[cheese/build-system-rewrite: 3/8] Convert libcheese to build non-recursively
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/build-system-rewrite: 3/8] Convert libcheese to build non-recursively
- Date: Sun, 16 Oct 2011 16:30:33 +0000 (UTC)
commit 2021561abc684b85ae7917c762b31a2d40ad4ee3
Author: David King <amigadave amigadave com>
Date: Thu Oct 13 16:20:04 2011 +0200
Convert libcheese to build non-recursively
Makefile.am | 190 +++++++++++++++++++++++++++++-
configure.ac | 1 -
libcheese/cheese-camera-device-monitor.c | 2 +-
libcheese/cheese-widget.c | 2 +-
4 files changed, 190 insertions(+), 5 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 9264dde..f059dc2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,181 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-SUBDIRS = libcheese src tests po data help docs
+SUBDIRS = src tests po data help docs
+
+marshal_data = \
+ libcheese/cheese-marshal.c \
+ libcheese/cheese-marshal.h
+
+libcheese/cheese-marshal.h: libcheese/cheese-marshal.list
+ $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=cheese_marshal $< > $@
+
+libcheese/cheese-marshal.c: libcheese/cheese-marshal.list libcheese/cheese-marshal.h
+ $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --body --prefix=cheese_marshal $< > $@
+
+enum_data = \
+ libcheese/cheese-enums.c \
+ libcheese/cheese-enums.h
+
+cheese_enum_headers = \
+ $(top_srcdir)/libcheese/cheese-widget.h
+
+libcheese/cheese-enums.c: $(cheese_enum_headers) libcheese/cheese-enums.h
+ $(AM_V_GEN)$(GLIB_MKENUMS) \
+ --fhead "#include \"cheese-enums.h\"\n\n" \
+ --fprod "/* enumerations from \"@filename \" */\n" \
+ --fprod "#include \"@filename \"\n" \
+ --vhead "GType\n enum_name@_get_type (void)\n{\n" \
+ --vhead " static GType type = 0;\n\n" \
+ --vhead " if (!type)\n {\n" \
+ --vhead " static const G Type@Value _ enum_name@_values[] = {" \
+ --vprod " { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
+ --vtail " { 0, NULL, NULL }\n };\n\n" \
+ --vtail " type = g_ type@_register_static (\"@EnumName \", _ enum_name@_values);\n }\n\n" \
+ --vtail " return type;\n}\n\n" \
+ $(cheese_enum_headers) > $@
+
+libcheese/cheese-enums.h: $(cheese_enum_headers)
+ $(AM_V_GEN)$(GLIB_MKENUMS) \
+ --fhead "#ifndef CHEESE_ENUMS_H_\n" \
+ --fhead "#define CHEESE_ENUMS_H_\n\n" \
+ --fhead "#include <glib-object.h>\n\n" \
+ --fhead "G_BEGIN_DECLS\n\n" \
+ --fprod "/* enumerations from @filename@ */\n" \
+ --vhead "GType @enum_name _get_type (void) G_GNUC_CONST;\n" \
+ --vhead "#define CHEESE_TYPE_ ENUMSHORT@ (@enum_name _get_type())\n" \
+ --ftail "G_END_DECLS\n\n" \
+ --ftail "#endif /* CHEESE_ENUMS_H_ */" \
+ $(cheese_enum_headers) > $@
+
+AM_CPPFLAGS = \
+ -DDATADIR=\"$(datadir)\" \
+ -DPREFIX=\""$(prefix)"\" \
+ -DSYSCONFDIR=\""$(sysconfdir)"\" \
+ -DLIBDIR=\""$(libdir)"\" \
+ -DPACKAGE_DATADIR=\""$(pkgdatadir)"\" \
+ -DPACKAGE_LOCALEDIR=\""$(datadir)"\" \
+ -DGNOME_DESKTOP_USE_UNSTABLE_API=1 \
+ $(CHEESE_CFLAGS) \
+ $(CHEESE_GTK_FLAGS) \
+ $(CHEESE_WFLAGS)
+
+lib_LTLIBRARIES = libcheese.la libcheese-gtk.la
+
+libcheese_gtk_la_CFLAGS = \
+ $(CHEESE_CFLAGS) \
+ $(CHEESE_GTK_CFLAGS) \
+ $(CHEESE_WFLAGS)
+
+libcheese_gtk_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -I$(top_builddir) \
+ -I$(top_builddir)/libcheese \
+ -I$(top_srcdir)/libcheese \
+ -I$(top_srcdir)/src
+
+libcheese_gtk_la_LIBADD = \
+ libcheese.la \
+ $(CHEESE_LIBS) \
+ $(CHEESE_GTK_LIBS)
+
+libcheese_gtk_la_LDFLAGS = \
+ -version-info $(LIBCHEESE_GTK_LT_VERSION) \
+ -export-symbols $(top_srcdir)/libcheese/cheese-gtk.symbols \
+ -no-undefined \
+ $(AM_LDFLAGS)
+
+libcheese_gtk_la_SOURCES = \
+ libcheese/cheese-avatar-chooser.c \
+ libcheese/cheese-aspect-frame.c \
+ libcheese/cheese-flash.c \
+ libcheese/cheese-widget.c \
+ libcheese/um-crop-area.c
+
+noinst_libcheese_gtk_headers = \
+ libcheese/cheese-aspect-frame.h \
+ libcheese/cheese-avatar-chooser.h \
+ libcheese/cheese-flash.h \
+ libcheese/cheese-widget.h \
+ libcheese/cheese-widget-private.h \
+ libcheese/um-crop-area.h
+
+libcheese_la_CFLAGS = \
+ $(CHEESE_CFLAGS) \
+ $(CHEESE_GTK_CFLAGS) \
+ $(CHEESE_WFLAGS)
+
+libcheese_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -I$(top_builddir) \
+ -I$(top_builddir)/libcheese \
+ -I$(top_srcdir)/libcheese
+
+libcheese_la_LIBADD = \
+ $(CHEESE_LIBS)
+
+libcheese_la_LDFLAGS = \
+ -version-info $(LIBCHEESE_LT_VERSION) \
+ $(AM_LDFLAGS)
+
+libcheese_la_SOURCES = \
+ libcheese/cheese-enums.c \
+ libcheese/cheese-marshal.c \
+ libcheese/cheese-camera.c \
+ libcheese/cheese-camera-device.c \
+ libcheese/cheese-camera-device-monitor.c \
+ libcheese/cheese-effect.c \
+ libcheese/cheese-fileutil.c
+
+noinst_libcheese_headers = \
+ libcheese/cheese-camera.h \
+ libcheese/cheese-camera-device.h \
+ libcheese/cheese-camera-device-monitor.h \
+ libcheese/cheese-effect.h \
+ libcheese/cheese-fileutil.h
+
+# FIXME when we have a .pc file, and sonames
+cheesedir = $(includedir)/cheese
+cheese_HEADERS = \
+ libcheese/cheese-avatar-chooser.h \
+ libcheese/cheese-camera.h \
+ libcheese/cheese-camera-device.h \
+ libcheese/cheese-camera-device-monitor.h \
+ libcheese/cheese-effect.h \
+ libcheese/cheese-widget.h
+
+if HAVE_INTROSPECTION
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir)
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_srcdir) --warn-all
+
+INTROSPECTION_GIRS = Cheese-3.0.gir
+
+Cheese-3.0.gir: libcheese.la
+Cheese_3_0_gir_CFLAGS = \
+ -I$(srcdir) \
+ $(INCLUDES) \
+ $(CHEESE_CFLAGS)
+Cheese_3_0_gir_FILES = \
+ $(libcheese_la_SOURCES) \
+ libcheese/cheese-marshal.h \
+ libcheese/cheese-enums.h
+Cheese_3_0_gir_INCLUDES = \
+ GObject-2.0 \
+ GLib-2.0 \
+ Gst-0.10 \
+ GstBase-0.10 \
+ cairo-1.0 \
+ Clutter-1.0 \
+ GdkPixbuf-2.0
+Cheese_3_0_gir_LIBS = libcheese.la
+Cheese_3_0_gir_SCANNERFLAGS = --verbose --warn-all --pkg-export cheese
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = Cheese-3.0.typelib
+endif
dist_noinst_DATA = \
build-aux/gnome-doc-utils.make \
@@ -8,15 +183,26 @@ dist_noinst_DATA = \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
+ $(noinst_libcheese_headers) \
+ $(noinst_libcheese_gtk_headers) \
+ libcheese/cheese-gtk.symbols \
+ libcheese/cheese-marshal.list \
m4/introspection.m4 \
dist_noinst_SCRIPTS = \
autogen.sh
+CLEANFILES = \
+ $(marshal_data) \
+ $(enum_data) \
+ $(gir_DATA) \
+ $(typelib_DATA)
+
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
- intltool-update
+ intltool-update \
+ po/.intltool-merge-cache
MAINTAINERCLEANFILES = \
build-aux/compile \
diff --git a/configure.ac b/configure.ac
index b675d5a..43d963e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,7 +193,6 @@ data/icons/48x48/actions/Makefile
data/icons/scalable/actions/Makefile
data/pixmaps/Makefile
help/Makefile
-libcheese/Makefile
src/Makefile
tests/Makefile
po/Makefile.in
diff --git a/libcheese/cheese-camera-device-monitor.c b/libcheese/cheese-camera-device-monitor.c
index 45f3083..7b02be0 100644
--- a/libcheese/cheese-camera-device-monitor.c
+++ b/libcheese/cheese-camera-device-monitor.c
@@ -360,7 +360,7 @@ cheese_camera_device_monitor_class_init (CheeseCameraDeviceMonitorClass *klass)
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (CheeseCameraDeviceMonitorClass, added),
NULL, NULL,
- _cheese_marshal_VOID__STRING_STRING_STRING_INT,
+ cheese_marshal_VOID__STRING_STRING_STRING_INT,
G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT);
/**
diff --git a/libcheese/cheese-widget.c b/libcheese/cheese-widget.c
index 3ce7e86..0f7bd5f 100644
--- a/libcheese/cheese-widget.c
+++ b/libcheese/cheese-widget.c
@@ -25,7 +25,7 @@
#include "cheese-widget.h"
#include "cheese-camera.h"
-#include "cheese-enum-types.h"
+#include "cheese-enums.h"
#include "cheese-aspect-frame.h"
enum
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]