summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pbsheet/xpl/GNUmakefile
blob: 035b81b336c1077d34faa28aaaa29aa4d045f084 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# GNUmakefile, © 2003, 2004, Djalil CHAFAI.

# Please adjust the following variables to your environment.

BIBTEX=bibtex
DVIPS=dvips -D 600 -t a4
LATEX=latex #--src-specials
PDFLATEX=pdflatex
RM=rm
THUMBPDF=thumbpdf

# Normally, what follows does not need any modification. 

NOM=xpl-fr
NOML=""
MAKEFILENAME=GNUmakefile
OUTPUTS=dvi ps pdf
INTERMED=log out aux toc ind bbl blg lol lof lot ilg idx inc rel brf tpt
FIGSDIR=img
CODESDIR=pgm
TEXINPUTS:=.:./$(FIGSDIR)//:./$(CODESDIR)//:$(TEXINPUTS)
export TEXINPUTS

# Static sources related variables.

TEX= $(NOM).bib $(NOM).tex
MISC1= $(shell kpsewhich amsalpha.bst)
MISC2= $(wildcard $(FIGSDIR)/* $(CODESDIR)/*) $(MAKEFILENAME)
SRC= $(MISC1) $(MISC2) $(TEX)

# Dependencies.

DEP_PS=$(MAKEFILENAME) $(MISC1) $(TEX)
DEP_PDF=$(MAKEFILENAME) $(MISC1) $(TEX)
DEP_ARCH=$(SRC) $(NOM).ps $(NOM).pdf


# Special variables.

.PHONY= $(OUTPUTS) help clean cleanall
.PHONY: $(.PHONY)
.SUFFIXES:
.INTERMEDIATE: $(INTERMDED:%=$(NOM).%)

# Phony rules.

help:
	@echo
	@echo " Rules to compile $(NOM).tex : $(.PHONY)."
	@echo " For example «make ps» will make the PS file for you!"
	@echo 

dvi: clean $(NOM).dvi
ps: $(NOM).ps
pdf: clean $(NOM).pdf

clean:
	@$(RM) -f $(INTERMED:%=$(NOM).%) thb*.png *~ *.aux *.inc
	@$(RM) -f $(CODESDIR)/*~ $(FIGSDIR)/*~ 
	@$(RM) -rf auto

cleanall: clean
	@for f in $(OUTPUTS); do $(RM) -f $(NOM).$$f; done

# Rules based on target files.

$(NOM).ps: $(NOM).dvi
	@$(DVIPS) $(NOM).dvi -o $(NOM).ps

$(NOM).dvi: $(DEP_PS)
	@$(LATEX) $(NOM)
	@$(BIBTEX) $(NOM)
	@$(LATEX) $(NOM)
	@$(LATEX) $(NOM)
	@$(LATEX) $(NOM)

$(NOM).pdf: $(DEP_PDF)
	@$(PDFLATEX) $(NOM)
	@$(BIBTEX) $(NOM)
	@$(PDFLATEX) $(NOM)
	@$(PDFLATEX) $(NOM)
	@$(THUMBPDF) $(NOM).pdf
	@$(PDFLATEX) $(NOM)

# End Of File.