[gnome-builder/wip/chergert/templates] templates: --enable-debug and vala support
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/templates] templates: --enable-debug and vala support
- Date: Tue, 26 Jan 2016 02:45:12 +0000 (UTC)
commit be5030cdc83890442f769e8a62c7cf965b162c3b
Author: Christian Hergert <chergert redhat com>
Date: Tue Jan 26 03:44:09 2016 +0100
templates: --enable-debug and vala support
.../library-template/library_template/__init__.py | 1 +
.../library_template/shared-library/Makefile.am | 2 +-
.../library_template/shared-library/configure.ac | 29 ++++++++++++++++++++
3 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/plugins/library-template/library_template/__init__.py
b/plugins/library-template/library_template/__init__.py
index fbcf4ec..2180b1f 100644
--- a/plugins/library-template/library_template/__init__.py
+++ b/plugins/library-template/library_template/__init__.py
@@ -85,6 +85,7 @@ class LibraryProjectTemplate(Ide.TemplateBase, Ide.ProjectTemplate):
scope.get('enable_i18n').assign_boolean(True)
scope.get('enable_gtk_doc').assign_boolean(False)
scope.get('enable_gobject_introspection').assign_boolean(True)
+ scope.get('enable_vala').assign_boolean(True)
scope.get('license').assign_string('/* license */')
expands = {
diff --git a/plugins/library-template/library_template/shared-library/Makefile.am
b/plugins/library-template/library_template/shared-library/Makefile.am
index 6c5a928..0bbea60 100644
--- a/plugins/library-template/library_template/shared-library/Makefile.am
+++ b/plugins/library-template/library_template/shared-library/Makefile.am
@@ -24,7 +24,7 @@ AUTHORS:
echo Creating $@ && \
( cd "$(top_srcdir)" && \
echo '# Generated by Makefile. Do not edit.'; echo; \
- git log --no-merges --pretty=format:"%an" libide src plugins \
+ git log --no-merges --pretty=format:"%an" $(SUBDIRS) \
| sort | uniq ) > $ tmp \
&& mv -f $ tmp $@ \
|| ( rm -f $ tmp ; \
diff --git a/plugins/library-template/library_template/shared-library/configure.ac
b/plugins/library-template/library_template/shared-library/configure.ac
index 366b0eb..52bc791 100644
--- a/plugins/library-template/library_template/shared-library/configure.ac
+++ b/plugins/library-template/library_template/shared-library/configure.ac
@@ -68,6 +68,9 @@ GLIB_GSETTINGS
{{if enable_gobject_introspection}}
GOBJECT_INTROSPECTION_CHECK([1.42.0])
{{end}}
+{{if enable_vala}}
+VAPIGEN_CHECK
+{{end}}
dnl ***********************************************************************
@@ -77,6 +80,32 @@ PKG_CHECK_MODULES({{NAME}}, [{{packages}}])
dnl ***********************************************************************
+dnl Add extra debugging with --enable-debug
+dnl ***********************************************************************
+m4_define([debug_default],[m4_if(m4_eval(minor_version%2),[1],[yes],[minimum])])
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
+ [turn on debugging @<:@default=debug_default@:>@]),
+ ,
+ enable_debug=debug_default)
+AS_CASE(["$enable_debug"],
+ [yes],[
+ CFLAGS="$CFLAGS -O0"
+ CFLAGS="$CFLAGS -g"
+ ],
+ [minimum],[
+ CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"
+ ],
+ [no],[
+ CFLAGS="$CFLAGS -DG_DISABLE_ASSERT"
+ CFLAGS="$CFLAGS -DG_DISABLE_CHECKS"
+ CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"
+ ],
+ [])
+AC_SUBST(CFLAGS)
+
+
+dnl ***********************************************************************
dnl Initialize Libtool
dnl ***********************************************************************
LT_PREREQ([2.2])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]