blob: 18d71b742b29b35526d0b281b08e58cca19511a2 (
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
# This file is public domain.
# Originally written 1995, Geoffrey Tobin.
# The author has expressed the hope that any modification will retain enough content to remain useful. He would also appreciate being acknowledged as the original author in the documentation.
# This declaration added 2008/11/14 by Clea F. Rees with the permission of Geoffrey Tobin.
# Makefile for dv2dt, dt2dv
# Version 0.6.1
# Thu 9 March 1995
# Geoffrey Tobin
# Nelson H. F. Beebe
#=======================================================================
BINDIR = /usr/local/bin
CATDIR = $(MANDIR)/../cat$(MANEXT)
CC = gcc
CFLAGS = -O2 -Wall
# Some compilers don't optimise correctly; for those, don't use `-O2' :
# CFLAGS = -Wall
CHMOD = /bin/chmod
COL = col -b
CP = /bin/cp
DITROFF = ditroff
DITROFF = groff
EXES = dt2dv dv2dt
LDFLAGS = -s
LDFLAGS =
MAN2PS = ./man2ps
MANDIR = /usr/local/man/man$(MANEXT)
MANEXT = 1
OBJS = dt2dv.o dv2dt.o
RM = /bin/rm -f
SHELL = /bin/sh
DOCS = README dtl.doc dvi.doc dt2dv.man dv2dt.man
SRC = Makefile dtl.h dt2dv.c dv2dt.c man2ps
TESTS = hello.tex example.tex tripvdu.tex edited.txt
DTL_DBN = $(DOCS) $(SRC) $(TESTS)
#=======================================================================
.SUFFIXES: .hlp .ps .man
.man.hlp:
$(DITROFF) -man -Tascii $< | $(COL) >$@
.man.ps:
$(MAN2PS) < $< > $@
#=======================================================================
all: dtl check doc
doc: dt2dv.hlp dv2dt.hlp dt2dv.ps dv2dt.ps
dtl: $(EXES)
check tests: hello example tripvdu edited
dv2dt: dv2dt.o dtl.h
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.o
dt2dv: dt2dv.o dtl.h
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.o
hello: hello.dtl $(EXES)
dt2dv hello.dtl hello2.dvi
dv2dt hello2.dvi hello2.dtl
-@diff hello.dtl hello2.dtl > hello.dif
@if [ -s hello.dif ] ; \
then echo ERROR: differences in hello.dif ; \
else $(RM) hello.dif ; \
fi
hello.dtl: hello.tex
tex hello
dv2dt hello.dvi hello.dtl
example: example.dtl $(EXES)
dt2dv example.dtl example2.dvi
dv2dt example2.dvi example2.dtl
-@diff example.dtl example2.dtl > example.dif
@if [ -s example.dif ] ; \
then echo ERROR: differences in example.dif ; \
else $(RM) example.dif ; \
fi
example.dtl: example.tex
tex example
dv2dt example.dvi example.dtl
tripvdu: tripvdu.dtl $(EXES)
dt2dv tripvdu.dtl tripvdu2.dvi
dv2dt tripvdu2.dvi tripvdu2.dtl
-@diff tripvdu.dtl tripvdu2.dtl > tripvdu.dif
@if [ -s tripvdu.dif ] ; \
then echo ERROR: differences in tripvdu.dif ; \
else $(RM) tripvdu.dif ; \
fi
tripvdu.dtl: tripvdu.tex
tex tripvdu
dv2dt tripvdu.dvi tripvdu.dtl
# edited.txt is already a dtl file.
edited: edited.txt $(EXES)
dt2dv edited.txt edited.dvi
dv2dt edited.dvi edited2.dtl
dt2dv edited2.dtl edited2.dvi
dv2dt edited2.dvi edited3.dtl
@if [ -s edited.dif ] ; \
then echo ERROR : differences in edited.dif ; \
else $(RM) edited.dif ; \
fi
clean mostlyclean:
-$(RM) $(OBJS)
clobber: clean
-$(RM) $(EXES) *~ core *.log *.dvi *.dtl *.dif
distclean realclean: clobber
-$(RM) dt2dv.hlp dv2dt.hlp dt2dv.ps dv2dt.ps
install: dtl
-$(MAKE) uninstall
$(CP) dt2dv $(BINDIR)/dt2dv
$(CHMOD) 775 $(BINDIR)/dt2dv
$(CP) dv2dt $(BINDIR)/dv2dt
$(CHMOD) 775 $(BINDIR)/dv2dt
$(CP) dt2dv.man $(MANDIR)/dt2dv.$(MANEXT)
$(CHMOD) 664 $(MANDIR)/dt2dv.$(MANEXT)
$(CP) dv2dt.man $(MANDIR)/dv2dt.$(MANEXT)
$(CHMOD) 664 $(MANDIR)/dv2dt.$(MANEXT)
uninstall:
-$(RM) $(BINDIR)/dt2dv
-$(RM) $(BINDIR)/dv2dt
-$(RM) $(CATDIR)/dt2dv.$(MANEXT)
-$(RM) $(CATDIR)/dv2dt.$(MANEXT)
dist: dtl.tar.gz
dtl.tar.gz: $(DTL_DBN)
tar -czf dtl.tar.gz $(DTL_DBN)
zip: dtl.zip
dtl.zip: $(DTL_DBN)
zip dtl.zip $(DTL_DBN)
# EOF Makefile
|