2
2
3
3
all : lint toc.md
4
4
5
- lint : toc.md
5
+ MAINDOC_PREFIX = docs/lfd121
6
+ MAINDOC = $(MAINDOC_PREFIX ) .md
7
+ MAINDOC_HTML = $(MAINDOC_PREFIX ) .html
8
+
9
+ lint : $(MAINDOC )
6
10
markdownlint --config .github/linters/.markdown-lint.yml \
7
- secure_software_development_fundamentals.md toc.md
11
+ $( MAINDOC ) toc.md
8
12
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 ) | \
11
15
grep -E -v -f tocignore | while read line; do echo " $$ line" ; echo ; done > toc.md
12
16
13
17
linklist.md : toc.md make_linklist
@@ -27,15 +31,13 @@ PANDOCFLAGS = -f gfm-tex_math_dollars
27
31
# https://stackoverflow.com/questions/38455078/specifying-papersize-for-md-to-pdf-conversion
28
32
# We don't include this because it shows the title twice:
29
33
# --metadata title="Secure Software Development Fundamentals"
30
- book.pdf : secure_software_development_fundamentals.md
34
+ book.pdf : $( MAINDOC )
31
35
$(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 )
34
37
35
- secure_software_development_fundamentals.html : \
36
- secure_software_development_fundamentals.md
38
+ $(MAINDOC_HTML ) : $(MAINDOC )
37
39
$(PANDOC ) $(PANDOCFLAGS ) -t html $< > $@
38
40
39
- html : secure_software_development_fundamentals.html
41
+ html : $( MAINDOC_HTML )
40
42
41
43
.PHONY : all lint html
0 commit comments