aboutsummaryrefslogtreecommitdiffstats
path: root/mk/xdestdir.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/xdestdir.mk')
-rw-r--r--mk/xdestdir.mk6
1 files changed, 6 insertions, 0 deletions
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)