[libgda: 1/23] --enable-examples option was added
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda: 1/23] --enable-examples option was added
- Date: Mon, 21 May 2018 15:10:29 +0000 (UTC)
commit d4c2ca957acc6e1b6be8de442b14e375a26d18c2
Author: Pavlo Solntsev <p sun fun gmail com>
Date: Fri Apr 27 22:36:45 2018 -0500
--enable-examples option was added
Option to compile examples was added. First DDL example was added.
Makefile.am | 5 +++++
configure.ac | 12 ++++++++++++
examples/DDL/Makefile.am | 13 +++++++++++++
examples/Makefile.am | 1 +
4 files changed, 31 insertions(+)
---
diff --git a/Makefile.am b/Makefile.am
index 1104b6443..87a8ae56e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,6 +17,10 @@ UI_TOOLS_DIR=control-center
endif
endif
+if ENABLE_EXAMPLES
+EXAMPLES_DIR=examples
+endif
+
SUBDIRS = \
po \
libgda \
@@ -29,6 +33,7 @@ SUBDIRS = \
tests \
testing \
data \
+ $(EXAMPLES_DIR) \
doc
example_files = \
diff --git a/configure.ac b/configure.ac
index 0d92d651c..ba306ba7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -939,6 +939,15 @@ AC_ARG_ENABLE(default-binary,
AM_CONDITIONAL(DEFAULT_BINARY, test "x$enable_default_binary" = xyes)
+#
+# Control if Examples should be built.
+#
+AC_ARG_ENABLE([examples],
+ AS_HELP_STRING([--enable-examples], [Enable examples compilation [default=no]]),
+ [enable_examples=$enableval],
+ [enable_examples="no"])
+
+AM_CONDITIONAL(ENABLE_EXAMPLES, [test "$enable_examples" = "yes"])
# We use -Wno-address because SQLITE3_CALL() has an ifdefed definition that
# makes it hard to always avoid the warning.
# We use -Wno-unused-variable because the lemon parser generator (in libgda's sources),
@@ -1068,6 +1077,8 @@ doc/mallard/Makefile
doc/mallard/gda-vala/Makefile
doc/mallard/gda-vala/C/Makefile
data/Makefile
+examples/Makefile
+examples/DDL/Makefile
stamp.h
])
AC_OUTPUT
@@ -1104,6 +1115,7 @@ echo " Building Libxslt extension: `if test x$have_xslt != xno; then echo yes;
echo " Building libgda GObject Introspection: `if test x$enable_gda_gi = xyes; then echo yes; else echo
no; fi`"
echo " Building libgda-ui GObject Introspection: `if test x$enable_gdaui_gi != xno; then echo yes; else
echo no; fi`"
echo " Building Gtk-Doc: `if test x$enable_gtk_doc != xno; then echo yes; else echo no; fi`"
+echo " Building Examples: `if test x$enable_examples = xyes; then echo yes; else echo no; fi`"
echo " Building Help (GdaBrowser): `if test x$with_gdu != xno; then echo yes; else echo no; fi`"
echo " Building GDA Vala Bindings (--enable-vala): `if test x$vapigen_pkg_found != xyes; then echo no;
else echo yes; fi`"
echo " Vala API version to use: $vala_api"
diff --git a/examples/DDL/Makefile.am b/examples/DDL/Makefile.am
new file mode 100644
index 000000000..39ddcd108
--- /dev/null
+++ b/examples/DDL/Makefile.am
@@ -0,0 +1,13 @@
+bin_PROGRAMS = ddl
+
+ddl_SOURCES = ddl.c
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_builddir) \
+ -I$(top_builddir)/libgda \
+ -I$(top_srcdir)/libgda \
+ $(COREDEPS_CFLAGS)
+
+AM_LDFLAGS = $(top_builddir)/libgda/libgda-6.0.la \
+ $(COREDEPS_LIBS)
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644
index 000000000..2c2bcfbca
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = DDL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]