summaryrefslogtreecommitdiff
path: root/automake.head.mk
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-03-03 19:20:54 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-03-03 19:20:54 -0500
commitaeaebc66b1e579a394268460afc6c704915b3612 (patch)
tree2c2c51209fe426a32cc1830601f5477ef77a6e27 /automake.head.mk
parent225ca4b3f8efb7c95cf204bef3ddae3d432b3ec6 (diff)
parent45d77264cab813a4465116a3ac33a0a44a1389e7 (diff)
Merge remote-tracking branch 'automake/master'
Diffstat (limited to 'automake.head.mk')
-rw-r--r--automake.head.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/automake.head.mk b/automake.head.mk
index ad7154c..c79da83 100644
--- a/automake.head.mk
+++ b/automake.head.mk
@@ -17,13 +17,14 @@ _am = am_
_am_noslash = $(patsubst %/.,%,$(patsubst %/,%,$1))
# These are all $(call _am_func,parent,child)
-#_am_relto = $(if $2,$(shell realpath -s --relative-to='$1' $2))
+#_am_relto = $(if $2,$(shell realpath -sm --relative-to='$1' $2))
_am_is_subdir = $(filter $(abspath $1)/%,$(abspath $2)/.)
_am_relto_helper = $(if $(call _am_is_subdir,$1,$2),$(patsubst $1/%,%,$(addsuffix /.,$2)),$(addprefix ../,$(call _am_relto_helper,$(patsubst %/,%,$(dir $1)),$2)))
_am_relto = $(call _am_noslash,$(call _am_relto_helper,$(call _am_noslash,$(abspath $1)),$(call _am_noslash,$(abspath $2))))
# Note that _am_is_subdir says that a directory is a subdirectory of
# itself.
_am_path = $(call _am_relto,.,$1)
+am_path = $(foreach p,$1,$(call _am_relto,$p))
## Declare the default target
all: build