blob: f843045aee1507230caf82f611fd6d0925594cb6 (
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
|
# GNU Makefile for tr2latex on *NIX machines
# CC chooses your C compiler
CC = gcc
# PREFIX sets your base directory
PREFIX = /usr/local
#PREFIX = /opt/tr2latex
# TEXDIR gives the path where the tex library resides (fonts, macros ...)
TEXDIR = $(PREFIX)/share/texmf-local
#TEXDIR = $(PREFIX)/texlive/texmf-local
# flags for compiling C sources
CFLAGS += -Wall -O2
##############################################################################
# nothing to configure beyond this point
all: tr2latex
tr2latex: tr2latex.o tr.o subs.o
$(CC) -o $@ $^
tr2latex.o: tr2latex.c setups.h protos.h
tr.o: tr.c setups.h protos.h
subs.o: subs.c protos.h setups.h simil.h greek.h macros.h maths.h flip.h forbid.h special.h
install: tr2latex
install -m 755 -d $(PREFIX)/bin
install -m 755 -d $(PREFIX)/share/man/man1
install -m 755 -d $(TEXDIR)/macros
install -m 0755 tr2latex $(PREFIX)/bin/tr2latex
install -m 0444 tr2latex.man $(PREFIX)/share/man/man1/tr2latex.1
install -m 0444 troffman.sty troffms.sty $(TEXDIR)/macros
uninstall:
rm -f $(PREFIX)/bin/tr2latex $(PREFIX)/share/man/man1/tr2latex.1 $(TEXDIR)/macros/troffman.sty $(TEXDIR)/macros/troffms.sty
clean:
-rm -f *.o core tr2latex *~ TAGS tags testfile.tex *.pdf *.aux *.log *.toc *.zip
test: testfile.tex testfile.pdf diffs.pdf
testfile.tex: testfile tr2latex
./tr2latex $< > $@
%.pdf: %.tex
pdflatex $<
tr2latex.zip: clean
$(RM) ../$@
cd .. ; zip -9 -x 'tr2latex/.svn/*' -r $@ tr2latex/
mv -f ../$@ .
|