Skip to content

Commit e4599d0

Browse files
committed
ci: 更新构建说明
1 parent 60662fd commit e4599d0

File tree

4 files changed

+25
-55
lines changed

4 files changed

+25
-55
lines changed

Makefile

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
11
MAIN_DIR := 讲义
2-
ANSWERS_DIR := 习题参考答案
32

4-
export GH_ACTIONS_DIR := gh-actions-build
3+
.PHONY: all clean
54

6-
.PHONY: all gh-actions main ans clean
7-
8-
all: main
9-
10-
gh-actions:
11-
# used by GitHub Actions
12-
# mkdir -p $(GH_ACTIONS_DIR)
13-
# make -C $(MAIN_DIR) gh-cp
14-
# make -C $(ANSWERS_DIR) gh-cp
15-
make -C $(MAIN_DIR)
16-
17-
main:
5+
all:
186
$(MAKE) -C $(MAIN_DIR)
197

20-
ans:
21-
$(MAKE) -C $(ANSWERS_DIR)
22-
238
clean:
249
# Cleaning...
2510
$(MAKE) -C $(MAIN_DIR) clean
26-
$(MAKE) -C $(ANSWERS_DIR) clean
27-
rm -rf $(GH_ACTIONS_DIR)

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@
3131

3232
## 手动编译
3333

34-
在仓库目录下运行 `make` 编译讲义与习题参考答案,运行 `make main``make ans` 分别编译,或在对应文件夹下运行 `make`. 编译完成的 PDF 位于对应文件夹下.
35-
36-
也可以使用 Docker 编译:
34+
在仓库目录下运行 `make` 编译讲义与习题参考答案,编译完成的 PDF 位于讲义目录下. 也可以使用 Docker 编译:
3735

3836
```bash
39-
docker run -v "$PWD":/workdir -e TERM=xterm --rm texlive/texlive:TL2023-historic make
37+
docker run -v"$PWD":/app -w/app -eTERM=xterm --rm texlive/texlive:TL2023-historic make
4038
```

latexmk.mk

Lines changed: 0 additions & 29 deletions
This file was deleted.

讲义/Makefile

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
1+
# FIXME: xindy can't handle UTF-8 filenames
12
FILENAME := 线性代数荣誉课辅学讲义
23
CPNAME := LALU
34

4-
.PHONY: all-new
5+
LATEXMK := latexmk
6+
LATEXMK_FLAGS := -xelatex -shell-escape -interaction=nonstopmode -file-line-error
57

6-
all-new: all
8+
.PHONY: all clean
9+
10+
all:
11+
# Building $(FILENAME).pdf
12+
ifdef CPNAME
13+
@cp -p $(FILENAME).tex $(CPNAME).tex
14+
$(LATEXMK) $(LATEXMK_FLAGS) $(CPNAME).tex
15+
@rm -f $(CPNAME).tex
16+
-@mv $(CPNAME).pdf $(FILENAME).pdf
17+
else
18+
$(LATEXMK) $(LATEXMK_FLAGS) $(FILENAME).tex
19+
endif
20+
# Building answers.pdf
721
$(LATEXMK) $(LATEXMK_FLAGS) LALU-answers.tex
822

9-
include ../latexmk.mk
23+
clean:
24+
rm -f *.aux *.log *.idx *.ind *.ilg *.thm *.toc *.blg *.bbl *.bcf *.out *.fls *.fdb_latexmk *.run.xml *.synctex.gz *.xdv *~ *.lof *.lot
25+
ifdef CPNAME
26+
rm -f $(CPNAME).pdf $(CPNAME).tex
27+
endif

0 commit comments

Comments
 (0)