Commit 193475bd authored by Alexander Kanavin's avatar Alexander Kanavin

Merge branch 'tintou/meson' into 'master'

Switch to meson build system

See merge request !2
parents f53d8426 06ee2639
AM_DISTCHECK_CONFIGURE_FLAGS = \
--enable-gtk-doc \
--enable-distcheck
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src examples docs test
EXTRA_DIST = dists
valgrind:
cd test; make valgrind
dist-hook:
@echo
@echo "==== Run 'make update-online-doc' to update online documentation ===="
@echo
update-online-doc:
@tar zxf $(PACKAGE)-$(VERSION).tar.gz && \
pushd . > /dev/null && \
cd .. && \
git clone https://gitlab.com/accounts-sso/gsignon-docs.git ; \
cd gsignon-docs && \
git pull ; \
mkdir -p $(PACKAGE) && \
rm -rf $(PACKAGE)/* && \
popd > /dev/null && \
cp -rf $(PACKAGE)-$(VERSION)/docs/html/* ../gsignon-docs/$(PACKAGE)/ && \
pushd . > /dev/null && \
cd ../gsignon-docs && \
git add $(PACKAGE)/* && \
git commit -m "Updated documentation for $(PACKAGE) to version $(VERSION)" && \
git push ; \
popd > /dev/null && \
rm -rf $(PACKAGE)-$(VERSION)
lcov: check
@rm -rf lcov-report
@lcov -c --directory src/ --output-file lcov.output
@genhtml lcov.output --output-directory lcov-report
@rm lcov.output
@echo "Coverage report is in file://$(abs_srcdir)/lcov-report/index.html"
#!/bin/sh -e
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
mkdir -p m4
gtkdocize || exit 1
aclocal #-I m4
autoheader
libtoolize --copy --force
autoconf
automake --add-missing --copy
autoreconf --install --force
. $srcdir/configure "$@"
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.60])
AC_INIT([gsignond-plugin-sasl], [1.0.0], [])
AC_CONFIG_SRCDIR([src/gsignond-sasl-plugin.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 -Wall nostdinc silent-rules subdir-objects -Wno-portability])
# Checks for programs.
AC_PROG_CC
AM_PROG_AR
#libtool
LT_PREREQ([2.2])
LT_INIT([disable-static])
#gtk-doc
GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
# Checks for libraries.
PKG_CHECK_MODULES([GSIGNON],
[glib-2.0 >= 2.30
gsignond
libgsasl])
AC_SUBST(GSIGNON_CFLAGS)
AC_SUBST(GSIGNON_LIBS)
# AM_PATH_CHECK() is deprecated, but check documentation fails to tell that :-/
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [have_check=yes], [have_check=no])
AC_SUBST(CHECK_CFLAGS)
AC_SUBST(CHECK_LIBS)
AC_ARG_ENABLE([coverage],
[AS_HELP_STRING([--enable-coverage], [compile with coverage info])])
AS_IF([test "x$enable_coverage" = "xyes"],
[CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"])
# allow fake installations for "distcheck"
AC_ARG_ENABLE(distcheck,
[ --enable-distcheck build for distcheck target],
[enable_distcheck=yes], [enable_distcheck=no])
echo -n "running distcheck... "
echo $enable_distcheck
if test "x$enable_distcheck" = "xyes" ; then
EXTENSIONSDIR="${libdir}/gsignond/extensions"
PLUGINSDIR="${libdir}/gsignond/gplugins"
else
PLUGINSDIR=`pkg-config gsignond --variable=gpluginsdir`
EXTENSIONSDIR=`pkg-config gsignond --variable=extensionsdir`
fi
AC_SUBST(PLUGINSDIR)
AC_SUBST(EXTENSIONSDIR)
GSIGNON_CFLAGS="$GSIGNON_CFLAGS -Wall -Werror"
AC_OUTPUT([
Makefile
docs/Makefile
src/Makefile
test/Makefile
examples/Makefile
])
## Process this file with automake to produce Makefile.in
# We require automake 1.6 at least.
AUTOMAKE_OPTIONS = 1.6
# This is a blank Makefile.am for using gtk-doc.
# Copy this to your project's API docs directory and modify the variables to
# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
# of using the various options.
# The name of the module, e.g. 'glib'.
DOC_MODULE=gsignond-plugin-sasl
# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
#DOC_MODULE_VERSION=2
# The top-level SGML file. You can change this if you want to.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# Directories containing the source code.
# gtk-doc will search all .c and .h files beneath these paths
# for inline comments documenting functions and macros.
# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk
DOC_SOURCE_DIR=$(top_srcdir)/src
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
SCANGOBJ_OPTIONS=
# Extra options to supply to gtkdoc-scan.
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
SCAN_OPTIONS=
# Extra options to supply to gtkdoc-mkdb.
# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
MKDB_OPTIONS=--xml-mode --output-format=xml
# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
MKTMPL_OPTIONS=
# Extra options to supply to gtkdoc-mkhtml
MKHTML_OPTIONS=
# Extra options to supply to gtkdoc-fixref. Not normally needed.
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
FIXXREF_OPTIONS=--extra-dir=../../accounts-sso.gsignond/docs/html
# Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=
CFILE_GLOB=
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
EXTRA_HFILES=
# Header files or dirs to ignore when scanning. Use base file/dir names
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
IGNORE_HFILES=
# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
HTML_IMAGES=
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
content_files=
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
# These files must be listed here *and* in content_files
# e.g. expand_content_files=running.sgml
expand_content_files=
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
# signals and properties.
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=\
$(GSIGNON_CFLAGS) \
$(LIBSOUP_CFLAGS)
GTKDOC_LIBS=\
$(top_builddir)/src/libsasl.la \
$(GSIGNON_LIBS) \
$(LIBSOUP_LIBS)
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make
# Other files to distribute
# e.g. EXTRA_DIST += version.xml.in
EXTRA_DIST +=
# Files not to distribute
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
#DISTCLEANFILES +=
# Comment this out if you want 'make check' to test you doc status
# and run some sanity checks
if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = \
DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
TESTS = $(GTKDOC_CHECK)
endif
CLEANFILES += $(DOC_MODULE)-*.txt $(DOC_MODULE).types
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
]>
<book id="index">
<book id="gsignond-plugin-sasl" lang="en" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>gsignond-plugin-sasl Reference Manual</title>
<releaseinfo>
for gsignond-plugin-sasl.
The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://gsignon-docs.accounts-sso.googlecode.com/git/gsignond-plugin-sasl/index.html">
http://gsignon-docs.accounts-sso.googlecode.com/git/gsignond-plugin-sasl/index.html</ulink>.
<ulink role="online-location" url="http://accounts-sso.gitlab.io/gsignond-plugin-sasl/index.html">
http://accounts-sso.gitlab.io/gsignond-plugin-sasl/index.html</ulink>.
</releaseinfo>
</bookinfo>
......@@ -20,10 +21,6 @@
<xi:include href="xml/gsignond-sasl-plugin.xml"/>
</chapter>
<chapter id="object-tree">
<title>Object Hierarchy</title>
<xi:include href="xml/tree_index.sgml"/>
</chapter>
<index id="api-index-full">
<title>API Index</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
......
glib_prefix = glib_dep.get_pkgconfig_variable('prefix')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
docpath = join_paths(get_option('prefix'), get_option('datadir'), 'gtk-doc', 'html')
gnome.gtkdoc(meson.project_name(),
main_xml: 'gsignond-plugin-sasl-docs.xml',
src_dir: src_include,
fixxref_args: [
'--html-dir=@0@'.format(docpath),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gsignond'))
],
content_files: example_file,
scan_args: ['--rebuild-types'],
install: true
)
noinst_PROGRAMS = gsignond-sasl-example
gsignond_sasl_example_SOURCES = gsignond-sasl-example.c
gsignond_sasl_example_CFLAGS = \
$(GSIGNON_CFLAGS) \
-I$(top_srcdir)/src/
gsignond_sasl_example_LDADD = \
$(top_builddir)/src/libsasl.la \
$(GSIGNON_LIBS)
all-local: $(top_builddir)/docs/gsignond-sasl-example.listing
mostlyclean-local:
rm -rf $(top_builddir)/docs/gsignond-sasl-example.listing
$(top_builddir)/docs/gsignond-sasl-example.listing:
cp $(top_srcdir)/examples/gsignond-sasl-example.c $(top_builddir)/docs/gsignond-sasl-example.listing
example_file = files(
'gsignond-sasl-example.c'
)
executable('gsignond-sasl-example', example_file, dependencies: sasl_dep)
project('sasl', 'c')
gnome = import('gnome')
glib_dep = dependency('glib-2.0', version: '>=2.30')
gobject_dep = dependency('gobject-2.0')
gsignond_dep = dependency('gsignond')
gsasl_dep = dependency('libgsasl')
check_dep = dependency('check', version: '>=0.9.4')
gplugins_dir = gsignond_dep.get_pkgconfig_variable('gpluginsdir')
dependencies = [glib_dep, gobject_dep, gsignond_dep, gsasl_dep]
subdir('src')
subdir('examples')
subdir('docs')
subdir('test')
extensionsdir = $(EXTENSIONSDIR)
pluginsdir = $(PLUGINSDIR)
plugins_LTLIBRARIES = libsasl.la
NULL=
libsasl_la_CPPFLAGS = \
$(GSIGNON_CFLAGS) \
$(NULL)
libsasl_la_LIBADD = \
$(GSIGNON_LIBS) \
$(NULL)
libsasl_la_SOURCES = \
gsignond-sasl-plugin.c \
gsignond-sasl-plugin.h \
$(NULL)
libsasl_la_LDFLAGS = -avoid-version
CLEANFILES =
......@@ -89,7 +89,7 @@
* <example>
* <title>Using various SASL mechanisms</title>
* <programlisting>
* <xi:include href="../gsignond-sasl-example.listing" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"/>
* <xi:include href="gsignond-sasl-example.c" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"/>
* </programlisting>
* </example>
*
......
sasl_files = files(
'gsignond-sasl-plugin.c',
'gsignond-sasl-plugin.h'
)
src_include = include_directories('.')
sasl_plugin = shared_module(meson.project_name(),
sasl_files,
dependencies : dependencies,
install: true,
install_dir : gplugins_dir
)
sasl_dep = declare_dependency(
dependencies: dependencies,
include_directories: src_include,
sources: sasl_files
)
TESTS = saslplugintest
TESTS_ENVIRONMENT= SSO_PLUGINS_DIR=$(top_builddir)/src/.libs
check_PROGRAMS = saslplugintest
saslplugintest_SOURCES = saslplugintest.c
saslplugintest_CFLAGS = \
$(GSIGNON_CFLAGS) \
$(CHECK_CFLAGS) \
-I$(top_srcdir)/src/
saslplugintest_LDADD = \
$(top_builddir)/src/libsasl.la \
$(GSIGNON_LIBS) \
$(CHECK_LIBS)
#These recipes are nicked from gstreamer and simplified
VALGRIND_TESTS_DISABLE =
SUPPRESSIONS = valgrind.supp
%.valgrind: %
@$(TESTS_ENVIRONMENT) \
CK_FORK=no \
CK_DEFAULT_TIMEOUT=120 \
G_SLICE=always-malloc \
$(LIBTOOL) --mode=execute \
valgrind -q \
$(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \
--tool=memcheck --leak-check=full --trace-children=yes \
--leak-resolution=high --num-callers=20 \
--error-exitcode=1 --gen-suppressions=yes \
./$*
valgrind: $(TESTS)
for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \
$(MAKE) $$t.valgrind; \
done;
EXTRA_DIST = valgrind.supp
\ No newline at end of file
sasl_test_files = files(
'saslplugintest.c'
)
test_saslplugin = executable(
'saslplugintest',
sasl_test_files,
dependencies: [sasl_dep, check_dep]
)
test_sasl_environment = environment()
test_sasl_environment.set ('SSO_PLUGINS_DIR', join_paths(meson.build_root(), 'src'))
test('test-sasl-plugin',
test_saslplugin,
env: test_sasl_environment,
workdir: join_paths(meson.build_root(), 'test')
)
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