aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mk/portable.mk21
-rw-r--r--mk/xdestdir.mk6
2 files changed, 24 insertions, 3 deletions
diff --git a/mk/portable.mk b/mk/portable.mk
index c957871..33da566 100644
--- a/mk/portable.mk
+++ b/mk/portable.mk
@@ -1,8 +1,21 @@
-all: index.theme $(ALL_PNG_ICONS)
+include mk/xdestdir.mk
-all-fast: index.theme all-fast-icons
+APPS_MAKE_FLAGS =\
+ DESTDIR="$(XDESTDIR)"\
+ PREFIX="$(PREFIX)"\
+ ICONPREFIX="$(ICONPREFIX)"\
+ THEME_NAME="$(THEME_NAME)"\
+ THEME_DESC="$(THEME_DESC)"\
+ THEME_DIR="$(THEME_DIR)"
-all-fast-icons: $(ICONS:=.x)
+all: index.theme $(ALL_PNG_ICONS) all-apps
+
+all-fast: index.theme all-fast-icons all-apps
+
+all-fast-icons: $(ICONS:=.x) all-apps
+
+all-apps:
+ +cd apps && $(MAKE) $(APPS_MAKE_FLAGS) all
$(ICONS:=.x): conv
@+test -z "$(DIR_SUFFIX)" || $(MAKE) scalable$(DIR_SUFFIX)/$(@:.x=.svg)
@@ -75,12 +88,14 @@ install: index.theme $(ALL_PNG_ICONS)
cp -P -- "scalable$(DIR_SUFFIX)/$${i}.svg" "$(DESTDIR)$(ICONPREFIX)/$(THEME_DIR)/scalable/$${i}.svg";\
done
cp -- index.theme "$(DESTDIR)$(ICONPREFIX)/$(THEME_DIR)/index.theme"
+ +cd apps && $(MAKE) $(APPS_MAKE_FLAGS) install
#`(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)"
+ +cd apps && $(MAKE) $(APPS_MAKE_FLAGS) uninstall
clean:
+@$(MAKE) -f Makefile clean
diff --git a/mk/xdestdir.mk b/mk/xdestdir.mk
new file mode 100644
index 0000000..af961b5
--- /dev/null
+++ b/mk/xdestdir.mk
@@ -0,0 +1,6 @@
+XDESTDIR =\
+ $$(if test -n "$(DESTDIR)" && (! printf '%s\n' "$(DESTDIR)" | grep '^/' >/dev/null); then\
+ printf '../%s\n' "$(DESTDIR)";\
+ else\
+ printf '%s\n' "$(DESTDIR)";\
+ fi)