-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
63 lines (51 loc) · 2.5 KB
/
Makefile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
MAKE_SUBDIRS := $(dir $(wildcard ????/Makefile))
PLATEX_FLAGS:= -shell-escape -halt-on-error -interaction=batchmode
SOURCE:=$(wildcard debianmeeting*.tex)
PDFFILES:=$(SOURCE:%.tex=%.pdf)
RELEASEFILES:=$(SOURCE:%.tex=%.release-stamp)
all: $(PDFFILES) $(MAKE_SUBDIRS)
check: all
$(MAKE_SUBDIRS):
$(MAKE) -C $@
publish: $(RELEASEFILES)
# ファイルをリリースする。clean すると一度全部のファ
# イルをpublishしたものとみなす。古いファイルを全部アップロード
# するのを回避します。アップロードしたいファイルは該当する
# .pdf ファイルをtouchすればリリースします。
set -e; for D in $(MAKE_SUBDIRS); do (cd $$D && echo $$D && make publish); done
%.release-stamp: %.pdf
./publish-file.sh $<
touch $@
%.pdf: %.dvi
set -e; \
umask 002 ; \
export TMPDIR="$(shell mktemp -d)"; \
rmdir $$TMPDIR
mv [email protected] $@
%.dvi: %.tex
## start of linting stuff
# check kanji-code of the tex file.
iconv -f utf-8 -t utf-8 < $< > /dev/null
# check some obvious spelling mistakes Debian勉強会標準以外の表記を使った場合ここがエラーになります。修正してからコミットしてください。
./utils/spelllint.sh $<
## end of linting stuff
platex $(PLATEX_FLAGS) $< > [email protected] 2>&1 || (cat [email protected]; exit 1) # create draft input
-if [ -s $(<:%.tex=%.idx) ]; then mendex -U $(<:%.tex=%.idx); fi
platex $(PLATEX_FLAGS) $< > [email protected] 2>&1 || (cat [email protected]; exit 1) # create draft content with correct spacing for index and toc
-if [ -s $(<:%.tex=%.idx) ]; then mendex -U $(<:%.tex=%.idx); fi # recreate index with correct page number
platex $(PLATEX_FLAGS) $< > [email protected] 2>&1 || (cat [email protected]; exit 1) # recreate toc with correct page number
clean:
-rm *.dvi *.aux *.toc *~ *.log *.waux *.out _whizzy_* *.snm *.nav *.jqz *.ind *.ilg *.idx *.idv *.lg *.xref *.4ct *.4tc *.css *.tmplog
-set -e; for D in $(MAKE_SUBDIRS); do (cd $$D && make clean && echo $$D); done
# 一度全部のファイルをpublishしたものとみなす。古いファイルを全部アップロードするのを回避します
-touch $(RELEASEFILES)
deb:
-rm ../*.deb
debian/rules local-make-orig
debuild -us -uc -i'.*pdf$$|.git'
listtopic:
# for generating undocumenteddebian.muse
lgrep dancersection *-natsu.tex *-fuyu.tex ????/*-natsu.tex ????/*-fuyu.tex | \
sed -n 's/:\\dancersection{\([^}]*\)}.*/:\1/p'
.PHONY: deb clean all publish listtopic check $(MAKE_SUBDIRS)