Skip to content

Commit f0b4369

Browse files
Merge pull request #194 from ossf/fix-makefile
Fix makefile now that we've renamed files
2 parents a8edd1e + 2af005e commit f0b4369

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

makefile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
all: 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

1317
linklist.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

Comments
 (0)