parameterize build format

This commit is contained in:
anna 2021-09-13 15:13:43 +02:00
parent 97db7b5d41
commit ec4bcb5a58
Signed by: fef
GPG key ID: EC22E476DC2D3D84
2 changed files with 15 additions and 8 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
cnpl-na.*
cnpl.*
nvpl.*
nvpl-na.*

View file

@ -1,19 +1,22 @@
FORMAT ?= rst
EXTENSION ?= txt
all: clean cnpl nvpl cnpl-na nvpl-na all: clean cnpl nvpl cnpl-na nvpl-na
cnpl: cnpl:
xml ed -d "/article/info" template.xml | pandoc -f docbook -t markdown -s -o cnpl.md xml ed -d "/article/info" template.xml | pandoc -f docbook -t $(FORMAT) -s -o cnpl.$(EXTENSION)
nvpl: nvpl:
xml ed -d "/article/info" template.xml | xml ed -d "*/*/*[@role='restriction-cooperative']" | pandoc -f docbook -t markdown -s -o nvpl.md xml ed -d "/article/info" template.xml | xml ed -d "*/*/*[@role='restriction-cooperative']" | pandoc -f docbook -t $(FORMAT) -s -o nvpl.$(EXTENSION)
cnpl-na: cnpl-na:
xml ed -d "/article/info" template.xml | xml ed -d "*/*/*[@role='restriction-attribution']" | pandoc -f docbook -t markdown -s -o cnpl-na.md xml ed -d "/article/info" template.xml | xml ed -d "*/*/*[@role='restriction-attribution']" | pandoc -f docbook -t $(FORMAT) -s -o cnpl-na.$(EXTENSION)
nvpl-na: nvpl-na:
xml ed -d "/article/info" template.xml | xml ed -d "*/*/*[@role='restriction-attribution']" | xml ed -d "*/*/*[@role='restriction-cooperative']" | pandoc -f docbook -t markdown -s -o nvpl-na.md xml ed -d "/article/info" template.xml | xml ed -d "*/*/*[@role='restriction-attribution']" | xml ed -d "*/*/*[@role='restriction-cooperative']" | pandoc -f docbook -t $(FORMAT) -s -o nvpl-na.$(EXTENSION)
clean: clean:
rm -rf nvpl.md rm -rf nvpl.$(EXTENSION)
rm -rf cnpl.md rm -rf cnpl.$(EXTENSION)
rm -rf cnpl-na.md rm -rf cnpl-na.$(EXTENSION)
rm -rf nvpl-na.md rm -rf nvpl-na.$(EXTENSION)