Skip to content

Commit

Permalink
refactor the Makefile target handling for the RFC XML dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
dericed committed Sep 3, 2019
1 parent dac4fb2 commit 446c4e4
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ $(info RFC rendering has been tested with mmark version 2.0.48, xml2rfc 2.23.1,

all: draft-ietf-cellar-ffv1-$(VERSION).html draft-ietf-cellar-ffv1-v4-$(VERSION-v4).html draft-ietf-cellar-ffv1-$(VERSION).txt draft-ietf-cellar-ffv1-v4-$(VERSION-v4).txt

draft-ietf-cellar-ffv1-$(VERSION).html: ffv1.md
draft-ietf-cellar-ffv1-$(VERSION).xml: ffv1.md
bash makesvg
cat rfc_frontmatter.md "$<" rfc_backmatter.md | grep -v "^AART:" | grep -v "^SVGC" | grep -v "{V4}" | sed "s|^AART:||g;s|{V3}||g;s|SVGI:||g" > merged_rfchtml.md
mmark merged_rfchtml.md > draft-ietf-cellar-ffv1-$(VERSION).xml
bash svg2src draft-ietf-cellar-ffv1-$(VERSION).xml
xml2rfc --html --v3 draft-ietf-cellar-ffv1-$(VERSION).xml -o "$@"

draft-ietf-cellar-ffv1-v4-$(VERSION-v4).html: ffv1.md
draft-ietf-cellar-ffv1-v4-$(VERSION-v4).xml: ffv1.md
bash makesvg
cat rfc_frontmatter.md "$<" rfc_backmatter.md | grep -v "^AART:" | grep -v "^SVGC" | grep -v "{V3}" | sed "s|^AART:||g;s|{V4}||g;s|SVGI:||g" > merged_rfchtml-v4.md
mmark merged_rfchtml-v4.md > draft-ietf-cellar-ffv1-v4-$(VERSION-v4).xml
cat rfc_frontmatter.md "$<" rfc_backmatter.md | grep -v "^AART:" | grep -v "^SVGC" | grep -v "{V3}" | sed "s|^AART:||g;s|{V4}||g;s|SVGI:||g" > merged_rfchtml-v4.md
mmark merged_rfchtml.md > draft-ietf-cellar-ffv1-v4-$(VERSION-v4).xml
bash svg2src draft-ietf-cellar-ffv1-v4-$(VERSION-v4).xml
xml2rfc --html --v3 draft-ietf-cellar-ffv1-v4-$(VERSION-v4).xml -o "$@"

draft-ietf-cellar-ffv1-$(VERSION).txt: ffv1.md
cat rfc_frontmatter.md "$<" rfc_backmatter.md | grep -v "^SVG" | grep -v "{V4}" | sed "s|^AART:||g;s|{V3}||g" > merged_rfctxt.md
mmark merged_rfctxt.md > draft-ietf-cellar-ffv1-$(VERSION).xml
xml2rfc --v3 draft-ietf-cellar-ffv1-$(VERSION).xml -o "$@"
draft-ietf-cellar-ffv1-$(VERSION).html: draft-ietf-cellar-ffv1-$(VERSION).xml
xml2rfc --html --v3 "$<" -o "$@"

draft-ietf-cellar-ffv1-v4-$(VERSION-v4).txt: ffv1.md
cat rfc_frontmatter.md "$<" rfc_backmatter.md | grep -v "^SVG" | grep -v "{V3}" | sed "s|^AART:||g;s|{V4}||g" > merged_rfctxt-v4.md
mmark merged_rfctxt-v4.md > draft-ietf-cellar-ffv1-v4-$(VERSION-v4).xml
xml2rfc --v3 draft-ietf-cellar-ffv1-v4-$(VERSION-v4).xml -o "$@"
draft-ietf-cellar-ffv1-v4-$(VERSION-v4).html: draft-ietf-cellar-ffv1-v4-$(VERSION-v4).xml
xml2rfc --html --v3 "$<" -o "$@"

draft-ietf-cellar-ffv1-$(VERSION).txt: draft-ietf-cellar-ffv1-$(VERSION).xml
xml2rfc --v3 "$<" -o "$@"

draft-ietf-cellar-ffv1-v4-$(VERSION-v4).txt: draft-ietf-cellar-ffv1-v4-$(VERSION-v4).xml
xml2rfc --v3 "$<" -o "$@"

clean:
rm -f ffv1.pdf ffv1-v4.pdf ffv1.html ffv1-v4.html draft-ietf-cellar-ffv1-* merged_*

0 comments on commit 446c4e4

Please sign in to comment.