Skip to content

Commit

Permalink
Extend makefile to simplify debugging
Browse files Browse the repository at this point in the history
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
  • Loading branch information
david-a-wheeler committed Aug 14, 2024
1 parent 9f15e48 commit f3adc77
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,29 @@ toc.md: secure_software_development_fundamentals.md tocignore
linklist.md: toc.md make_linklist
./make_linklist < toc.md > linklist.md

# Generate user-viewable versions.
# NOTE: This is intended to help develop and debug the course.
# If you simply want to *learn* the material, this is a terrible way to do it.
# Instead, take the free course, it's available here:
# https://training.linuxfoundation.org/training/developing-secure-software-lfd121/

PANDOC = pandoc
PANDOCFLAGS = -f gfm-tex_math_dollars

# This requires wkhtmltopdf because it goes via HTML
# https://plaintextproject.online/articles/2022/04/06/pdf.html
# https://stackoverflow.com/questions/38455078/specifying-papersize-for-md-to-pdf-conversion
# We don't include this because it shows the title twice:
# --metadata title="Secure Software Development Fundamentals"
book.pdf: secure_software_development_fundamentals.md
pandoc -f gfm --pdf-engine=wkhtmltopdf \
$(PANDOC) $(PANDOCFLAGS) --pdf-engine=wkhtmltopdf \
--css=print.css -V geometry:a4paper -o book.pdf \
secure_software_development_fundamentals.md

secure_software_development_fundamentals.html: \
secure_software_development_fundamentals.md
$(PANDOC) $(PANDOCFLAGS) -t html $< > $@

html: secure_software_development_fundamentals.html

.PHONY: all lint html

0 comments on commit f3adc77

Please sign in to comment.