-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (45 loc) · 1.3 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
SOURCES = $(wildcard *.nv)
OBJECTS = $(SOURCES:.nv=)
SAVE=textes-`date +"%Y%m%d"`
JUST_TEX ?= 1
GERAUDSOFT ?= 0
all: $(OBJECTS)
ifeq ($(JUST_TEX),1)
cat result/*.tex > result/all.texx
mv result/all.tex{x,}
sed -i "s/\\\tiret/―/g" result/all.tex
sed -i "s/\\\og/«/g" result/all.tex
sed -i "s/\\\myfg/»/g" result/all.tex
cp do_it.tex result/
cd result; xelatex do_it.tex && xelatex do_it.tex && mv {do_it,oeuvres}.pdf
endif
%: %.nv
cp $< script/
cp info/[email protected] script/config/info.mk
ifeq ($(JUST_TEX),0)
cd script; $(MAKE) -f Makefile NAME=$@ html_full txt xetex
cd script; $(MAKE) -f Makefile NAME=$@ link
cat script/link.htm >> result/links.html
cp script/$@{.xhtml,.pdf,.txt,_plain.txt} result/
ifeq ($(GERAUDSOFT),1)
cd script; $(MAKE) -f Makefile NAME=$@ geraudsoft
cp script/index.php result/
mv result/{$@,`echo $@|tr -d '[0-9_]'`}.pdf
mv result/{$@,`echo $@|tr -d '[0-9_]'`}.txt
mv result/{$@_plain,`echo $@|tr -d '[0-9_]'`_plain}.txt
endif
else
cd script; $(MAKE) -f Makefile NAME=$@ MK_TEX_TITLE=1 print
cp script/[email protected] result/
cp script/texte.tex result/[email protected]
endif
cd script; $(MAKE) -f Makefile NAME=$@ distclean
rm script/*.nv
archive:
mkdir $(SAVE)
cp $(SOURCES) $(SAVE)/
cp -r info result $(SAVE)/
tar caf $(SAVE).tar.lzma $(SAVE)/
rm -rf $(SAVE)
clean:
rm -f result/*