mirror of
https://github.com/ldericher/autodoc.git
synced 2025-12-06 15:43:01 +00:00
@SRCPAT -> %SRCPAT%
This commit is contained in:
parent
db79ff1d07
commit
26bf64d34d
5 changed files with 6 additions and 6 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#@SRCPAT \.md$
|
||||
#%SRCPAT% \.md$
|
||||
|
||||
.PHONY: all
|
||||
all: simple.pdf simple.html
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#@SRCPAT (file|\.tex)$
|
||||
#%SRCPAT% (file|\.tex)$
|
||||
|
||||
.PHONY: all
|
||||
all: files.txt
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#@SRCPAT .*
|
||||
#%SRCPAT% .*
|
||||
|
||||
.PHONY: all
|
||||
all:
|
||||
|
|
|
|||
Loading…
Reference in a new issue