From 761a9fff03812af3c0beb26da1094c69fc3a0a72 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 31 Jul 2013 23:04:40 -0500 Subject: add a vapi/ directory off the top package directory --- configure.ac | 1 + src/Makefile.am | 9 +++++++-- src/config.vapi | 3 --- src/indicator-bluetooth-service.vala | 6 +++--- vapi/config.vapi | 8 ++++++++ 5 files changed, 19 insertions(+), 8 deletions(-) delete mode 100644 src/config.vapi create mode 100644 vapi/config.vapi diff --git a/configure.ac b/configure.ac index f9303de..3179a1e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,6 @@ AC_INIT(indicator-bluetooth, 0.0.6) AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz foreign]) +AC_CONFIG_HEADERS([config.h]) AM_SILENT_RULES([yes]) AM_MAINTAINER_MODE diff --git a/src/Makefile.am b/src/Makefile.am index 8f8d7eb..5fcfc5c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,12 +3,15 @@ indicatordir = ${libdir}/indicators3/7 indicator_LTLIBRARIES = libbluetooth.la indicator_bluetooth_service_SOURCES = \ - config.vapi \ indicator3-0.4.vapi \ gnome-bluetooth-1.0.vapi \ indicator-bluetooth-service.vala indicator_bluetooth_service_VALAFLAGS = \ + --ccode \ + --vapidir=$(top_srcdir)/vapi/ \ + --vapidir=./ \ + --pkg config \ --pkg posix \ --pkg glib-2.0 \ --pkg gtk+-3.0 \ @@ -23,12 +26,14 @@ indicator_bluetooth_service_LDADD = \ $(INDICATOR_BLUETOOTH_SERVICE_LIBS) libbluetooth_la_SOURCES = \ - config.vapi \ indicator3-0.4.vapi \ indicator-bluetooth.vala \ libido3-0.1.vapi libbluetooth_la_VALAFLAGS = \ + --ccode \ + --vapidir=$(top_srcdir)/vapi/ \ + --vapidir=./ \ --pkg posix \ --pkg glib-2.0 \ --pkg gtk+-3.0 \ diff --git a/src/config.vapi b/src/config.vapi deleted file mode 100644 index a1bb094..0000000 --- a/src/config.vapi +++ /dev/null @@ -1,3 +0,0 @@ -public const string VERSION; -public const string GETTEXT_PACKAGE; -public const string LOCALE_DIR; diff --git a/src/indicator-bluetooth-service.vala b/src/indicator-bluetooth-service.vala index ac84f33..e9d8e76 100644 --- a/src/indicator-bluetooth-service.vala +++ b/src/indicator-bluetooth-service.vala @@ -397,9 +397,9 @@ private void show_control_center (string panel) public static int main (string[] args) { Intl.setlocale (LocaleCategory.ALL, ""); - Intl.bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); - Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - Intl.textdomain (GETTEXT_PACKAGE); + Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.GNOMELOCALEDIR); + Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8"); + Intl.textdomain (Config.GETTEXT_PACKAGE); var loop = new MainLoop (); diff --git a/vapi/config.vapi b/vapi/config.vapi new file mode 100644 index 0000000..15c4c88 --- /dev/null +++ b/vapi/config.vapi @@ -0,0 +1,8 @@ +[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "../config.h")] +namespace Config { + public const string GETTEXT_PACKAGE; + public const string GNOMELOCALEDIR; + public const string PKGDATADIR; + public const string PACKAGE_NAME; + public const string PACKAGE_VERSION; +} -- cgit v1.2.3