summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 49ed857..ccc0843 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ _spec2url = $(word 2,$1)
_spec2extra = $(call merge,|,$(wordlist 3,$(words $1),$1))
_spec2murl = $(call _url2murl,$(_spec2url))
_spec2base = $(_spec2type)/$(_spec2murl)
-_spec2file = $(_spec2type)/$(_spec2murl)/$(_spec2extra)
+_spec2file = $(_spec2type)/$(_spec2murl)$(if $(_spec2extra),/$(_spec2extra))
spec2 = $(foreach i,$2,$(call _spec2$1,$(subst |, ,$i)))
_file2type = $(word 1,$1)
@@ -43,7 +43,7 @@ _file2murl = $(word 2,$1)
_file2extra = $(call merge,/,$(wordlist 3,$(words $1),$1))
_file2url = $(call _murl2url,$(_file2murl))
_file2base = $(_file2type)/$(_file2murl)
-_file2spec = $(_file2type)|$(_file2url)|$(_file2extra)
+_file2spec = $(_file2type)|$(_file2url)$(if $(_file2extra),|$(_file2extra))
file2 = $(foreach i,$2,$(call _file2$(1),$(subst /, ,$i)))
name2 = $(call spec2,$1,$(foreach name,$2,$($(name))))