summaryrefslogtreecommitdiff
path: root/src/symbolic/Makefile.am
blob: f1a46c3c0a9ab4c566b5bcbc08a80ea31f8a3d45 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

icon_in_files = $(shell SRCDIR="$(srcdir)"; for i in `find $$SRCDIR -name "*.svg"`; do printf "$$i "; done)

# Create placeholder files for folders that will get symbolic pre-rendered file so they are picked up for themes
render-placeholders:
	for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable; find . -name "*.svg"`; do \
		context="`dirname $$file`"; \
		for size in $(symbolic_encode_sizes); do \
			$(mkdir_p) $(top_builddir)/$(SVGOUTDIR)/$$size/$$context; \
			touch $(top_builddir)/$(SVGOUTDIR)/$$size/$$context/.placeholder; \
		done \
	done

if ALLOW_RENDERING
render-png: $(icon_in_files) Makefile render-placeholders
	for file in $(icon_in_files); do \
		for size in $(symbolic_render_sizes); do \
			$(ICONTOOL_RENDER) -s $$size -o $(top_builddir)/$(SVGOUTDIR) $$file >/dev/null; \
		done; \
	done
else
render-png: $(icon_in_files) Makefile render-placeholders

endif

$(symbolic_render_sizes): Makefile

render: render-png

all-local: render

install-data-local:
	for size in $(symbolic_render_sizes); do \
		for file in `cd $(top_srcdir)/$(SVGOUTDIR)/$$size; find . -name "*.png"`; do \
			context="`dirname $$file`"; \
			$(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
			$(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \
		done; \
		wait; \
	done; \
	for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable; find . -name "*.svg"`; do \
		context="`dirname $$file`"; \
		$(mkdir_p) $(DESTDIR)$(themedir)/scalable/$$context; \
		$(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $(DESTDIR)$(themedir)/scalable/$$file & \
		for size in $(symbolic_encode_sizes); do \
			$(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
			$(GTK_ENCODE_SYMBOLIC_SVG) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $$size -o $(DESTDIR)$(themedir)/$$size/$$context & \
		done; \
		wait; \
	done; \
	wait

uninstall-local:
	for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable; find . -name "*.svg"`; do \
		context="`dirname $$file`"; \
		rm -f $(DESTDIR)$(themedir)/scalable/$$file; \
		for size in $(symbolic_encode_sizes); do \
			name="`basename $$file .svg`.symbolic.png"; \
			rm -f $(DESTDIR)/$(themedir)/$$size/$$context/$$name; \
		done; \
	done

EXTRA_DIST =			\
	$(icon_in_files)


MAINTAINERCLEANFILES =		\
	*~			\
	Makefile.in		\
	$(icon_cache)

-include $(top_srcdir)/git.mk