[recipes/meson2: 8/19] build: Rename generated files that are #included



commit 14723f0b0d0b1308b8449592564e5c6b7339800d
Author: Nirbheek Chauhan <nirbheek centricular com>
Date:   Sat Feb 18 22:18:30 2017 +0530

    build: Rename generated files that are #included
    
    The extension .c implies they are valid C files but they are not since
    they are directly #include-ed to initialize a static array.
    
    With .c as the extension, Meson will try to build them as C sources
    instead of ignoring them like they are supposed to be.

 po/POTFILES.in      |    6 +++---
 src/Makefile.am     |   18 +++++++++---------
 src/gr-ingredient.c |    4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 78e628c..b7c09f9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -71,6 +71,6 @@ src/gr-spice-row.c
 src/gr-unit.c
 src/gr-utils.c
 src/gr-window.c
-src/ingredients.c
-src/no-ingredients.c
-src/segments.c
+src/ingredients.inc
+src/no-ingredients.inc
+src/segments.inc
diff --git a/src/Makefile.am b/src/Makefile.am
index 4f0ccb3..761096d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -137,18 +137,18 @@ gnome_recipes_SOURCES = \
 BUILT_SOURCES = \
        resources-ui.c          \
        resources-images.c      \
-       ingredients.c           \
-       no-ingredients.c        \
-       segments.c              \
+       ingredients.inc         \
+       no-ingredients.inc      \
+       segments.inc            \
        types.h                 \
        types.c                 \
        gr-shell-search-provider-dbus.h \
        gr-shell-search-provider-dbus.c
 
 DISTCLEANFILES = \
-       ingredients.c           \
-       no-ingredients.c        \
-       segments.c
+       ingredients.inc         \
+       no-ingredients.inc      \
+       segments.inc
 
 MAINTAINERCLEANFILES = \
        resources-ui.c          \
@@ -158,13 +158,13 @@ MAINTAINERCLEANFILES = \
        gr-shell-search-provider-dbus.h \
        gr-shell-search-provider-dbus.c
 
-segments.c: $(top_srcdir)/data/segments.list
+segments.inc: $(top_srcdir)/data/segments.list
        $(AM_V_GEN) $(SED) -e 's/^\(.*\)$$/     N_("\1"),/' $^ > $@
 
-ingredients.c: $(top_srcdir)/data/ingredients.list
+ingredients.inc: $(top_srcdir)/data/ingredients.list
        $(AM_V_GEN) $(SED) -e 's/^\(.*\)$$/     N_("\1"),/' $^ > $@
 
-no-ingredients.c: $(top_srcdir)/data/ingredients.list
+no-ingredients.inc: $(top_srcdir)/data/ingredients.list
        $(AM_V_GEN) $(SED) -e 's/^\(.*\)$$/     N_("no \1"),/' $^ > $@
 
 resource_ui_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies 
$(srcdir)/recipes-ui.gresource.xml)
diff --git a/src/gr-ingredient.c b/src/gr-ingredient.c
index b55bd15..87754e2 100644
--- a/src/gr-ingredient.c
+++ b/src/gr-ingredient.c
@@ -28,12 +28,12 @@
 
 
 static const char *names_[] = {
-#include "ingredients.c"
+#include "ingredients.inc"
         NULL
 };
 
 static const char *negations[] = {
-#include "no-ingredients.c"
+#include "no-ingredients.inc"
         NULL
 };
 


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