[gnome-weather] Add automake bits to install icons
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-weather] Add automake bits to install icons
- Date: Wed, 5 Jun 2013 19:34:49 +0000 (UTC)
commit 4cca307bd4329b4309e3be7bc62ee9060b067bb9
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Wed Jun 5 21:32:48 2013 +0200
Add automake bits to install icons
First copied from gnome-clocks, but then I noticed it looked better
with recursive make and nobase_
configure.ac | 1 +
data/Makefile.am | 4 ++++
data/icons/Makefile.am | 25 +++++++++++++++++++++++++
3 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4d29738..4a0e1dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,6 +36,7 @@ AC_SUBST(GLIB_COMPILE_RESOURCES)
AC_CONFIG_FILES([
Makefile
data/Makefile
+ data/icons/Makefile
libgd/Makefile
src/Makefile
po/Makefile.in
diff --git a/data/Makefile.am b/data/Makefile.am
index 1e429a8..c51aa40 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,3 +1,7 @@
+# I chose to use recursive automake so I can use nobase_ and avoid
+# 5 different directory declarations
+SUBDIRS = icons
+
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/gnome-weather.gresource.xml)
gnome-weather.gresource: gnome-weather.gresource.xml $(resource_files)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) $<
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
new file mode 100644
index 0000000..00460c3
--- /dev/null
+++ b/data/icons/Makefile.am
@@ -0,0 +1,25 @@
+icondir = $(datadir)/icons/
+
+# I'd like to use nobase_dist_icon_DATA, but
+# automake doesn't recognizes two prefixes at once
+nobase_icon_DATA = \
+ hicolor/16x16/apps/gnome-weather.png \
+ hicolor/22x22/apps/gnome-weather.png \
+ hicolor/32x32/apps/gnome-weather.png \
+ hicolor/48x48/apps/gnome-weather.png \
+ hicolor/256x256/apps/gnome-weather.png
+
+EXTRA_DIST = $(nobase_icon_DATA) hicolor/gnome-weather.svg
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor; gtk-update-icon-cache -f -t
$(datadir)/icons/HighContrast
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+update-icon-cache:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(gtk_update_icon_cache); \
+ else \
+ echo "*** Icon cache not updated. After (un)install, run this:"; \
+ echo "*** $(gtk_update_icon_cache)"; \
+ fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]