aboutsummaryrefslogtreecommitdiffstats
path: root/mk/portable.mk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mk/portable.mk (renamed from portable.mk)13
1 files changed, 9 insertions, 4 deletions
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)"