sairate 4108f6c42d docs(book): 添加现代 C++教程及相关代码
- 新增现代 C++ 教程的 Preface 章节,包括英文和中文版本
- 添加 C++ Primer 练习代码
- 新增 Learn C++ 教程的 C++ 开发简介章节
- 添加头文件解析文档
- 更新 mkdocs.yml,包含新教程的目录结构
- 修改项目设置,使用 Python 3.10环境
2025-07-06 16:14:43 +08:00

30 lines
759 B
Makefile

title = 'Modern C++ Tutorial: C++11/14/17/20 On the Fly'
filename = 'modern-cpp-tutorial'
outputname='modern-cpp-tutorial'
revision = $(shell git describe --always --tags)
all: revision pdf
revision:
printf '%% Autogenerated, do not edit\n' > revision.tex
printf '\\newcommand{\\revision}{'$(revision)'}' >> revision.tex
pdf: markdown
@echo "Compiling PDF file..."
pandoc -f markdown+smart -s $(filename).md -o $(filename).pdf \
--title-prefix $(title) \
--template=meta/template.tex \
--pdf-engine=`which xelatex`
@echo "Done."
rm *.md revision.tex
markdown:
@echo "Copy markdown files..."
cp -r ../../book/en-us/* .
@echo "Aggregating markdown files..."
python3 aggregator.py
clean:
rm -rf revision.tex *.md
.PHONY: markdown pdf clean