[telegnome] Fix distcheck



commit d4c4a95f5a74d4397a8c55dee39541eea1a72283
Author: Colin Watson <cjwatson debian org>
Date:   Mon Feb 15 14:09:01 2016 +0000

    Fix distcheck
    
    * src/paths.vala.in: Rename to ...
    * src/paths.c.in: ... this, translated to C.  (This is needed so
    that builds from tarballs do not require valac.)
    * src/paths.h, src/paths.vapi: New files.
    * src/Makefile.am (telegnome_SOURCES): Replace paths.vala with
    paths.h and paths.vapi.
    (telegnome_built): Add paths.c.
    (CLEANFILES): Remove *.c.
    (paths.vala): Replace with similar rule producing paths.c.
    (EXTRA_DIST): Add default-channels.cfg and paths.c.in.
    * src/.gitignore: Replace paths.vala with paths.c.
    
    * po/POTFILES.skip: New file, listing src/gui.c.

 po/POTFILES.skip                  |    1 +
 src/.gitignore                    |    2 +-
 src/Makefile.am                   |   21 ++++++++-------------
 src/{paths.vala.in => paths.c.in} |    8 ++------
 src/{paths.vala.in => paths.h}    |   13 ++-----------
 src/{paths.vala.in => paths.vapi} |   14 ++++----------
 6 files changed, 18 insertions(+), 41 deletions(-)
---
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
new file mode 100644
index 0000000..b7bcc4c
--- /dev/null
+++ b/po/POTFILES.skip
@@ -0,0 +1 @@
+src/gui.c
diff --git a/src/.gitignore b/src/.gitignore
index 5f4fbf2..0ab7a40 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,7 +1,7 @@
 *.c
 *.o
 .deps
-paths.vala
+paths.c
 resources.c
 resources.h
 telegnome
diff --git a/src/Makefile.am b/src/Makefile.am
index 6074160..13cba05 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,33 +15,26 @@ telegnome_SOURCES = \
        http.vala \
        legacy-config.vala \
        main.vala \
-       paths.vala \
+       paths.h \
+       paths.vapi \
        pixpack.vala \
        prefs.vala \
        uuid.vapi
 
 telegnome_built = \
+       paths.c \
        resources.c \
        resources.h
 BUILT_SOURCES = $(telegnome_built)
 nodist_telegnome_SOURCES = $(telegnome_built)
-CLEANFILES = \
-       $(telegnome_built) \
-       app.c \
-       channel.c \
-       gui.c \
-       http.c \
-       legacy-config.c \
-       main.c \
-       pixpack.c \
-       prefs.c
+CLEANFILES = $(telegnome_built)
 
 do_subst = sed \
        -e 's,[ ]sysconfdir[@],$(sysconfdir),g' \
        -e 's,[ ]localedir[@],$(localedir),g'
 
-paths.vala: paths.vala.in Makefile
-       $(do_subst) < $(srcdir)/paths.vala.in > $@
+paths.c: $(srcdir)/paths.c.in Makefile
+       $(do_subst) < $(srcdir)/paths.c.in > $@
 
 resources.c resources.h: telegnome.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) 
--generate-dependencies --sourcedir $(srcdir) $(srcdir)/telegnome.gresource.xml)
        $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate 
--c-name tg $<
@@ -50,7 +43,9 @@ LINK_FLAGS= $(GNOME_LIBDIR) $(INTLLIBS) $(GHTTP_LIB)
 telegnome_LDADD=$(LINK_FLAGS) $(GNOME_LIBDIR) $(GLIB_LIBS) $(TELEGNOME_LIBS)
 
 EXTRA_DIST = \
+       default-channels.cfg \
        menus.ui \
+       paths.c.in \
        prefs.ui \
        telegnome.gresource.xml \
        telegnome.ui
diff --git a/src/paths.vala.in b/src/paths.c.in
similarity index 90%
copy from src/paths.vala.in
copy to src/paths.c.in
index 5d07b66..9065776 100644
--- a/src/paths.vala.in
+++ b/src/paths.c.in
@@ -19,14 +19,10 @@
 
 /* Configured paths. */
 
-namespace Tg {
-
-public string get_sysconf_dir () {
+const char *tg_get_sysconf_dir (void) {
        return "@sysconfdir@";
 }
 
-public string get_locale_dir () {
+const char *tg_get_locale_dir (void) {
        return "@localedir@";
 }
-
-}
diff --git a/src/paths.vala.in b/src/paths.h
similarity index 85%
copy from src/paths.vala.in
copy to src/paths.h
index 5d07b66..79e6b97 100644
--- a/src/paths.vala.in
+++ b/src/paths.h
@@ -19,14 +19,5 @@
 
 /* Configured paths. */
 
-namespace Tg {
-
-public string get_sysconf_dir () {
-       return "@sysconfdir@";
-}
-
-public string get_locale_dir () {
-       return "@localedir@";
-}
-
-}
+extern const char *tg_get_sysconf_dir (void);
+extern const char *tg_get_locale_dir (void);
diff --git a/src/paths.vala.in b/src/paths.vapi
similarity index 79%
rename from src/paths.vala.in
rename to src/paths.vapi
index 5d07b66..328cedf 100644
--- a/src/paths.vala.in
+++ b/src/paths.vapi
@@ -17,16 +17,10 @@
  *
  */
 
-/* Configured paths. */
+/* Vala bindings for configured paths. */
 
+[CCode (cheader_filename = "paths.h", lower_case_cprefix = "tg_")]
 namespace Tg {
-
-public string get_sysconf_dir () {
-       return "@sysconfdir@";
-}
-
-public string get_locale_dir () {
-       return "@localedir@";
-}
-
+       public static unowned string get_sysconf_dir ();
+       public static unowned string get_locale_dir ();
 }


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