[devhelp/wip/devhelp-next: 25/31] Move GResources from the lib to the app



commit 1b885e535731ad8a57326d904dfe0e5d1c1dd4f0
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Feb 22 15:34:33 2018 +0100

    Move GResources from the lib to the app
    
    The library doesn't use those GResources, only the app.

 devhelp/Makefile.am                |   14 --------------
 po/POTFILES.in                     |   10 +++++-----
 src/Makefile.am                    |   30 ++++++++++++++++++++++++++++++
 {devhelp => src}/dh-assistant.ui   |    0
 {devhelp => src}/dh-preferences.ui |    0
 {devhelp => src}/dh-window.ui      |    0
 {devhelp => src}/dh.gresource.xml  |    0
 {devhelp => src}/help-overlay.ui   |    0
 {devhelp => src}/menus.ui          |    0
 9 files changed, 35 insertions(+), 19 deletions(-)
---
diff --git a/devhelp/Makefile.am b/devhelp/Makefile.am
index a45e003..8687bf4 100644
--- a/devhelp/Makefile.am
+++ b/devhelp/Makefile.am
@@ -60,7 +60,6 @@ libdevhelp_built_public_c_files =     \
 libdevhelp_built_sources =                     \
        $(libdevhelp_built_public_headers)      \
        $(libdevhelp_built_public_c_files)      \
-       dh-resources.c                          \
        $(NULL)
 
 BUILT_SOURCES =                        \
@@ -110,17 +109,6 @@ libdevhelp_3_la_LDFLAGS =                  \
        -version-info $(LIBDEVHELP_LT_VERSION)  \
        -export-symbols-regex ^dh_
 
-resource_files =               \
-       dh-assistant.ui         \
-       dh-preferences.ui       \
-       dh-window.ui            \
-       help-overlay.ui         \
-       menus.ui                \
-       $(NULL)
-
-dh-resources.c: dh.gresource.xml $(resource_files)
-       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name dh 
$(srcdir)/dh.gresource.xml
-
 dh-enum-types.h: dh-enum-types.h.template $(libdevhelp_public_headers) $(GLIB_MKENUMS)
        $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template dh-enum-types.h.template 
$(libdevhelp_public_headers)) > $@
 
@@ -130,8 +118,6 @@ dh-enum-types.c: dh-enum-types.c.template $(libdevhelp_public_headers) $(GLIB_MK
 EXTRA_DIST =                           \
        dh-enum-types.c.template        \
        dh-enum-types.h.template        \
-       dh.gresource.xml                \
-       $(resource_files)               \
        $(NULL)
 
 CLEANFILES = $(BUILT_SOURCES)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1286ab4..69459d9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,7 +3,6 @@
 data/org.gnome.Devhelp.appdata.xml.in
 data/org.gnome.Devhelp.desktop.in.in
 data/org.gnome.devhelp.gschema.xml
-devhelp/dh-assistant.ui
 devhelp/dh-assistant-view.c
 devhelp/dh-book.c
 devhelp/dh-book-tree.c
@@ -11,20 +10,21 @@ devhelp/dh-completion.c
 devhelp/dh-keyword-model.c
 devhelp/dh-link.c
 devhelp/dh-parser.c
-devhelp/dh-preferences.ui
 devhelp/dh-search-context.c
 devhelp/dh-sidebar.c
 devhelp/dh-util.c
-devhelp/dh-window.ui
-devhelp/help-overlay.ui
-devhelp/menus.ui
 plugins/gedit-plugin/devhelp.plugin.desktop.in
 plugins/gedit-plugin/devhelp.py
 src/dh-app.c
 src/dh-assistant.c
+src/dh-assistant.ui
 src/dh-main.c
+src/dh-preferences.ui
 src/dh-tab.c
 src/dh-tab-label.c
 src/dh-web-view.c
 src/dh-window.c
+src/dh-window.ui
+src/help-overlay.ui
+src/menus.ui
 src/tepl-info-bar.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 63e92c7..1ff953c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,6 +31,14 @@ app_c_files =                        \
        tepl-info-bar.c         \
        $(NULL)
 
+app_built_sources =    \
+       dh-resources.c  \
+       $(NULL)
+
+BUILT_SOURCES =                \
+       $(app_built_sources)    \
+       $(NULL)
+
 # The application
 bin_PROGRAMS = devhelp
 
@@ -39,6 +47,10 @@ devhelp_SOURCES =    \
        $(app_c_files)  \
        $(NULL)
 
+# Do not distribute generated files.
+nodist_devhelp_SOURCES =       \
+       $(app_built_sources)
+
 devhelp_CPPFLAGS =     \
        $(AM_CPPFLAGS)
 
@@ -53,4 +65,22 @@ devhelp_LDADD =                              \
 devhelp_LDFLAGS =      \
        $(AM_LDFLAGS)
 
+resource_files =               \
+       dh-assistant.ui         \
+       dh-preferences.ui       \
+       dh-window.ui            \
+       help-overlay.ui         \
+       menus.ui                \
+       $(NULL)
+
+dh-resources.c: dh.gresource.xml $(resource_files)
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name dh 
$(srcdir)/dh.gresource.xml
+
+EXTRA_DIST =                   \
+       dh.gresource.xml        \
+       $(resource_files)       \
+       $(NULL)
+
+CLEANFILES = $(BUILT_SOURCES)
+
 -include $(top_srcdir)/git.mk
diff --git a/devhelp/dh-assistant.ui b/src/dh-assistant.ui
similarity index 100%
rename from devhelp/dh-assistant.ui
rename to src/dh-assistant.ui
diff --git a/devhelp/dh-preferences.ui b/src/dh-preferences.ui
similarity index 100%
rename from devhelp/dh-preferences.ui
rename to src/dh-preferences.ui
diff --git a/devhelp/dh-window.ui b/src/dh-window.ui
similarity index 100%
rename from devhelp/dh-window.ui
rename to src/dh-window.ui
diff --git a/devhelp/dh.gresource.xml b/src/dh.gresource.xml
similarity index 100%
rename from devhelp/dh.gresource.xml
rename to src/dh.gresource.xml
diff --git a/devhelp/help-overlay.ui b/src/help-overlay.ui
similarity index 100%
rename from devhelp/help-overlay.ui
rename to src/help-overlay.ui
diff --git a/devhelp/menus.ui b/src/menus.ui
similarity index 100%
rename from devhelp/menus.ui
rename to src/menus.ui


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