Skip to content

Commit

Permalink
Add option to disable icon cache update
Browse files Browse the repository at this point in the history
  • Loading branch information
infirit committed Feb 16, 2014
1 parent 064ef1f commit 2f2e67b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SUBDIRS = po po-locations libmateweather doc data python icons

ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-icon-update

EXTRA_DIST = \
autogen.sh
Expand Down
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
AM_GLIB_GNU_GETTEXT

dnl icon cache
AC_ARG_ENABLE(icon-update, AC_HELP_STRING([--disable-icon-update],
[Disable icon cache update]))
if (test "$enable_icon_update" != no); then
AC_PATH_PROG(UPDATE_ICON_CACHE, [gtk-update-icon-cache])
fi
AM_CONDITIONAL([ICON_UPDATE], [test -n "$UPDATE_ICON_CACHE"])

dnl ***************************************************************************
dnl *** REGEX ***
Expand Down
4 changes: 2 additions & 2 deletions icons/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,9 @@ uninstall-icons:
done

update-icon-cache:
@-if test -z "$(DESTDIR)"; then \
@-if test -z "$(DESTDIR)" && ICON_UPDATE; then \
echo "Updating Gtk icon cache."; \
$(gtk_update_icon_cache) $(DESTDIR)$(datadir)/$(subdir)/mate; \
$(UPDATE_ICON_CACHE) $(DESTDIR)$(datadir)/$(subdir)/mate; \
else \
echo "*** Icon cache not updated. After (un)install, run this:"; \
echo "*** $(gtk_update_icon_cache) $(DESTDIR)$(datadir)/$(subdir)/mate"; \
Expand Down

2 comments on commit 2f2e67b

@brunodefraine
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In icons/Makefile.am, ICON_UPDATE is used as a part of a shell command, while it is an automake conditional. This gives a shell error, because the shell tries to execute "ICON_UPDATE" literally.

The icon cache is not updated, even if you don't use --disable-icon-update

@brunodefraine
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, note that you're losing the flags "-f -t" to gtk-update-icon-cache by changing variable $(gtk_update_icon_cache) (which includes these flags) into variable $(UPDATE_ICON_CACHE) (which does not include these flags)

Please sign in to comment.