[libpeas] Cleanup resource generation in the plugin loaders
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Cleanup resource generation in the plugin loaders
- Date: Wed, 16 Dec 2015 01:06:03 +0000 (UTC)
commit 8327a10b367397462ba680bfa8c7bba334dfbd08
Author: Garrett Regier <garrettregier gmail com>
Date: Fri Nov 20 03:44:30 2015 -0800
Cleanup resource generation in the plugin loaders
.gitignore | 2 +-
loaders/lua5.1/Makefile.am | 13 ++-----------
loaders/lua5.1/resources/Makefile.am | 23 +++++++++++++++--------
loaders/python/Makefile.am | 14 ++++++++++----
loaders/python3/Makefile.am | 19 ++++++++++++-------
5 files changed, 40 insertions(+), 31 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0accc2c..a8aba8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,7 +52,7 @@ Makefile.in
/intltool-update.in
/libtool
/ltmain.sh
-/loaders/lua5.1/peas-lua-resources.c
+/loaders/lua5.1/resources/peas-lua-resources.c
/loaders/python/peas-python-resources.c
/loaders/python3/peas-python3-resources.c
/m4
diff --git a/loaders/lua5.1/Makefile.am b/loaders/lua5.1/Makefile.am
index 24405e3..097224e 100644
--- a/loaders/lua5.1/Makefile.am
+++ b/loaders/lua5.1/Makefile.am
@@ -17,11 +17,11 @@ loader_LTLIBRARIES = liblua51loader.la
liblua51loader_la_SOURCES = \
peas-lua-internal.c \
peas-lua-internal.h \
- peas-lua-resources.c \
peas-plugin-loader-lua.c \
peas-plugin-loader-lua.h \
peas-lua-utils.c \
- peas-lua-utils.h
+ peas-lua-utils.h \
+ resources/peas-lua-resources.c
liblua51loader_la_LDFLAGS = \
$(LOADER_LIBTOOL_FLAGS) \
@@ -32,14 +32,5 @@ liblua51loader_la_LIBADD = \
$(PEAS_LIBS) \
$(LUA51_LIBS)
-loader_resources_deps = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/resources
--generate-dependencies $(srcdir)/resources/peas-lua.gresource.xml)
-peas-lua-resources.c: $(srcdir)/resources/peas-lua.gresource.xml $(loader_resources_deps)
- $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --internal --target=$@ --sourcedir=$(srcdir)/resources
--generate-source $(srcdir)/resources/peas-lua.gresource.xml
-
-EXTRA_DIST = \
- $(loader_resources_deps)
-
-CLEANFILES = peas-lua-resources.c
-
gcov_sources = $(liblua51loader_la_SOURCES)
include $(top_srcdir)/Makefile.gcov
diff --git a/loaders/lua5.1/resources/Makefile.am b/loaders/lua5.1/resources/Makefile.am
index a06bdd6..fd89382 100644
--- a/loaders/lua5.1/resources/Makefile.am
+++ b/loaders/lua5.1/resources/Makefile.am
@@ -1,19 +1,26 @@
-LUA_FILES = \
- peas-lua-internal.lua \
- peas-lua-strict.lua
+loader_resources_deps = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir="$(srcdir)" --generate-dependencies
"$(srcdir)/peas-lua.gresource.xml")
+loader_resources_c_deps = $(srcdir)/peas-lua.gresource.xml $(loader_resources_deps)
-LUAC_FILES = $(addsuffix c,$(LUA_FILES))
+LUAC_FILES = $(addsuffix c,$(loader_resources_deps))
+
+peas-lua-resources.c: $(loader_resources_c_deps)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
+ --target="$@" \
+ --sourcedir="$(srcdir)" \
+ --generate-source \
+ --internal \
+ "$(srcdir)/peas-lua.gresource.xml"
%.luac: %.lua
$(AM_V_GEN) $(LUA51_BIN) $(srcdir)/peas-lua-compile.lua $< $@
-all-local: $(LUAC_FILES)
+all-local: $(LUAC_FILES) peas-lua-resources.c
CLEANFILES = \
+ peas-lua-resources.c \
$(LUAC_FILES)
EXTRA_DIST = \
- peas-lua-compile.lua \
- peas-lua.gresource.xml \
- $(LUA_FILES)
+ peas-lua-compile.lua \
+ $(loader_resources_c_deps)
diff --git a/loaders/python/Makefile.am b/loaders/python/Makefile.am
index ac3997e..eb0c617 100644
--- a/loaders/python/Makefile.am
+++ b/loaders/python/Makefile.am
@@ -38,13 +38,19 @@ peas-python-internal.pyc: peas-python-internal.py
all-local: peas-python-internal.pyc
loader_resources_deps = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/peas-python.gresource.xml)
-peas-python-resources.c: $(srcdir)/peas-python.gresource.xml $(loader_resources_deps)
- $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --internal --target=$@ --sourcedir=$(srcdir) --generate-source
$(srcdir)/peas-python.gresource.xml
+loader_resources_c_deps = $(srcdir)/peas-python.gresource.xml $(loader_resources_deps)
+
+peas-python-resources.c: $(loader_resources_c_deps)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
+ --target="$@" \
+ --sourcedir="$(srcdir)" \
+ --generate-source \
+ --internal \
+ "$(srcdir)/peas-python.gresource.xml"
EXTRA_DIST = \
peas-python-compile.py \
- peas-python.gresource.xml \
- $(loader_resources_deps)
+ $(loader_resources_c_deps)
CLEANFILES = \
peas-python-internal.pyc \
diff --git a/loaders/python3/Makefile.am b/loaders/python3/Makefile.am
index 8348d1f..bb7485c 100644
--- a/loaders/python3/Makefile.am
+++ b/loaders/python3/Makefile.am
@@ -37,13 +37,18 @@ peas-python3-internal.pyc: $(srcdir)/../python/peas-python-internal.py
all-local: peas-python3-internal.pyc
-loader_resources_deps = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/peas-python3.gresource.xml)
-peas-python3-resources.c: $(srcdir)/peas-python3.gresource.xml $(loader_resources_deps)
- $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --internal --target=$@ --sourcedir=$(srcdir) --generate-source
$(srcdir)/peas-python3.gresource.xml
-
-EXTRA_DIST = \
- peas-python3.gresource.xml \
- $(loader_resources_deps)
+loader_resources_deps = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir="$(srcdir)" --generate-dependencies
"$(srcdir)/peas-python3.gresource.xml")
+loader_resources_c_deps = $(srcdir)/peas-python3.gresource.xml $(loader_resources_deps)
+
+peas-python3-resources.c: $(loader_resources_c_deps)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
+ --target="$@" \
+ --sourcedir="$(srcdir)" \
+ --generate-source \
+ --internal \
+ "$(srcdir)/peas-python3.gresource.xml"
+
+EXTRA_DIST = $(loader_resources_c_deps)
CLEANFILES = \
peas-python3-internal.pyc \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]