aboutsummaryrefslogtreecommitdiffstats
path: root/make-stage-2.mk
blob: 4891da1aa40889198133fba34167b0be64a9f536 (plain) (blame)
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
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

DIRS =\
	actions\
	apps\
	categories\
	devices\
	emblems\
	emotes\
	mimetypes\
	places\
	status

include icons.mk

all:

include generated.mk
include portable.mk
include unportable.mk

# For implementation that do not support pattern matching rules
.DEFAULT:
	+@set -e;\
	if printf '%s\n' "$@" | grep '^scalable' > /dev/null; then\
		sed < unportable.mk '1s|%|'"$$(printf '%s\n' "$@" | sed 's|^scalable/\(.*\)\.svg$$|\1|')"'|g' | $(MAKE) -f - "$@";\
	elif printf '%s\n' "$@" | grep '\.png$$' > /dev/null; then\
		printf '%s\n' "$@" >&2 ;\
		$(MAKE) -f make-stage-2.mk conv &&\
		f="$$(printf '%s\n' "$@" | sed 's|^[^/]*\/\(.*\)\.png$$|\1|')" &&\
		if test -n "$(DIR_SUFFIX)"; then \
			$(MAKE) -f make-stage-2.mk scalable$(DIR_SUFFIX)/$$f.svg; \
		fi && \
		sed '/^[a-zA-Z0-9].*=/,$$d' < generated.mk | sed 's|%|'"$$f"'|g' | $(MAKE) -f - "$@";\
	else\
		printf 'No rule to make target %s\n' "$@" >&2;\
		exit 2;\
	fi

.PHONY: all all-fast all-fast-icons install uninstall clean