parameterize build format

main
anna 3 years ago
parent 97db7b5d41
commit ec4bcb5a58
Signed by: fef
GPG Key ID: EC22E476DC2D3D84

4
.gitignore vendored

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

@ -1,19 +1,22 @@
FORMAT ?= rst
EXTENSION ?= txt
all: clean cnpl nvpl cnpl-na nvpl-na
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:
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:
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:
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:
rm -rf nvpl.md
rm -rf cnpl.md
rm -rf cnpl-na.md
rm -rf nvpl-na.md
rm -rf nvpl.$(EXTENSION)
rm -rf cnpl.$(EXTENSION)
rm -rf cnpl-na.$(EXTENSION)
rm -rf nvpl-na.$(EXTENSION)

Loading…
Cancel
Save