From c0d7d9fbb9cd048d18cf00fc22a79fd420ab6140 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 4 Mar 2015 17:37:14 -0500 Subject: Makefile: omit the `/` or `|` between the (m)url and extra if no extra. --- Makefile | 4 ++-- 1 file 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)))) -- cgit v1.2.3-54-g00ecf