summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2016-06-14 10:16:59 +0800
committerLionel Landwerlin <llandwerlin@gmail.com>2016-06-17 19:47:22 +0100
commit9ef169f5e955866006f7a99c9bacf88d4c9041f1 (patch)
tree6fdd3206bad3d87b0642fe1bdc56648365c2fdb9
parent6c2541092afb732e7f6bab09e9450c9cb8f6fbb0 (diff)
downloadclutter-gst-9ef169f5e955866006f7a99c9bacf88d4c9041f1.tar.gz
build: Allow building in non-srcdir
https://bugzilla.gnome.org/show_bug.cgi?id=767626
-rwxr-xr-xautogen.sh8
-rw-r--r--clutter-gst/Makefile.am66
-rw-r--r--examples/Makefile.am5
-rw-r--r--tests/Makefile.am5
4 files changed, 51 insertions, 33 deletions
diff --git a/autogen.sh b/autogen.sh
index d83f1c4..e6d0664 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,8 @@
#! /bin/sh
-gtkdocize || exit 1
-autoreconf -v --install || exit 1
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+( cd "$srcdir" && gtkdocize ) || exit 1
+( cd "$srcdir" && autoreconf -v --install ) || exit 1
if test -z "$NOCONFIGURE"; then
- ./configure "$@" || exit 1
+ "$srcdir/configure" "$@" || exit 1
fi
diff --git a/clutter-gst/Makefile.am b/clutter-gst/Makefile.am
index 91b406f..45f2cda 100644
--- a/clutter-gst/Makefile.am
+++ b/clutter-gst/Makefile.am
@@ -12,7 +12,10 @@ BUILT_SOURCES = #
# glib-mkenums
glib_enum_h = clutter-gst-enum-types.h
glib_enum_c = clutter-gst-enum-types.c
-glib_enum_headers = $(source_h)
+glib_enum_headers = \
+ $(addprefix $(srcdir)/, $(source_srcdir_h)) \
+ $(addprefix $(builddir)/, $(source_builddir_h)) \
+ $(NULL)
include $(top_srcdir)/build/autotools/Makefile.am.enums
# glib-genmarshal
@@ -20,37 +23,45 @@ glib_marshal_list = clutter-gst-marshal.list
glib_marshal_prefix = _clutter_gst_marshal
include $(top_srcdir)/build/autotools/Makefile.am.marshal
-source_h = \
- $(srcdir)/clutter-gst.h \
- $(srcdir)/clutter-gst-types.h \
- $(srcdir)/clutter-gst-util.h \
- $(srcdir)/clutter-gst-version.h \
- $(srcdir)/clutter-gst-video-sink.h \
- $(srcdir)/clutter-gst-video-texture.h \
- $(srcdir)/clutter-gst-player.h \
+source_srcdir_h = \
+ clutter-gst.h \
+ clutter-gst-types.h \
+ clutter-gst-util.h \
+ clutter-gst-video-sink.h \
+ clutter-gst-video-texture.h \
+ clutter-gst-player.h \
+ $(NULL)
+
+source_builddir_h = \
+ clutter-gst-version.h \
$(NULL)
source_priv_h = \
- $(srcdir)/clutter-gst-debug.h \
- $(srcdir)/clutter-gst-marshal.h \
- $(srcdir)/clutter-gst-private.h \
+ clutter-gst-debug.h \
+ clutter-gst-marshal.h \
+ clutter-gst-private.h \
$(NULL)
source_c = \
- $(srcdir)/clutter-gst-debug.c \
- $(srcdir)/clutter-gst-marshal.c \
- $(srcdir)/clutter-gst-player.c \
- $(srcdir)/clutter-gst-video-sink.c \
- $(srcdir)/clutter-gst-video-texture.c \
- $(srcdir)/clutter-gst-util.c \
- $(glib_enum_c) \
+ clutter-gst-debug.c \
+ clutter-gst-player.c \
+ clutter-gst-video-sink.c \
+ clutter-gst-video-texture.c \
+ clutter-gst-util.c \
+ $(NULL)
+
+source_priv_c = \
+ clutter-gst-marshal.c \
$(NULL)
libclutter_gst_@CLUTTER_GST_MAJORMINOR@_la_SOURCES = \
$(MARSHALFILES) \
+ $(source_priv_c) \
$(source_c) \
$(source_priv_h) \
- $(source_h) \
+ $(source_srcdir_h) \
+ $(source_builddir_h) \
+ $(glib_enum_c) \
$(glib_enum_h) \
$(NULL)
@@ -88,17 +99,20 @@ libclutter_gst_@CLUTTER_GST_MAJORMINOR@_la_LDFLAGS = \
$(NULL)
cluttergstheadersdir = $(includedir)/clutter-gst-@CLUTTER_GST_API_VERSION@/clutter-gst
-cluttergstheaders_HEADERS = $(source_h) $(glib_enum_h)
+cluttergstheaders_HEADERS = $(glib_enum_h) \
+ $(addprefix $(srcdir)/, $(source_srcdir_h)) \
+ $(addprefix $(builddir)/, $(source_builddir_h)) \
+ $(NULL)
#
# GStreamer plugin
#
plugin_source_c = \
- $(srcdir)/clutter-gst-plugin.c \
- $(srcdir)/clutter-gst-video-sink.c \
- $(srcdir)/clutter-gst-auto-video-sink.c \
- $(srcdir)/clutter-gst-auto-video-sink.h \
+ clutter-gst-plugin.c \
+ clutter-gst-video-sink.c \
+ clutter-gst-auto-video-sink.c \
+ clutter-gst-auto-video-sink.h \
$(NULL)
libgstclutter_la_SOURCES = \
@@ -152,7 +166,7 @@ ClutterGst-@CLUTTER_GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-gs
--pkg gstreamer-base-1.0 \
--pkg-export clutter-gst-@CLUTTER_GST_API_VERSION@ \
$(cluttergstheaders_HEADERS) \
- $(source_c)
+ $(addprefix $(srcdir)/, $(source_c))
BUILT_GIRSOURCES += ClutterGst-@CLUTTER_GST_API_VERSION@.gir
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 9f553f2..a53b65e 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -2,8 +2,9 @@ NULL = #
noinst_PROGRAMS = video-player video-sink video-sink-navigation
-AM_CPPFLAGS = -I$(top_srcdir) \
- $(MAINTAINER_CFLAGS) \
+AM_CPPFLAGS = -I$(top_srcdir) \
+ -I$(top_builddir)/clutter-gst \
+ $(MAINTAINER_CFLAGS) \
$(NULL)
video_player_SOURCES = video-player.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7d00c92..6c2231a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,8 +8,9 @@ noinst_PROGRAMS = \
test-video-texture-new-unref-loop \
$(NULL)
-AM_CPPFLAGS = -I$(top_srcdir) \
- $(MAINTAINER_CFLAGS) \
+AM_CPPFLAGS = -I$(top_srcdir) \
+ -I$(top_builddir)/clutter-gst \
+ $(MAINTAINER_CFLAGS) \
$(NULL)
test_alpha_SOURCES = test-alpha.c