Commit 5b11d5e0 authored by Allison Lortie's avatar Allison Lortie Committed by David Zeuthen

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=44599Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
parent 7f9cddca
#!/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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment