Assuming glib
and gobject-introspection
are checked out from git into the current directory.
mkdir ~/devinstall
cd glib
NOCONFIGURE=1 ./autogen.sh # run once on a fresh checkout
./configure --prefix=$HOME/devinstall
make
make install
# this is needed for both ./configure and the GI tools,
# otherwise the system includes will be used:
export PKG_CONFIG_PATH=$HOME/devinstall/lib/pkgconfig
cd ../gobject-introspection
NOCONFIGURE=1 ./autogen.sh # run once on a fresh checkout
./configure --prefix=$HOME/devinstall --with-glib-src=../glib
make
make install # if need to work with the tools out of tree
The libraries, headers, and tools will be available under prefix directory ~/devinstall
.
In the source tree of gobject-introspection
, extracts of annotated comments from GLib
source files, used to build the GIR files in-tree, are maintained as gir/*.c
. Any
changes to annotations in the *.c
sources of the glib
source tree need to be merged
into the respective gir/*.c
shims so that the changes can be observed in the generated
GIR. There is a script to automate that:
cd gobject-introspection/misc
./update-glib-annotations.py ../../glib
cd ..
make *.gir
The location of GLib header files, on the other hand, is obtained from pkg-config
. After changes are made to the headers in the glib
source tree, install them with make install
so that the gobject-introspection
build sees the updated headers.