summaryrefslogtreecommitdiff
path: root/icons/Makefile.am
blob: 417a9069044e65185bff98071367cdc412cac063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

iconsdir = $(datadir)/icons/hicolor

png_icons = \
	16x16/apps/mate-desktop.png \
	22x22/apps/mate-desktop.png \
	24x24/apps/mate-desktop.png \
	32x32/apps/mate-desktop.png \
	48x48/apps/mate-desktop.png \
	128x128/apps/mate-desktop.png

nobase_dist_icons_DATA = \
	$(png_icons) \
	scalable/apps/mate-desktop.svg \
	scalable/apps/mate-desktop-symbolic.svg

gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor

EXTRA_DIST = \
	meson.build

.PHONY: build-png-icons clean-png-icons

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

if HAVE_RSVG_CONVERT
build-png-icons:
	$(RSVG_CONVERT) -w 16 -h 16 scalable/apps/mate-desktop.svg -o 16x16/apps/mate-desktop.png
	$(RSVG_CONVERT) -w 22 -h 22 scalable/apps/mate-desktop.svg -o 22x22/apps/mate-desktop.png
	$(RSVG_CONVERT) -w 24 -h 24 scalable/apps/mate-desktop.svg -o 24x24/apps/mate-desktop.png
	$(RSVG_CONVERT) -w 32 -h 32 scalable/apps/mate-desktop.svg -o 32x32/apps/mate-desktop.png
	$(RSVG_CONVERT) -w 48 -h 48 scalable/apps/mate-desktop.svg -o 48x48/apps/mate-desktop.png
	$(RSVG_CONVERT) -w 128 -h 128 scalable/apps/mate-desktop.svg -o 128x128/apps/mate-desktop.png
endif

clean-png-icons:
	rm -f $(png_icons)