summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: b0ceb9bb6cc11eed5007ab9256c2c0ed0ac2cda9 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
DISTCHECK_CONFIGURE_FLAGS = --disable-icon-mapping

SUBDIRS = src win32

ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

cursordir = $(datadir)/icons/Adwaita/cursors

# Install .cur/.ani on Windows and X cursors everywhere else
win_cursors = $(wildcard $(srcdir)/Adwaita/cursors/*.cur) $(wildcard $(srcdir)/Adwaita/cursors/*.ani)
if PLATFORM_WIN32
cursor_DATA = $(win_cursors)
else
cursor_DATA = $(filter-out $(win_cursors), $(wildcard $(srcdir)/Adwaita/cursors/*))
endif

if ENABLE_L_XL_VARIANTS
cursorldir = $(datadir)/icons/Adwaita-Large/cursors
cursorl_DATA = $(wildcard $(srcdir)/Adwaita-Large/cursors/*)
cursorxldir = $(datadir)/icons/Adwaita-ExtraLarge/cursors
cursorxl_DATA = $(wildcard $(srcdir)/Adwaita-ExtraLarge/cursors/*)
else
cursorldir =
cursorl_DATA =
cursorxldir =
cursorxl_DATA =
endif

theme_in_files = index.theme.in
theme_DATA = $(theme_in_files:.theme.in=.theme)

THEME_DIRS=$(shell SIZES="$(install_sizes)"; for size in $$SIZES; do for dir in `find $(srcdir)/$(SVGOUTDIR)/$$size/* -type d`; do printf "$$dir,"; done; done; echo "scalable/actions,scalable/apps,scalable/categories,scalable/devices,scalable/emblems,scalable/emotes,scalable/mimetypes,scalable/places,scalable/status,scalable/legacy,scalable/ui,symbolic-up-to-32/status,symbolic/actions,symbolic/apps,symbolic/categories,symbolic/devices,symbolic/emblems,symbolic/emotes,symbolic/mimetypes,symbolic/places,symbolic/status,symbolic/legacy,symbolic/ui,")

%.theme: %.theme.in $(SVGOUTDIR) Makefile
	dirs="`echo $(THEME_DIRS) | sed -e 's#$(srcdir)/Adwaita/##g'`"; \
	sed -e "s|\@THEME_DIRS\@|$$dirs|g" < $< > $@; \
	for dir in `echo $$dirs | sed -e "s/,/ /g"`; do \
		sizefull="`dirname $$dir`"; \
		if test "$$sizefull" = "symbolic"; then \
			size="16"; \
		elif test "$$sizefull" = "symbolic-up-to-32"; then \
			size="16"; \
		elif test "$$sizefull" = "scalable"; then \
			size="128"; \
		else \
			size="`echo $$sizefull | sed -e 's/x.*$$//g'`"; \
		fi; \
		context="`basename $$dir`"; \
		echo "[$$dir]" >> $@; \
		if test "$$context" = "actions"; then \
			echo "Context=Actions" >> $@; \
		fi; \
		if test "$$context" = "animations"; then \
			echo "Context=Animations" >> $@; \
		fi; \
		if test "$$context" = "apps"; then \
			echo "Context=Applications" >> $@; \
		fi; \
		if test "$$context" = "categories"; then \
			echo "Context=Categories" >> $@; \
		fi; \
		if test "$$context" = "devices"; then \
			echo "Context=Devices" >> $@; \
		fi; \
		if test "$$context" = "emblems"; then \
			echo "Context=Emblems" >> $@; \
		fi; \
		if test "$$context" = "emotes"; then \
			echo "Context=Emotes" >> $@; \
		fi; \
		if test "$$context" = "intl"; then \
			echo "Context=International" >> $@; \
		fi; \
		if test "$$context" = "mimetypes"; then \
			echo "Context=MimeTypes" >> $@; \
		fi; \
		if test "$$context" = "places"; then \
			echo "Context=Places" >> $@; \
		fi; \
		if test "$$context" = "status"; then \
			echo "Context=Status" >> $@; \
		fi; \
		if test "$$context" = "ui"; then \
			echo "Context=UI" >> $@; \
		fi; \
		if test "$$context" = "legacy"; then \
			echo "Context=Legacy" >> $@; \
		fi; \
		echo "Size=$$size" >> $@; \
		if test "$$sizefull" = "scalable"; then \
			echo "MinSize=8" >> $@; \
			echo "MaxSize=512" >> $@; \
			echo "Type=Scalable" >> $@; \
		elif test "$$sizefull" = "symbolic-up-to-32"; then \
			echo "MinSize=16" >> $@; \
			echo "MaxSize=32" >> $@; \
			echo "Type=Scalable" >> $@; \
    elif test "$$sizefull" = "symbolic"; then \
			echo "MinSize=8" >> $@; \
			echo "MaxSize=512" >> $@; \
			echo "Type=Scalable" >> $@; \
		elif test "$$size" = "256"; then \
			echo "MinSize=56" >> $@; \
			echo "MaxSize=256" >> $@; \
			echo "Type=Scalable" >> $@; \
		elif test "$$size" = "512"; then \
			echo "MinSize=56" >> $@; \
			echo "MaxSize=512" >> $@; \
			echo "Type=Scalable" >> $@; \
		else \
			echo "Type=Fixed" >> $@; \
		fi; \
		echo "" >> $@; \
	done

# Symbolic?
#THEME_DIRS=$(shell SIZES="$(render_sizes)"; for size in $$SIZES; do for dir in `find $(srcdir)/$(SVGOUTDIR)/$$size/* -type d`; do printf "$$dir,"; done; done | sed -e "s/,$$//g")

render: Makefile
	($(am__cd) $(SVGSRCDIR) && $(MAKE) $(AM_MAKEFLAGS) render) \
	|| eval `exit 1`

# we don't want to install mo files, all translations are already stored
# in theme files
install-data-local:
	if [ -h $(DESTDIR)$(themedir) ]; then \
		rm -f $(DESTDIR)$(themedir); \
	fi
	if [ -d $(DESTDIR)$(themedir) ]; then \
		touch $(DESTDIR)$(themedir); \
	fi

install-data-hook:
	cd $(DESTDIR)$(cursordir) && \
	if test "x$(platform_win32)" = "xyes"; \
	then \
		cur=.cur && \
		ani=.ani; \
	else \
		cur= && \
		ani= ; \
	fi; \
	if test "x$(enable_l_xl_variants)" = "xyes"; \
	then \
		themedirs="$(cursordir) $(cursorldir) $(cursorxldir)"; \
	else \
		themedirs="$(cursordir)"; \
	fi; \
	for d in $$themedirs; \
	do \
		cd $(DESTDIR)$$d && \
		echo Creating symlinks in $(DESTDIR)$$d && \
		$(LN_S) -f  dotbox$$cur			draped_box$$cur && \
		$(LN_S) -f  dotbox$$cur			icon$$cur && \
		$(LN_S) -f  dotbox$$cur			target$$cur && \
		$(LN_S) -f  dotbox$$cur			dot_box_mask$$cur && \
		$(LN_S) -f  X_cursor$$cur		pirate$$cur && \
		$(LN_S) -f  left_ptr_watch$$ani		08e8e1c95fe2fc01f976f1e063a24ccd$$ani && \
		$(LN_S) -f  left_ptr_watch$$ani		3ecb610c1bf2410f44200f48c40d3599$$ani && \
		$(LN_S) -f  left_ptr$$cur		arrow$$cur && \
		$(LN_S) -f  left_ptr$$cur		top_left_arrow$$cur && \
		$(LN_S) -f  right_ptr$$cur		draft_large$$cur && \
		$(LN_S) -f  right_ptr$$cur		draft_small$$cur && \
		$(LN_S) -f  move$$cur			4498f0e0c1937ffe01fd06f973665830$$cur && \
		$(LN_S) -f  move$$cur			9081237383d90e509aa00f00170e968f$$cur && \
		$(LN_S) -f  copy$$cur			1081e37283d90000800003c07f3ef6bf$$cur && \
		$(LN_S) -f  copy$$cur			6407b0e94181790501fd1e167b474872$$cur && \
		$(LN_S) -f  cross$$cur			cross_reverse$$cur && \
		$(LN_S) -f  cross$$cur			diamond_cross$$cur && \
		$(LN_S) -f  hand1$$cur			grab$$cur && \
		$(LN_S) -f  hand2$$cur			9d800788f1b08800ae810202380a0822$$cur && \
		$(LN_S) -f  hand2$$cur			e29285e634086352946a0e7090d73106$$cur && \
		$(LN_S) -f  hand2$$cur			hand$$cur && \
		$(LN_S) -f  all-scroll$$cur		fleur$$cur && \
		$(LN_S) -f  question_arrow$$cur		d9ce0ab605698f320427677b458ad60b$$cur && \
		$(LN_S) -f  question_arrow$$cur		5c6cd98b3f3ebcb1f9c7f1c204630408$$cur && \
		$(LN_S) -f  question_arrow$$cur		help$$cur && \
		$(LN_S) -f  question_arrow$$cur		left_ptr_help$$cur && \
		$(LN_S) -f  link$$cur			3085a0e285430894940527032f8b26df$$cur && \
		$(LN_S) -f  link$$cur			640fb0e74195791501fd1ed57b41487f$$cur && \
		$(LN_S) -f  crossed_circle$$cur		03b6e0fcb3499374a867c041f52298f0$$cur && \
		$(LN_S) -f  fd_double_arrow$$cur	fcf1c3c7cd4491d801f1e1c78f100000$$cur && \
		$(LN_S) -f  bd_double_arrow$$cur	c7088f0f3e6c8088236ef8e1e3e70000$$cur && \
		$(LN_S) -f  sb_h_double_arrow$$cur 	h_double_arrow$$cur && \
		$(LN_S) -f  sb_h_double_arrow$$cur	14fef782d02440884392942c11205230$$cur && \
		$(LN_S) -f  h_double_arrow$$cur		028006030e0e7ebffc7f7070c0600140$$cur && \
		$(LN_S) -f  sb_v_double_arrow$$cur 	double_arrow$$cur && \
		$(LN_S) -f  sb_v_double_arrow$$cur 	v_double_arrow$$cur && \
		$(LN_S) -f  sb_v_double_arrow$$cur	2870a09082c103050810ffdffffe0204$$cur && \
		$(LN_S) -f  v_double_arrow$$cur		00008160000006810000408080010102$$cur && \
		$(LN_S) -f  fleur$$cur			size_all$$cur && \
		$(LN_S) -f  fd_double_arrow$$cur	size_bdiag$$cur && \
		$(LN_S) -f  bd_double_arrow$$cur	size_fdiag$$cur && \
		$(LN_S) -f  h_double_arrow$$cur		size_hor$$cur && \
		$(LN_S) -f  v_double_arrow$$cur		size_ver$$cur && \
		$(LN_S) -f  left_ptr$$cur		default$$cur && \
		$(LN_S) -f  hand$$cur			pointer$$cur && \
		$(LN_S) -f  left_ptr_watch$$ani		progress$$ani && \
		$(LN_S) -f  watch$$ani			wait$$ani && \
		$(LN_S) -f  cross$$cur			crosshair$$cur && \
		$(LN_S) -f  xterm$$cur			text$$cur && \
		$(LN_S) -f  dnd-link$$cur		alias$$cur && \
		$(LN_S) -f  dnd-copy$$cur		copy$$cur && \
		$(LN_S) -f  dnd-no-drop$$cur		no-drop$$cur && \
		$(LN_S) -f  crossed_circle$$cur		not-allowed$$cur && \
		$(LN_S) -f  sb_h_double_arrow$$cur	col-resize$$cur && \
		$(LN_S) -f  sb_v_double_arrow$$cur	row-resize$$cur && \
		$(LN_S) -f  top_side$$cur		n-resize$$cur && \
		$(LN_S) -f  right_side$$cur		e-resize$$cur && \
		$(LN_S) -f  bottom_side$$cur		s-resize$$cur && \
		$(LN_S) -f  left_side$$cur		w-resize$$cur && \
		$(LN_S) -f  top_right_corner$$cur	ne-resize$$cur && \
		$(LN_S) -f  top_left_corner$$cur	nw-resize$$cur && \
		$(LN_S) -f  bottom_right_corner$$cur	se-resize$$cur && \
		$(LN_S) -f  bottom_left_corner$$cur	sw-resize$$cur && \
		$(LN_S) -f  sb_h_double_arrow$$cur	ew-resize$$cur && \
		$(LN_S) -f  sb_v_double_arrow$$cur	ns-resize$$cur && \
		$(LN_S) -f  fd_double_arrow$$cur	nesw-resize$$cur && \
		$(LN_S) -f  bd_double_arrow$$cur	nwse-resize$$cur; \
	done
	if test -z "$(DESTDIR)" && test -n "$(GTK_UPDATE_ICON_CACHE)" ; then \
		$(GTK_UPDATE_ICON_CACHE) -q $(DESTDIR)$(themedir); \
	fi

uninstall-hook:
	@rm -f  $(DESTDIR)$(themedir)/icon-theme.cache

pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA = adwaita-icon-theme.pc

EXTRA_DIST =			\
	adwaita-icon-theme.pc.in  \
	Adwaita			\
	COPYING_CCBYSA3		\
	COPYING_LGPL		\
	README.md		\
	$(theme_in_files)

CLEANFILES = 			\
	$(theme_DATA)

MAINTAINERCLEANFILES =			\
	Makefile.in			\
	aclocal.m4			\
	config.guess			\
	config.h.in			\
	config.sub			\
	configure			\
	depcomp				\
	install-sh			\
	intltool-*.in			\
	libtool				\
	ltmain.sh			\
	missing				\
	mkinstalldirs

-include $(top_srcdir)/git.mk