[gnome-maps/wip/binary] Make gnome-maps a binary
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/binary] Make gnome-maps a binary
- Date: Tue, 21 Jan 2014 05:55:45 +0000 (UTC)
commit a6b043691ac5c8a8cadc4467721a6e8373775a23
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date: Tue Jan 21 06:50:12 2014 +0100
Make gnome-maps a binary
src/Makefile-js.am | 30 +++--------
src/Makefile.am | 53 ++++++++++++-------
...gnome-maps.gresource.xml => data.gresource.xml} | 0
src/gnome-maps.in | 18 -------
src/js.gresource.xml | 19 +++++++
5 files changed, 61 insertions(+), 59 deletions(-)
---
diff --git a/src/Makefile-js.am b/src/Makefile-js.am
index a7055f5..44ce4c4 100644
--- a/src/Makefile-js.am
+++ b/src/Makefile-js.am
@@ -1,21 +1,3 @@
-jsdir = $(pkgdatadir)/js/
-dist_js_DATA = \
- application.js \
- main.js \
- mainWindow.js \
- mapLocation.js \
- mapView.js \
- path.js \
- sidebar.js \
- settings.js \
- utils.js \
- userLocation.js \
- geoclue.js \
- zoomControl.js \
- searchPopup.js \
- contextMenu.js \
- placeStore.js
-
BUILT_SOURCES += \
path.js \
config.js
@@ -25,9 +7,15 @@ path.js: Makefile path.js.in
config.js: Makefile config.js.in
$(AM_V_GEN) $(do_subst) $(srcdir)/config.js.in > $@
-nodist_js_DATA = \
- path.js \
- config.js
+js_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/js.gresource.xml)
+js.h: js.gresource.xml $(js_files) path.js config.js
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir)
--generate --c-name js $<
+js.c: js.gresource.xml $(js_files) path.js config.js
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir)
--generate --c-name js $<
+
+js_built_sources = js.c js.h
+
+BUILT_SOURCES += $(js_built_sources)
CLEANFILES += \
$(BUILT_SOURCES)
diff --git a/src/Makefile.am b/src/Makefile.am
index b5dbbc0..0d71eec 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,23 +20,36 @@ do_subst = sed -e 's|@abs_top_srcdir[ ]|$(abs_top_srcdir)|g' \
include $(INTROSPECTION_MAKEFILE)
include Makefile-js.am
-resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/gnome-maps.gresource.xml)
-gnome-maps.gresource: gnome-maps.gresource.xml $(resource_files)
- $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) $<
-EXTRA_DIST += gnome-maps.gresource.xml $(resource_files)
-
-resourcedir = $(pkgdatadir)
-resource_DATA = gnome-maps.gresource
-
-CLEANFILES += gnome-maps.gresource
-
-bin_SCRIPTS = gnome-maps
-
-gnome-maps: gnome-maps.in
- $(AM_V_GEN) $(do_subst) $< > $@
- chmod +x $@
-
-CLEANFILES += \
- gnome-maps
-EXTRA_DIST += \
- gnome-maps.in
+data_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/data.gresource.xml)
+data.h: data.gresource.xml $(data_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir)
--generate --c-name data $<
+data.c: data.gresource.xml $(js_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir)
--generate --c-name data $<
+
+data_built_sources = data.c data.h
+
+BUILT_SOURCES += $(data_built_sources)
+
+bin_PROGRAMS = gnome-maps
+
+CLEANFILES += \
+ gnome-maps \
+ data.c \
+ data.h \
+ js.c \
+ js.h
+
+
+gnome_maps_SOURCES = gnome-maps.c \
+ $(NULL)
+nodist_gnome_maps_SOURCES = \
+ $(top_builddir)/src/data.c \
+ $(top_builddir)/src/data.h \
+ $(top_builddir)/src/src.c \
+ $(top_builddir)/src/src.h \
+ $(NULL)
+
+gnome_maps_CPPFLAGS = \
+ $(GNOME_MAPS_CFLAGS)
+gnome_maps_LDADD = \
+ $(GNOME_MAPS_LIBS)
diff --git a/src/gnome-maps.gresource.xml b/src/data.gresource.xml
similarity index 100%
rename from src/gnome-maps.gresource.xml
rename to src/data.gresource.xml
diff --git a/src/js.gresource.xml b/src/js.gresource.xml
new file mode 100644
index 0000000..66900b4
--- /dev/null
+++ b/src/js.gresource.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/maps">
+ <file>application.js</file>
+ <file>contextMenu.js</file>
+ <file>geoclue.js</file>
+ <file>main.js</file>
+ <file>mainWindow.js</file>
+ <file>mapLocation.js</file>
+ <file>mapView.js</file>
+ <file>placeStore.js</file>
+ <file>searchPopup.js</file>
+ <file>settings.js</file>
+ <file>sidebar.js</file>
+ <file>userLocation.js</file>
+ <file>utils.js</file>
+ <file>zoomControl.js</file>
+ </gresource>
+</gresources>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]