summaryrefslogtreecommitdiff
path: root/build-aux/Makefile.head.mk
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-08-10 11:22:38 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-08-10 11:22:38 -0400
commit88d181c25d2f99f8b510afe2f2cc7e1ba1fa012c (patch)
tree8034e6048fcf1e96d8eb79dcdaac375891caaa87 /build-aux/Makefile.head.mk
parent2d47b10c0a19c9f986d2b1c4e5a06d8a49d36096 (diff)
(systemd) fix build system
Diffstat (limited to 'build-aux/Makefile.head.mk')
-rw-r--r--build-aux/Makefile.head.mk14
1 files changed, 8 insertions, 6 deletions
diff --git a/build-aux/Makefile.head.mk b/build-aux/Makefile.head.mk
index 105432c..c2ce307 100644
--- a/build-aux/Makefile.head.mk
+++ b/build-aux/Makefile.head.mk
@@ -24,13 +24,13 @@ ifeq ($(origin _at.NO_ONCE),undefined)
# These 4 functions are all $(call _at.func,parent,child)
_at.is_strict_subdir = $(filter $(abspath $1)/%,$(abspath $2))
_at.is_subdir = $(filter $(abspath $1)/%,$(abspath $2)/.)
-_at.relbase = $(strip \
- $(if $(call _at.is_subdir,$1,$2), \
- $(patsubst $(abspath $1)/%,%,$(abspath $2)/.), \
+_at.relbase = $(strip \
+ $(if $(call _at.is_subdir,$1,$2), \
+ $(patsubst %/.,$(patsubst $(abspath $1)/%,%,$(abspath $2)/.)), \
$(abspath $2)))
-_at.relto = $(strip \
- $(if $(call _at.is_subdir,$1,$2), \
- $(patsubst $(abspath $1)/%,%,$(abspath $2)/.), \
+_at.relto = $(strip \
+ $(if $(call _at.is_subdir,$1,$2), \
+ $(patsubst %/.,%,$(patsubst $(abspath $1)/%,%,$(abspath $2)/.)), \
../$(call _at.relto,$(dir $1),$2)))
# These 3 functions only take one operand; we define public multi-operand
@@ -51,6 +51,8 @@ _at.target_variable = $(_at.target_variable.$(flavor $2))
_at.target_variable.recursive = $1: private $2 = $(subst $(at.nl),$$(at.nl),$(value $2))
_at.target_variable.simple = $1: private $2 := $$($2)
+_at.quote-pattern = $(subst %,\%,$(subst \,\\,$1))
+
# Sanity checking ######################################################
ifeq ($(filter undefine,$(.FEATURES)),)
$(error Autothing: We need a version of Make that supports 'undefine')