File: Makefile

package info (click to toggle)
magic 8.1.218+ds.1-1~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 16,604 kB
  • sloc: ansic: 160,782; sh: 7,068; tcl: 3,982; lisp: 2,554; makefile: 918; cpp: 587; csh: 149; awk: 140
file content (56 lines) | stat: -rw-r--r-- 1,629 bytes parent folder | download | duplicates (3)
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
MAGICDIR = ../..

include $(MAGICDIR)/defs.mak

PS_SRCDIR=../psfiles
PS_INSTDIR=/usr/share/doc/magic/ps

.SUFFIXES: .dvi .tex .ps

GENDVI=tut1.dvi tut2.dvi tut3.dvi tut4.dvi tut5.dvi tut6.dvi \
	tut7.dvi tut8.dvi tut9.dvi tut10.dvi tut11.dvi \
	maint1.dvi maint2.dvi maint3.dvi maint4.dvi \
	introduction.dvi copyright.dvi addendum6_5.dvi \
	tutscm1.dvi tutscm2.dvi tutscm3.dvi tutscm4.dvi \
	tuttcl1.dvi tuttcl2.dvi tuttcl3.dvi tuttcl4.dvi tuttcl5.dvi \
	tutwrl1.dvi

GENPS=tut1.ps tut2.ps tut3.ps tut4.ps tut5.ps tut6.ps \
	tut7.ps tut8.ps tut9.ps tut10.ps tut11.ps \
	maint1.ps maint2.ps maint3.ps maint4.ps \
	introduction.ps copyright.ps addendum6_5.ps \
	tutscm1.ps tutscm2.ps tutscm3.ps tutscm4.ps \
	tuttcl1.ps tuttcl2.ps tuttcl3.ps tuttcl4.ps tuttcl5.ps \
	tutwrl1.ps

SRC_GENPS= $(GENPS:%=${PS_SRCDIR}/%)
INST_GENPS= $(GENPS:%=$(DESTDIR)${PS_INSTDIR}/%)

all: $(SRC_GENPS)
	@${RM} $(GENDVI) *.log *.aux

install: $(DESTDIR)${PS_INSTDIR} ${INST_GENPS}

$(DESTDIR)${PS_INSTDIR}: make-doc-dir

make-doc-dir:
	${SCRIPTS}/mkdirs $(DESTDIR)${PS_INSTDIR}

$(DESTDIR)${PS_INSTDIR}/%: ${PS_SRCDIR}/% $(DESTDIR)${PS_INSTDIR}
	${CP} ${PS_SRCDIR}/$* $(DESTDIR)${PS_INSTDIR}/$*

.tex.ps:
	@echo "Converting $*.tex -> $*.dvi"
	@latex $*.tex  < /dev/null > /dev/null
	@if grep 'LaTeX Warn' $*.log; \
	then \
		echo "Detected warnings, doing second pass for $*...";\
		latex $*.tex < /dev/null > /dev/null; \
		(grep 'LaTeX Warn' $*.log || (echo > /dev/null)); \
		echo; \
	fi
	@echo "Converting $*.dvi -> $(PS_SRCDIR)/$*.ps"
	@dvips -t letter $*.dvi -o $(PS_SRCDIR)/$*.ps > /dev/null

clean:
	${RM} $(GENDVI) $(SRC_GENPS) *.log *.aux