@SRCPAT -> %SRCPAT%

This commit is contained in:
Jörn-Michael Miehe 2019-09-24 11:48:09 +02:00
parent db79ff1d07
commit 26bf64d34d
5 changed files with 6 additions and 6 deletions

View file

@ -93,7 +93,7 @@ You may combine build instruction systems to your liking.
However, Makefiles must contain a SRCPAT annotation comment as follows, where `<regex>` is a source pattern as above.
```Makefile
#@SRCPAT <regex>
#%SRCPAT% <regex>
```
If there are multiple SRCPAT annotations, the lowermost one will be used.

View file

@ -11,10 +11,10 @@ do_make() { # $1:DIR $2:MAKEFILE $3:OBJECT
local object="$3"
# check Makefile 'source pattern'
local srcpat="$(grep -E "^#@SRCPAT" "${dir}/${makefile}" | tail -n 1 | sed -r "s/^#@SRCPAT\s+//")"
local srcpat="$(grep -E "^#%SRCPAT%" "${dir}/${makefile}" | tail -n 1 | sed -r "s/^#%SRCPAT%\s+//")"
if [ -z "${srcpat}" ]; then
echo -n "Empty source pattern, check '#@SRCPAT' annotation! "
echo -n "Empty source pattern, check '#%SRCPAT%' annotation! "
return 1
elif [[ "${object}" =~ ${srcpat} ]]; then

View file

@ -1,4 +1,4 @@
#@SRCPAT \.md$
#%SRCPAT% \.md$
.PHONY: all
all: simple.pdf simple.html

View file

@ -1,4 +1,4 @@
#@SRCPAT (file|\.tex)$
#%SRCPAT% (file|\.tex)$
.PHONY: all
all: files.txt

View file

@ -1,4 +1,4 @@
#@SRCPAT .*
#%SRCPAT% .*
.PHONY: all
all: