diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-03-04 17:37:14 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-03-04 17:37:14 -0500 |
commit | c0d7d9fbb9cd048d18cf00fc22a79fd420ab6140 (patch) | |
tree | 46464dad87c84fd80228498fbf7f742bd4057d19 | |
parent | 10bf3396ddd07078f9b85c94a4da2e0587a7c322 (diff) |
Makefile: omit the `/` or `|` between the (m)url and extra if no extra.
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)))) |