[gnome-maps/wip/binary] Make gnome-maps a binary



commit a06ce6689c5ef50dda16c13fc9981e6a324a926a
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Tue Jan 21 06:50:12 2014 +0100

    Make gnome-maps a binary

 configure.ac                                       |    8 +++-
 src/Makefile-js.am                                 |   30 +++--------
 src/Makefile.am                                    |   55 ++++++++++++-------
 ...gnome-maps.gresource.xml => data.gresource.xml} |    0
 src/gnome-maps.in                                  |   18 ------
 src/js.gresource.xml                               |   21 ++++++++
 6 files changed, 72 insertions(+), 60 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6d475b6..5e21f67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ AC_INIT([gnome-maps],
         [gnome-maps])
 
 AC_CONFIG_HEADERS([config/config.h])
-AC_CONFIG_SRCDIR([src/main.js])
+AC_CONFIG_SRCDIR([src/gnome-maps.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([config])
 
@@ -22,6 +22,12 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext d
 IT_PROG_INTLTOOL(0.40.0)
 PKG_PROG_PKG_CONFIG([0.22])
 
+SHARED_PCS="gtk+-3.0                  >= 3.11.4
+            gjs-internals-1.0         >= 1.39.0 
+            gobject-introspection-1.0 >= 0.10.1"
+
+PKG_CHECK_MODULES(GNOME_MAPS, $SHARED_PCS)
+
 # no stupid static libraries
 AM_DISABLE_STATIC
 # enable libtool
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..1f57860 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,23 +20,38 @@ 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/js.c                        \
+       $(top_builddir)/src/js.h                        \
+       $(NULL)
+
+gnome_maps_CPPFLAGS =                                          \
+       $(GNOME_MAPS_CFLAGS)                                    \
+       -DLOCALEDIR=\"$(localedir)\"                    \
+       -DGNOME_MAPS_PKGLIBDIR=\"$(pkglibdir)\"
+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..cb9a57c
--- /dev/null
+++ b/src/js.gresource.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/maps">
+    <file>application.js</file>
+    <file>config.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>path.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]