My company uses FreeBSD, and therefore FreeBSD's flavor of make.
A few of our in-house ports include something like this (where BRANCH is something that came from an SVN URL, either 'trunk' or a branch name like 'branches/1.2.3').
PORTVERSION= ${BRANCH:C,^branches/,,}
The Variable modifiers section of make(1)
documents the :C
colon-c modifier as
:C/pattern/replacement/[1gW]
Am I looking at the right documentation? ^branches/
looks like a regex pattern to me, but it looks like the actual code uses ,
instead of /
as a separator. Did I skip documentation explaining that?