[valadoc] build: Clean up configure.ac and fix make (dist)check



commit d20b8866099bdf70f738294a7d2757f18a7c2dec
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Dec 23 17:26:04 2013 +0100

    build: Clean up configure.ac and fix make (dist)check

 .gitignore                    |    2 +
 Makefile.am                   |    1 +
 configure.ac                  |  121 ++++++++++++++---------------------------
 src/driver/0.14.x/Makefile.am |    6 +-
 src/driver/0.16.x/Makefile.am |    4 +-
 src/driver/0.18.x/Makefile.am |    4 +-
 src/driver/0.20.x/Makefile.am |    4 +-
 src/driver/0.22.x/Makefile.am |    4 +-
 src/driver/0.24.x/Makefile.am |    4 +-
 tests/Makefile.am             |    4 +-
 tests/testrunner.sh           |   15 ++---
 11 files changed, 65 insertions(+), 104 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 221b5ac..b31f516 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,10 +12,12 @@ Makefile
 *.deps
 .deps
 .libs
+.dirstamp
 
 config.*
 aclocal.m4
 autom4te.cache
+build-aux
 ChangeLog
 configure
 depcomp
diff --git a/Makefile.am b/Makefile.am
index 4208554..0c214ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,7 @@
 
 NULL = 
 
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
 SUBDIRS = src \
           tests \
diff --git a/configure.ac b/configure.ac
index cfe1d13..5d2b7a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,18 +1,23 @@
 dnl configure.in
-AC_PREREQ(2.59)
-AC_INIT(Valadoc, 0.3.2, flo brosch gmail com)
-AM_INIT_AUTOMAKE
-AC_CONFIG_SRCDIR([src/valadoc/valadoc.vala])
-AC_CONFIG_HEADER([config.h])
-AM_MAINTAINER_MODE
+AC_PREREQ([2.65])
+AC_INIT([valadoc],[0.3.2],[flo brosch gmail com])
 
-AM_INIT_AUTOMAKE([foreign])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-AC_PROG_CC
-AM_DISABLE_STATIC
-AC_PROG_LIBTOOL
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS(config.h)
+AC_CONFIG_SRCDIR([configure.ac])
+AM_INIT_AUTOMAKE([1.11 foreign tar-ustar dist-xz no-dist-gzip subdir-objects])
 
+AM_MAINTAINER_MODE
+
+
+AC_PROG_CC
+AC_PROG_INSTALL
+LT_INIT([disable-static])
+PKG_PROG_PKG_CONFIG([0.21])
 
 ##
 ## Settings:
@@ -21,7 +26,7 @@ AC_PROG_LIBTOOL
 VALA_REQUIRED=0.13.2
 LIBGEE_REQUIRED=0.8.0
 LIBGVC_REQUIRED=2.16
-GLIB_REQUIRED=2.12.0
+GLIB_REQUIRED=2.24.0
 LIBGDKPIXBUF_REQUIRED=2.0
 
 
@@ -30,27 +35,16 @@ LIBGDKPIXBUF_REQUIRED=2.0
 ## Dependencies:
 ##
 
-AC_PATH_PROG(VALAC, valac, valac)
-AC_SUBST(VALAC)
 AC_SUBST(VALAFLAGS)
-m4_ifdef([AM_PROG_VALAC], [AM_PROG_VALAC([$VALA_REQUIRED])])
+AM_PROG_VALAC([$VALA_REQUIRED])
 
 PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
-AC_SUBST(LIBGVC_CFLAGS)
-AC_SUBST(LIBGVC_LIBS)
 
 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
 
 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
-AC_SUBST(GMODULE_CFLAGS)
-AC_SUBST(GMODULE_LIBS)
 
 PKG_CHECK_MODULES(LIBGEE, gee-0.8 >= $LIBGEE_REQUIRED)
-AC_SUBST(LIBGEE_CFLAGS)
-AC_SUBST(LIBGEE_LIBS)
-
 
 
 AC_MSG_CHECKING([for CGRAPH])
