aboutsummaryrefslogtreecommitdiffstats
path: root/core/core.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/core.mk')
-rw-r--r--core/core.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/core.mk b/core/core.mk
index a9cb808..407b940 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -174,13 +174,15 @@ endif
core_eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
-core_find = $(if $(wildcard $1),$(shell find $1 -type f -name $(subst *,\*,$2)))
+core_find = $(if $(wildcard $1),$(shell find $(1:%/=%) -type f -name $(subst *,\*,$2)))
core_lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$(1)))))))))))))))))))))))))))
-# @todo On Windows: $(shell dir /B $(1)); make sure to handle when no file exists.
core_ls = $(filter-out $(1),$(shell echo $(1)))
+# @todo Use a solution that does not require using perl.
+core_relpath = $(shell perl -e 'use File::Spec; print File::Spec->abs2rel(@ARGV) . "\n"' $1 $2)
+
# Automated update.
ERLANG_MK_REPO ?= https://github.com/ninenines/erlang.mk