File: Makefile

package info (click to toggle)
iproute 991023-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 932 kB
  • ctags: 767
  • sloc: ansic: 12,199; sh: 1,018; makefile: 172; perl: 100
file content (40 lines) | stat: -rw-r--r-- 828 bytes parent folder | download
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
PSFILES=ip-cref.ps ip-tunnels.ps api-ip6-flowlabels.ps
# tc-cref.ps
# api-rtnl.tex api-pmtudisc.tex api-news.tex
# iki-netdev.ps iki-neighdst.ps


LATEX=latex
DVIPS=dvips
LPR=lpr -Zsduplex
SHELL=bash

DVIFILES=$(subst .ps,.dvi,$(PSFILES))


all: pstwocol

pstwocol: $(PSFILES)

dvi: $(DVIFILES)

print: $(PSFILES)
	$(LPR) $(PSFILES)

%.dvi: %.tex
	@set -e; pass=2; echo "Running LaTeX $<"; \
	while [ `$(LATEX) $< </dev/null 2>&1 | \
		 grep -c '^\(LaTeX Warning: Label(s) may\|No file \|! Emergency stop\)'` -ge 1 ]; do \
		if [ $$pass -gt 3 ]; then \
			echo "Seems, something is wrong. Try by hands." ; exit 1 ; \
		fi; \
		echo "Re-running LaTeX $<, $${pass}d pass"; pass=$$[$$pass + 1]; \
	done

%.ps: %.dvi
	$(DVIPS) $< -o $@.tmp
	./do-psnup $@.tmp $@
	rm -f $@.tmp

clean:
	rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES)