22
33all : lint toc.md
44
5- lint : toc.md
5+ MAINDOC_PREFIX = docs/lfd121
6+ MAINDOC = $(MAINDOC_PREFIX ) .md
7+ MAINDOC_HTML = $(MAINDOC_PREFIX ) .html
8+
9+ lint : $(MAINDOC )
610 markdownlint --config .github/linters/.markdown-lint.yml \
7- secure_software_development_fundamentals.md toc.md
11+ $( MAINDOC ) toc.md
812
9- toc.md : secure_software_development_fundamentals.md tocignore
10- grep -E ' ^#{1,3} ' secure_software_development_fundamentals.md | \
13+ toc.md : $( MAINDOC ) tocignore
14+ grep -E ' ^#{1,3} ' $( MAINDOC ) | \
1115 grep -E -v -f tocignore | while read line; do echo " $$ line" ; echo ; done > toc.md
1216
1317linklist.md : toc.md make_linklist
@@ -27,15 +31,13 @@ PANDOCFLAGS = -f gfm-tex_math_dollars
2731# https://stackoverflow.com/questions/38455078/specifying-papersize-for-md-to-pdf-conversion
2832# We don't include this because it shows the title twice:
2933# --metadata title="Secure Software Development Fundamentals"
30- book.pdf : secure_software_development_fundamentals.md
34+ book.pdf : $( MAINDOC )
3135 $(PANDOC ) $(PANDOCFLAGS ) --pdf-engine=wkhtmltopdf \
32- --css=print.css -V geometry:a4paper -o book.pdf \
33- secure_software_development_fundamentals.md
36+ --css=print.css -V geometry:a4paper -o book.pdf $(MAINDOC )
3437
35- secure_software_development_fundamentals.html : \
36- secure_software_development_fundamentals.md
38+ $(MAINDOC_HTML ) : $(MAINDOC )
3739 $(PANDOC ) $(PANDOCFLAGS ) -t html $< > $@
3840
39- html : secure_software_development_fundamentals.html
41+ html : $( MAINDOC_HTML )
4042
4143.PHONY : all lint html
0 commit comments