This repository has been archived by the owner on Oct 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
85 lines (64 loc) · 2.23 KB
/
Makefile
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
PREFIX=/usr
BIN=/bin
DATA=/share
JAR=jar
JAVAC=javac
SRC=$(shell find src | grep '\.java$$')
OBJ=$(shell find src | grep '\.java$$' | sed -e 's_/[a-zA-Z]*\.java$$_/\*\.class_g' -e 's_^src/__g' | sort | uniq)
all: util-say.jar info
.PHONY: util-say.jar
util-say.jar:
"$(JAVAC)" -O -cp src -s src -d . $(SRC) -encoding UTF-8
"$(JAR)" -cfm "$@" "META-INF/MANIFEST.MF" $(OBJ)
info: util-say.info.gz
%.info: %.texinfo
$(MAKEINFO) "$<"
%.info.gz: %.info
gzip -9c < "$<" > "$@"
pdf: util-say.pdf
%.pdf: %.texinfo
texi2pdf "$<"
pdf.gz: util-say.pdf.gz
%.pdf.gz: %.pdf
gzip -9c < "$<" > "$@"
pdf.xz: util-say.pdf.xz
%.pdf.xz: %.pdf
xz -e9 < "$<" > "$@"
dvi: util-say.dvi
%.dvi: %.texinfo
$(TEXI2DVI) "$<"
dvi.gz: util-say.dvi.gz
%.dvi.gz: %.dvi
gzip -9c < "$<" > "$@"
dvi.xz: util-say.dvi.xz
%.dvi.xz: %.dvi
xz -e9 < "$<" > "$@"
install: util-say.jar util-say.info.gz
install -d -m 755 "$(DESTDIR)$(PREFIX)$(BIN)"
install -m 755 util-say.jar "$(DESTDIR)$(PREFIX)$(BIN)"
install -m 755 img2{pony,uni,cow}say "$(DESTDIR)$(PREFIX)$(BIN)"
install -m 755 {pony,uni,cow}say2img "$(DESTDIR)$(PREFIX)$(BIN)"
install -m 755 ponysay2ttyponysay "$(DESTDIR)$(PREFIX)$(BIN)"
ln -sf ponysay2ttyponysay "$(DESTDIR)$(PREFIX)$(BIN)"/tty2colourfultty
ln -sf /usr/bin/cat "$(DESTDIR)$(PREFIX)$(BIN)"/unzebra
install -m 755 ponytool "$(DESTDIR)$(PREFIX)$(BIN)"
install -d -m 755 "$(DESTDIR)$(PREFIX)$(DATA)/licenses/util-say"
install -m 644 LICENSE COPYING "$(DESTDIR)$(PREFIX)$(DATA)/licenses/util-say"
install -d -m 755 "$(DESTDIR)$(PREFIX)$(DATA)/info"
install -m 644 util-say.info.gz "$(DESTDIR)$(PREFIX)$(DATA)/info"
uninstall:
unlink "$(DESTDIR)$(PREFIX)$(BIN)/util-say.jar"
unlink "$(DESTDIR)$(PREFIX)$(BIN)/ponytool"
unlink "$(DESTDIR)$(PREFIX)$(DATA)/info/util-say.info.gz"
rm -- "$(DESTDIR)$(PREFIX)$(BIN)/"img2{pony,uni,cow}say
rm -- "$(DESTDIR)$(PREFIX)$(BIN)/"{pony,uni,cow}say2img
rm -- "$(DESTDIR)$(PREFIX)$(BIN)/"ponysay2ttyponysay
rm -- "$(DESTDIR)$(PREFIX)$(BIN)/"tty2colourfultty
rm -- "$(DESTDIR)$(PREFIX)$(BIN)/"unzebra
yes | rm -r "$(DESTDIR)$(PREFIX)$(DATA)/licenses/util-say"
.PHONY: clean
clean:
yes | rm -r se || true
rm util-say.jar || true
rm *.{info,pdf,ps,dvi}{,.*} || true
rm *.{aux,cp,cps,fn,ky,log,op,ops,pg,toc,tp,vr} || true