-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
37 lines (29 loc) · 996 Bytes
/
Copy pathmakefile
File metadata and controls
37 lines (29 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
SOURCES := $(shell find src/english -name '*.md' | sort)
.PHONY: all clean
all: manual.md manual.html manual.epub manual.pdf
manual.md: $(SOURCES)
cat src/english/_preamble.md > $@
find src/english -type d -mindepth 1 -maxdepth 1 | sort | while read dir; do \
find "$$dir" -name '*.md' | sort | xargs cat >> $@; \
done
cat src/english/_annexes.md >> $@
@echo "✓ Assembled manual.md from source files"
manual.html: manual.md
pandoc -o $@ $< && echo "✓ Generated manual.html"
manual.epub: manual.md
pandoc -o $@ $< && echo "✓ Generated manual.epub"
manual.pdf: manual.md
pandoc --pdf-engine=xelatex \
-V mainfont="DejaVu Sans" \
-V monofont="DejaVu Sans Mono" \
-o $@ $< && echo "✓ Generated manual.pdf"
clean:
rm -f manual.md manual.html manual.epub manual.pdf
.PHONY: test-assembly
test-assembly: manual.md
@echo "Assembly test: checking file count..."
@wc -l manual.md
@echo "First few lines:"
@head -5 manual.md
@echo "Last few lines:"
@tail -5 manual.md