aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mk/conv.c (renamed from conv.c)0
-rwxr-xr-xmk/make-dir-info49
-rw-r--r--mk/make-stage-2.mk (renamed from make-stage-2.mk)10
-rw-r--r--mk/portable.mk (renamed from portable.mk)13
-rw-r--r--mk/unportable.mk (renamed from unportable.mk)0
5 files changed, 63 insertions, 9 deletions
diff --git a/conv.c b/mk/conv.c
index 3decbfd..3decbfd 100644
--- a/conv.c
+++ b/mk/conv.c
diff --git a/mk/make-dir-info b/mk/make-dir-info
new file mode 100755
index 0000000..d2adb6b
--- /dev/null
+++ b/mk/make-dir-info
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+size="$1"
+dir="$2"
+
+d="$(printf '%s\n' "$dir" | cut -d / -f 1)"
+
+if test "$d" = actions; then
+ context=Actions
+elif test "$d" = animations; then
+ context=Animations
+elif test "$d" = apps; then
+ context=Applications
+elif test "$d" = categories; then
+ context=Categories
+elif test "$d" = devices; then
+ context=Devices
+elif test "$d" = emblems; then
+ context=Emblems
+elif test "$d" = emotes; then
+ context=Emotes
+elif test "$d" = filesystems; then
+ context=FileSystems
+elif test "$d" = intl; then
+ context=International
+elif test "$d" = legacy; then
+ context=Legacy
+elif test "$d" = mimetypes; then
+ context=MimeTypes
+elif test "$d" = places; then
+ context=Places
+elif test "$d" = status; then
+ context=Status
+elif test "$d" = stock; then
+ context=Stock
+elif test "$d" = ui; then
+ context=UI
+else
+ printf '%s: No value defined for Context for %s\n' "$0" "$d" >&2
+ exit 1
+fi
+
+if test "$size" = scalable; then
+ printf '[%s/%s]\n' "$size" "$dir"
+ printf '%s\n' Context="$context" Size="16" MinSize="8" MaxSize="1024" Type="Scalable"
+else
+ printf '[%sx%s/%s]\n' "$size" "$size" "$dir"
+ printf '%s\n' Context="$context" Size="$size" Type="Fixed"
+fi
diff --git a/make-stage-2.mk b/mk/make-stage-2.mk
index 4891da1..08a5a09 100644
--- a/make-stage-2.mk
+++ b/mk/make-stage-2.mk
@@ -19,20 +19,20 @@ include icons.mk
all:
include generated.mk
-include portable.mk
-include unportable.mk
+include mk/portable.mk
+include mk/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 - "$@";\
+ sed < mk/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 &&\
+ $(MAKE) -f mk/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; \
+ $(MAKE) -f mk/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\
diff --git a/portable.mk b/mk/portable.mk
index 5f96410..c957871 100644
--- a/portable.mk
+++ b/mk/portable.mk
@@ -8,7 +8,7 @@ $(ICONS:=.x): conv
@+test -z "$(DIR_SUFFIX)" || $(MAKE) scalable$(DIR_SUFFIX)/$(@:.x=.svg)
./conv scalable$(DIR_SUFFIX)/$(@:.x=.svg) $(SIZES)
-index.theme: $(CONFIGFILE) portable.mk make-dir-info
+index.theme: $(CONFIGFILE) mk/portable.mk mk/make-dir-info
set -e;\
printf '%s\n' \
'[Icon Theme]'\
@@ -49,11 +49,11 @@ index.theme: $(CONFIGFILE) portable.mk make-dir-info
for s in $(SIZES) scalable; do\
for d in $(DIRS); do\
printf '\n';\
- ./make-dir-info $$s $$d;\
+ mk/make-dir-info $$s $$d;\
done;\
done >> index.theme
-conv: conv.c
+conv: mk/conv.c
$(CC) -o $@ $< $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
install: index.theme $(ALL_PNG_ICONS)
@@ -65,8 +65,10 @@ install: index.theme $(ALL_PNG_ICONS)
done;\
mkdir -p -- "$(DESTDIR)$(ICONPREFIX)/$(THEME_DIR)/scalable/$${d}";\
done
+ head -n 1 < icons.mk | grep '^ICONS' > /dev/null
set -e;\
- for i in $(ICONS); do\
+ (sed '/[^\\]$$/q' | sed 's/\\$$//' | sed '1s/^.*=//' | sed 's/[[:space:]]//g' | sed '/^$$/d') < icons.mk |\
+ while read i; do\
for s in $(SIZES); do\
cp -P -- "$${s}x$${s}$(DIR_SUFFIX)/$${i}.png" "$(DESTDIR)$(ICONPREFIX)/$(THEME_DIR)/$${s}x$${s}/$${i}.png";\
done;\
@@ -74,6 +76,9 @@ install: index.theme $(ALL_PNG_ICONS)
done
cp -- index.theme "$(DESTDIR)$(ICONPREFIX)/$(THEME_DIR)/index.theme"
+#`(sed ...) < icons.mk | while read i` is used instead of `for i in $(ICONS)` because $(ICONS) got too big for sh(1)
+#The
+
uninstall:
-rm -rf -- "$(DESTDIR)$(ICONPREFIX)/$(THEME_DIR)"
diff --git a/unportable.mk b/mk/unportable.mk
index 5d26d20..5d26d20 100644
--- a/unportable.mk
+++ b/mk/unportable.mk