summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-01-07 01:40:01 -0500
committerDavid Zeuthen <davidz@redhat.com>2012-01-10 15:01:51 -0500
commit5b11d5e0698e8ee00a96e16bc3547c6d571ef6e1 (patch)
tree6b55a11aab4bc9deed17d065a5d1c1b8d660b5e9
parent7f9cddcaed922f7eecbb3782224282b3282bb499 (diff)
downloadpolkit-5b11d5e0698e8ee00a96e16bc3547c6d571ef6e1.tar.gz
Various builddir != srcdir fixes
Fix autogen.sh to work when run from the builddir. Also: switch over to using the gobject-introspection Makefile (which is out-of-tree safe) instead of hardcoding our own version. https://bugs.freedesktop.org/show_bug.cgi?id=44599 Signed-off-by: David Zeuthen <davidz@redhat.com>
-rwxr-xr-xautogen.sh11
-rw-r--r--src/polkit/Makefile.am35
-rw-r--r--src/polkitagent/Makefile.am42
3 files changed, 39 insertions, 49 deletions
diff --git a/autogen.sh b/autogen.sh
index 462fc35..426e875 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,8 +1,6 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
-touch ChangeLog
-
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
@@ -14,6 +12,11 @@ DIE=0
exit 1
}
+olddir=`pwd`
+cd "$srcdir"
+
+touch ChangeLog
+
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have autoconf installed."
@@ -22,7 +25,7 @@ DIE=0
DIE=1
}
-(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
+(grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have libtool installed."
@@ -107,6 +110,8 @@ esac
intltoolize --copy --force --automake || exit 1
+cd "$olddir"
+
conf_flags="--enable-maintainer-mode --enable-gtk-doc"
if test x$NOCONFIGURE = x; then
diff --git a/src/polkit/Makefile.am b/src/polkit/Makefile.am
index 0c37151..1068ea1 100644
--- a/src/polkit/Makefile.am
+++ b/src/polkit/Makefile.am
@@ -103,33 +103,26 @@ libpolkit_gobject_1_la_LIBADD = \
libpolkit_gobject_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'
if HAVE_INTROSPECTION
+
+INTROSPECTION_GIRS = Polkit-1.0.gir
+
girdir = $(INTROSPECTION_GIRDIR)
gir_DATA = Polkit-1.0.gir
typelibsdir = $(INTROSPECTION_TYPELIBDIR)
typelibs_DATA = Polkit-1.0.typelib
-Polkit-1.0.gir: libpolkit-gobject-1.la $(INTROSPECTION_SCANNER) Makefile.am
- $(INTROSPECTION_SCANNER) -v \
- --warn-all \
- --namespace Polkit \
- --nsversion=1.0 \
- --include=Gio-2.0 \
- --library=polkit-gobject-1 \
- --output $@ \
- --pkg=glib-2.0 \
- --pkg=gobject-2.0 \
- --pkg=gio-2.0 \
- --pkg-export=polkit-gobject-1 \
- --libtool=$(top_builddir)/libtool \
- --c-include='polkit/polkit.h' \
- -I$(top_srcdir)/src \
- -D_POLKIT_COMPILATION \
- $(libpolkit_gobject_1_la_SOURCES) \
- $(NULL)
-
-Polkit-1.0.typelib: Polkit-1.0.gir $(INTROSPECTION_COMPILER)
- $(INTROSPECTION_COMPILER) $< -o $@
+Polkit_1_0_gir_INCLUDES = Gio-2.0
+Polkit_1_0_gir_SCANNERFLAGS = --c-include='polkit/polkit.h'
+Polkit_1_0_gir_CFLAGS = \
+ $(libpolkit_gobject_1_la_CFLAGS) \
+ -D_POLKIT_COMPILATION \
+ -I.. -I$(top_srcdir)/src
+Polkit_1_0_gir_LIBS = libpolkit-gobject-1.la
+Polkit_1_0_gir_FILES = $(libpolkit_gobject_1_la_SOURCES)
+Polkit_1_0_gir_EXPORT_PACKAGES = polkit-gobject-1
+
+include $(INTROSPECTION_MAKEFILE)
endif # HAVE_INTROSPECTION
diff --git a/src/polkitagent/Makefile.am b/src/polkitagent/Makefile.am
index 4a6aa9b..e8c9fb1 100644
--- a/src/polkitagent/Makefile.am
+++ b/src/polkitagent/Makefile.am
@@ -102,37 +102,29 @@ polkit_agent_helper_1_LDADD = \
$(NULL)
if HAVE_INTROSPECTION
+
girdir = $(INTROSPECTION_GIRDIR)
gir_DATA = PolkitAgent-1.0.gir
typelibsdir = $(INTROSPECTION_TYPELIBDIR)
typelibs_DATA = PolkitAgent-1.0.typelib
-PolkitAgent-1.0.gir: libpolkit-agent-1.la $(INTROSPECTION_SCANNER) Makefile.am
- $(INTROSPECTION_SCANNER) -v \
- --warn-all \
- --namespace PolkitAgent \
- --nsversion=1.0 \
- --include=Gio-2.0 \
- --include-uninstalled=$(top_builddir)/src/polkit/Polkit-1.0.gir \
- --library=polkit-agent-1 \
- --output $@ \
- --pkg=glib-2.0 \
- --pkg=gobject-2.0 \
- --pkg=gio-2.0 \
- --pkg-export=polkit-agent-1 \
- --c-include='polkitagent/polkitagent.h' \
- --libtool=$(top_builddir)/libtool \
- -I$(top_srcdir)/src \
- -D_POLKIT_COMPILATION \
- -D_POLKIT_AGENT_COMPILATION \
- $(libpolkit_agent_1_la_SOURCES) \
- $(NULL)
-
-PolkitAgent-1.0.typelib: PolkitAgent-1.0.gir $(INTROSPECTION_COMPILER)
- $(INTROSPECTION_COMPILER) \
- --includedir $(top_builddir)/src/polkit \
- $< -o $@
+INTROSPECTION_COMPILER_ARGS = --includedir=../../src/polkit
+INTROSPECTION_GIRS = PolkitAgent-1.0.gir
+PolkitAgent_1_0_gir_INCLUDES = Gio-2.0
+PolkitAgent_1_0_gir_SCANNERFLAGS = \
+ --include-uninstalled=../../src/polkit/Polkit-1.0.gir \
+ --c-include='polkitagent/polkitagent.h'
+PolkitAgent_1_0_gir_CFLAGS = \
+ $(libpolkit_agent_1_la_CFLAGS) \
+ -D_POLKIT_COMPILATION \
+ -D_POLKIT_AGENT_COMPILATION \
+ -I.. -I$(top_srcdir)/src
+PolkitAgent_1_0_gir_LIBS = libpolkit-agent-1.la
+PolkitAgent_1_0_gir_FILES = $(libpolkit_agent_1_la_SOURCES)
+PolkitAgent_1_0_gir_EXPORT_PACKAGES = polkit-agent-1
+
+include $(INTROSPECTION_MAKEFILE)
endif # HAVE_INTROSPECTION