summaryrefslogtreecommitdiff
path: root/icons/Makefile.am
blob: 8e07844324c45b09d74c9561a895d9d8adf70be7 (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
## Process this file with automake to produce Makefile.in
## You probably want to run automake from the top-level directory, though
## Makefile.am for icon subdirectory of the wm-icons package
## Copyright 1999, Julian Gilbey <jdg@debian.org>
## This file may be copied under the conditions of the GNU General
## Public License, version 2 or later.  NO warranty of any kind is
## given.

AUTOMAKE_OPTIONS = foreign

EXTRA_DIST = \
	01x01-template   \
	$(ALL_ICON_SETS) \
	names.lst

SYMLINKS_LST = _symlinks.lst

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(icondir)
	chmod -R o-w,go+rX *
	cd $(top_srcdir)/icons; \
	for iconset in $(SELECTED_ICON_SETS); do \
		rm -rf $(DESTDIR)$(icondir)/$$iconset; \
		tar cpf - "$$iconset" \
			| (cd "$(DESTDIR)$(icondir)" && tar xfBp -); \
		find "$(DESTDIR)$(icondir)/$$iconset" -name CVS \
			-exec rm -r {} \; 2>/dev/null; \
		(cd "$(DESTDIR)$(icondir)/$$iconset" && [ -f $(SYMLINKS_LST) ] \
			&& $(AWK) '{ system("ln -sf " $$1 " " $$2) }' \
				< $(SYMLINKS_LST) \
			&& rm $(SYMLINKS_LST) || true \
		); \
	done

uninstall-local:
	for iconset in $(SELECTED_ICON_SETS); do \
		rm -rf $(DESTDIR)$(icondir)/$$iconset; \
	done
	for i in $(DESTDIR)$(icondir)/*; do \
		if [ -L "$$i" ] && [ ! -e "$$i" ]; then rm -f "$$i"; fi; \
	done
	-rmdir $(DESTDIR)$(icondir)