@@ -89,92 +83,59 @@ AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
 
 PKG_CHECK_MODULES(LIBVALA_0_24_X, libvala-0.24 >= 0.17.4, have_libvala_0_24_x="yes", 
have_libvala_0_24_x="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_24_X, test "$have_libvala_0_24_x" = "yes")
-AC_SUBST(LIBVALA_0_24_X_CFLAGS)
-AC_SUBST(LIBVALA_0_24_X_LIBS)
-
 
 PKG_CHECK_MODULES(LIBVALA_0_22_X, libvala-0.22 >= 0.17.4, have_libvala_0_22_x="yes", 
have_libvala_0_22_x="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_22_X, test "$have_libvala_0_22_x" = "yes")
-AC_SUBST(LIBVALA_0_22_X_CFLAGS)
-AC_SUBST(LIBVALA_0_22_X_LIBS)
-
 
 PKG_CHECK_MODULES(LIBVALA_0_20_X, libvala-0.20 >= 0.17.4, have_libvala_0_20_x="yes", 
have_libvala_0_20_x="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_20_X, test "$have_libvala_0_20_x" = "yes")
-AC_SUBST(LIBVALA_0_20_X_CFLAGS)
-AC_SUBST(LIBVALA_0_20_X_LIBS)
-
 
 PKG_CHECK_MODULES(LIBVALA_0_18_X, libvala-0.18 >= 0.17.4, have_libvala_0_18_x="yes", 
have_libvala_0_18_x="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_18_X, test "$have_libvala_0_18_x" = "yes")
-AC_SUBST(LIBVALA_0_18_X_CFLAGS)
-AC_SUBST(LIBVALA_0_18_X_LIBS)
-
 
-PKG_CHECK_MODULES(LIBVALA_0_17__1_3, libvala-0.18 >= 0.17.1   libvala-0.18 <= 0.17.3, 
have_libvala_0_17__1_3="yes", have_libvala_0_17__1_3="no")
+PKG_CHECK_MODULES(LIBVALA_0_17__1_3, libvala-0.18 >= 0.17.1 libvala-0.18 <= 0.17.3, 
have_libvala_0_17__1_3="yes", have_libvala_0_17__1_3="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_17__1_3, test "$have_libvala_0_17__1_3" = "yes")
-AC_SUBST(HAVE_LIBVALA_0_17__1_3_CFLAGS)
-AC_SUBST(HAVE_LIBVALA_0_17__1_3_LIBS)
-
 
 PKG_CHECK_MODULES(LIBVALA_0_17_0, libvala-0.18 = 0.17.0, have_libvala_0_17_0="yes", have_libvala_0_17_0="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_17_0, test "$have_libvala_0_17_0" = "yes")
-AC_SUBST(LIBVALA_0_17_0_CFLAGS)
-AC_SUBST(LIBVALA_0_17_0_LIBS)
-
 
 PKG_CHECK_MODULES(LIBVALA_0_16_X, libvala-0.16 >= 0.15.1, have_libvala_0_16_x="yes", 
have_libvala_0_16_x="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_16_X, test "$have_libvala_0_16_x" = "yes")
-AC_SUBST(LIBVALA_0_16_X_CFLAGS)
-AC_SUBST(LIBVALA_0_16_X_LIBS)
-
 
 PKG_CHECK_MODULES(LIBVALA_0_15_0, libvala-0.16 = 0.15.0, have_libvala_0_15_0="yes", have_libvala_0_15_0="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_15_0, test "$have_libvala_0_15_0" = "yes")
-AC_SUBST(LIBVALA_0_15_0_CFLAGS)
-AC_SUBST(LIBVALA_0_15_0_LIBS)
-
 
 PKG_CHECK_MODULES(LIBVALA_0_14_X, libvala-0.14 >= 0.13.2, have_libvala_0_14_x="yes", 
have_libvala_0_14_x="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_14_X, test "$have_libvala_0_14_x" = "yes")
-AC_SUBST(LIBVALA_0_14_X_CFLAGS)
-AC_SUBST(LIBVALA_0_14_X_LIBS)
-
 
 PKG_CHECK_MODULES(LIBVALA_0_13_1, libvala-0.14 = 0.13.1, have_libvala_0_13_1="yes", have_libvala_0_13_1="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_13_1, test "$have_libvala_0_13_1" = "yes")
-AC_SUBST(LIBVALA_0_13_1_CFLAGS)
-AC_SUBST(LIBVALA_0_13_1_LIBS)
-
 
 PKG_CHECK_MODULES(LIBVALA_0_13_0, libvala-0.14 = 0.13.0, have_libvala_0_13_0="yes", have_libvala_0_13_0="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_13_0, test "$have_libvala_0_13_0" = "yes")
-AC_SUBST(LIBVALA_0_13_0_CFLAGS)
-AC_SUBST(LIBVALA_0_13_0_LIBS)
-
-
-
-AC_CONFIG_FILES([Makefile
-                 src/libvaladoc/valadoc-1.0.pc
-                 src/libvaladoc/valadoc-1.0.deps
-                 src/Makefile
-                 icons/Makefile
-                 doc/Makefile
-                 src/libvaladoc/Makefile
-                 src/driver/Makefile
-                                src/driver/0.14.x/Makefile
-                                src/driver/0.16.x/Makefile
-                                src/driver/0.18.x/Makefile
-                                src/driver/0.20.x/Makefile
-                                src/driver/0.22.x/Makefile
-                                src/driver/0.24.x/Makefile
-                 src/doclets/Makefile
-                 src/doclets/htm/Makefile
-                 src/doclets/devhelp/Makefile
-                 src/doclets/gtkdoc/Makefile
-                 src/valadoc/Makefile
-                 tests/Makefile
-       ])
 
 
+AC_CONFIG_FILES([
+Makefile
+src/libvaladoc/valadoc-1.0.pc
+src/libvaladoc/valadoc-1.0.deps
+src/Makefile
+icons/Makefile
+doc/Makefile
+src/libvaladoc/Makefile
+src/driver/Makefile
+src/driver/0.14.x/Makefile
+src/driver/0.16.x/Makefile
+src/driver/0.18.x/Makefile
+src/driver/0.20.x/Makefile
+src/driver/0.22.x/Makefile
+src/driver/0.24.x/Makefile
+src/doclets/Makefile
+src/doclets/htm/Makefile
+src/doclets/devhelp/Makefile
+src/doclets/gtkdoc/Makefile
+src/valadoc/Makefile
+tests/Makefile
+])
+
 AC_OUTPUT
diff --git a/src/driver/0.14.x/Makefile.am b/src/driver/0.14.x/Makefile.am
index 127769d..684ff98 100644
--- a/src/driver/0.14.x/Makefile.am
+++ b/src/driver/0.14.x/Makefile.am
@@ -13,7 +13,7 @@ endif
 
 AM_CFLAGS =  -g \
        -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I ../../libvaladoc/ \
+       -I $(top_builddir)/src/libvaladoc/ \
        $(GLIB_CFLAGS) \
        $(LIBGEE_CFLAGS) \
        $(LIBGVC_CFLAGS) \
@@ -58,7 +58,7 @@ libdriver.vala.stamp: $(libdriver_la_VALASOURCES)
 
 
 libdriver_la_LIBADD = \
-       ../../libvaladoc/libvaladoc.la \
+       $(top_builddir)/src/libvaladoc/libvaladoc.la \
        $(GLIB_LIBS) \
        $(LIBVALA_0_14_X_LIBS) \
        $(LIBVALA_0_13_0_LIBS) \
@@ -68,7 +68,7 @@ libdriver_la_LIBADD = \
        $(NULL)
 
 
-EXTRA_DIST = $(libdriver_la_VALASOURCES)  libdriver.vala.stamp 
+EXTRA_DIST = $(libdriver_la_VALASOURCES) libdriver.vala.stamp 
 
 
 MAINTAINERCLEANFILES = \
diff --git a/src/driver/0.16.x/Makefile.am b/src/driver/0.16.x/Makefile.am
index 23215e3..d9d8372 100644
--- a/src/driver/0.16.x/Makefile.am
+++ b/src/driver/0.16.x/Makefile.am
@@ -12,7 +12,7 @@ endif
 
 AM_CFLAGS =  -g \
        -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I ../../libvaladoc/ \
+       -I $(top_builddir)/src/libvaladoc/ \
        $(GLIB_CFLAGS) \
        $(LIBGEE_CFLAGS) \
        $(LIBGVC_CFLAGS) \
@@ -57,7 +57,7 @@ libdriver.vala.stamp: $(libdriver_la_VALASOURCES)
 
 
 libdriver_la_LIBADD = \
-       ../../libvaladoc/libvaladoc.la \
+       $(top_builddir)/src/libvaladoc/libvaladoc.la \
        $(GLIB_LIBS) \
        $(LIBVALA_0_15_0_LIBS) \
        $(LIBVALA_0_16_X_LIBS) \
diff --git a/src/driver/0.18.x/Makefile.am b/src/driver/0.18.x/Makefile.am
index 4ed241a..32e44d2 100644
--- a/src/driver/0.18.x/Makefile.am
+++ b/src/driver/0.18.x/Makefile.am
@@ -16,7 +16,7 @@ endif
 
 AM_CFLAGS =  -g \
        -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I ../../libvaladoc/ \
+       -I $(top_builddir)/src/libvaladoc/ \
        $(GLIB_CFLAGS) \
        $(LIBGEE_CFLAGS) \
        $(LIBGVC_CFLAGS) \
@@ -63,7 +63,7 @@ libdriver.vala.stamp: $(libdriver_la_VALASOURCES)
 
 
 libdriver_la_LIBADD = \
-       ../../libvaladoc/libvaladoc.la \
+       $(top_builddir)/src/libvaladoc/libvaladoc.la \
        $(GLIB_LIBS) \
        $(LIBVALA_0_18_X_LIBS) \
        $(LIBVALA_0_17__1_3_LIBS) \
diff --git a/src/driver/0.20.x/Makefile.am b/src/driver/0.20.x/Makefile.am
index 0748038..034a5de 100644
--- a/src/driver/0.20.x/Makefile.am
+++ b/src/driver/0.20.x/Makefile.am
@@ -6,7 +6,7 @@ VERSIONED_VAPI_DIR=`pkg-config libvala-0.20 --variable vapidir`
 
 AM_CFLAGS =  -g \
        -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I ../../libvaladoc/ \
+       -I $(top_builddir)/src/libvaladoc/ \
        $(GLIB_CFLAGS) \
        $(LIBGEE_CFLAGS) \
        $(LIBGVC_CFLAGS) \
@@ -49,7 +49,7 @@ libdriver.vala.stamp: $(libdriver_la_VALASOURCES)
 
 
 libdriver_la_LIBADD = \
-       ../../libvaladoc/libvaladoc.la \
+       $(top_builddir)/src/libvaladoc/libvaladoc.la \
        $(GLIB_LIBS) \
        $(LIBVALA_0_20_X_LIBS) \
        $(LIBGEE_LIBS) \
diff --git a/src/driver/0.22.x/Makefile.am b/src/driver/0.22.x/Makefile.am
index b5e7040..478604e 100644
--- a/src/driver/0.22.x/Makefile.am
+++ b/src/driver/0.22.x/Makefile.am
@@ -6,7 +6,7 @@ VERSIONED_VAPI_DIR=`pkg-config libvala-0.22 --variable vapidir`
 
 AM_CFLAGS =  -g \
        -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I ../../libvaladoc/ \
+       -I $(top_builddir)/src/libvaladoc/ \
        $(GLIB_CFLAGS) \
        $(LIBGEE_CFLAGS) \
        $(LIBGVC_CFLAGS) \
@@ -49,7 +49,7 @@ libdriver.vala.stamp: $(libdriver_la_VALASOURCES)
 
 
 libdriver_la_LIBADD = \
-       ../../libvaladoc/libvaladoc.la \
+       $(top_builddir)/src/libvaladoc/libvaladoc.la \
        $(GLIB_LIBS) \
        $(LIBVALA_0_22_X_LIBS) \
        $(LIBGEE_LIBS) \
diff --git a/src/driver/0.24.x/Makefile.am b/src/driver/0.24.x/Makefile.am
index fbf157f..fc94eae 100644
--- a/src/driver/0.24.x/Makefile.am
+++ b/src/driver/0.24.x/Makefile.am
@@ -6,7 +6,7 @@ VERSIONED_VAPI_DIR=`pkg-config libvala-0.24 --variable vapidir`
 
 AM_CFLAGS =  -g \
        -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-       -I ../../libvaladoc/ \
+       -I $(top_builddir)/src/libvaladoc/ \
        $(GLIB_CFLAGS) \
        $(LIBGEE_CFLAGS) \
        $(LIBGVC_CFLAGS) \
@@ -49,7 +49,7 @@ libdriver.vala.stamp: $(libdriver_la_VALASOURCES)
 
 
 libdriver_la_LIBADD = \
-       ../../libvaladoc/libvaladoc.la \
+       $(top_builddir)/src/libvaladoc/libvaladoc.la \
        $(GLIB_LIBS) \
        $(LIBVALA_0_24_X_LIBS) \
        $(LIBGEE_LIBS) \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index df39b9b..6ea5c60 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -12,7 +12,7 @@ BUILT_SOURCES = \
 noinst_PROGRAMS = \
        $(NULL)
 
-TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) $(srcdir)/testrunner.sh
+TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) TOPBUILDDIR=$(abs_top_builddir) TOPSRCDIR=$(abs_top_srcdir) 
$(srcdir)/testrunner.sh
 
 TESTS = \
        libvaladoc/errorreporter.vala \
@@ -32,7 +32,7 @@ TESTS = \
        $(NULL)
 
 check-TESTS: $(TESTS)
-       @EXEEXT=$(EXEEXT) $(srcdir)/testrunner.sh $(TESTS)
+       @EXEEXT=$(EXEEXT) TOPBUILDDIR=$(abs_top_builddir) TOPSRCDIR=$(abs_top_srcdir) $(srcdir)/testrunner.sh 
$(TESTS)
 
 EXTRA_DIST = \
        testrunner.sh \
diff --git a/tests/testrunner.sh b/tests/testrunner.sh
index ae22e63..710ad28 100755
--- a/tests/testrunner.sh
+++ b/tests/testrunner.sh
@@ -21,19 +21,16 @@
 #      Jürg Billeter <j bitron ch>
 
 builddir=$PWD
-topbuilddir=$builddir/..
-srcdir=$PWD/`dirname $0`
-topsrcdir=$srcdir/..
+topbuilddir=$TOPBUILDDIR
+topsrcdir=$TOPSRCDIR
 vapidir=$topsrcdir/vapi
 
 export G_DEBUG=fatal_warnings
-export PKG_CONFIG_PATH=../../src/libvaladoc
+export PKG_CONFIG_PATH=$topbuilddir/src/libvaladoc
+export LD_LIBRARY_PATH=$topbuilddir/src/libvaladoc/.libs
 
 VALAC=valac
-VALAFLAGS="-X -D -X TOP_SRC_DIR=\"$topsrcdir\" --vapidir $topsrcdir/src/libvaladoc --pkg valadoc-1.0 --pkg 
gee-0.8 --disable-warnings --main main --save-temps -X -g -X -O0 -X -pipe -X -lm -X -Werror=return-type -X 
-Werror=init-self -X -Werror=implicit -X -Werror=sequence-point -X -Werror=return-type -X 
-Werror=uninitialized -X -Werror=pointer-arith -X -Werror=int-to-pointer-cast -X -Werror=pointer-to-int-cast 
-X -L$topsrcdir//src/libvaladoc/.libs -X -I$topsrcdir/src/libvaladoc 
$topsrcdir/tests/libvaladoc/parser/generic-scanner.vala $topsrcdir/tests/drivers/generic-api-test.vala"
-VAPIGEN=$topbuilddir/vapigen/vapigen
-VAPIGENFLAGS=
-
+VALAFLAGS="-X -D -X TOP_SRC_DIR=\"$topsrcdir\" --vapidir $topbuilddir/src/libvaladoc --pkg valadoc-1.0 --pkg 
gee-0.8 --disable-warnings --main main --save-temps -X -g -X -O0 -X -pipe -X -lm -X -Werror=return-type -X 
-Werror=init-self -X -Werror=implicit -X -Werror=sequence-point -X -Werror=return-type -X 
-Werror=uninitialized -X -Werror=pointer-arith -X -Werror=int-to-pointer-cast -X -Werror=pointer-to-int-cast 
-X -L$topbuilddir/src/libvaladoc/.libs -X -I$topbuilddir/src/libvaladoc 
$topsrcdir/tests/libvaladoc/parser/generic-scanner.vala $topsrcdir/tests/drivers/generic-api-test.vala"
 
 testdir=_test
 rm -rf $testdir
@@ -68,7 +65,7 @@ for testfile in "$@"; do
 
                echo "  case \"/$testpath\": $ns.main (); break;" >> main.vala
                echo "namespace $ns {" > $SOURCEFILE
-               cat "$srcdir/$testfile" >> $SOURCEFILE
+               cat "$topsrcdir/tests/$testfile" >> $SOURCEFILE
                echo "}" >> $SOURCEFILE
 
                echo "./test$EXEEXT /$testpath" > check


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]