blob: f45223a5b37216befa7bbcf75c475eb267e2147b (
plain) (
blame)
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
|
BOOK = using-git
PKGNAME = using-git
TEXINFO_DIR = .
PREFIX = /usr
DATA = /share
DATADIR = $(DATADIR)
INFODIR = $(DATADIR)/info
DOCDIR = $(DATADIR)/doc
LICENSEDIR = $(DATADIR)/licenses
TEXIFLAGS = #--force
.PHONY: all
all:
.PHONY: install
install:
.PHONY: uninstall
uninstall:
.PHONY: clean
clean:
-rm -r -- bin obj
## Texinfo manual section
.PHONY: doc
all: doc
doc: info pdf ps dvi
.PHONY: info pdf ps dvi
info: $(BOOK).info
pdf: $(BOOK).pdf
ps: $(BOOK).ps
dvi: $(BOOK).dvi
#obj/logo.svg: logo.svg
# @mkdir -p obj
# cp "$<" "$@"
#
#obj/logo.pdf: logo.svg
# @mkdir -p obj
# rsvg-convert --format=pdf "$<" > "$@"
#
#obj/logo.eps: obj/logo.ps
# ps2eps "$<"
#
#obj/logo.ps: logo.svg
# @mkdir -p obj
# rsvg-convert --format=ps "$<" > "$@"
%.info: $(TEXINFO_DIR)/%.texinfo
$(MAKEINFO) $(TEXIFLAGS) "$<"
%.pdf: $(TEXINFO_DIR)/%.texinfo
@mkdir -p obj/pdf
cd obj/pdf && texi2pdf $(TEXIFLAGS) "../../$<" < /dev/null
mv "obj/pdf/$@" "$@"
%.dvi: $(TEXINFO_DIR)/%.texinfo
@mkdir -p obj/dvi
cd obj/dvi && $(TEXI2DVI) $(TEXIFLAGS) "../../$<" < /dev/null
mv "obj/dvi/$@" "$@"
%.ps: $(TEXINFO_DIR)/%.texinfo
@mkdir -p obj/ps
cd obj/ps && texi2pdf $(TEXIFLAGS) --ps "../../$<" < /dev/null
mv "obj/ps/$@" "$@"
.PHONY: install-info install-pdf install-dvi install-ps
install: install-info
install-info: $(BOOK).info
install -Dm644 "$<" -- "$(DESTDIR)$(INFODIR)/$(PKGNAME).info"
install-pdf: $(BOOK).pdf
install -Dm644 "$<" -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).pdf"
install-dvi: $(BOOK).dvi
install -Dm644 "$<" -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).dvi"
install-ps: $(BOOK).ps
install -Dm644 "$<" -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).ps"
.PHONY: uninstall-info uninstall-pdf uninstall-dvi uninstall-ps
uninstall: uninstall-info uninstall-pdf uninstall-dvi uninstall-ps
uninstall-info:
-rm -- "$(DESTDIR)$(INFODIR)/$(PKGNAME).info"
uninstall-pdf:
-rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).pdf"
uninstall-dvi:
-rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).dvi"
uninstall-ps:
-rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).ps"
.PHONY: clean-texinfo
clean: clean-texinfo
clean-texinfo:
-rm -r -- *.{info,pdf,ps,dvi}
## License section
.PHONY: install-license
install: install-license
install-license:
install -d -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
install -m644 LICENSE -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
.PHONY: uninstall-license
uninstall: uninstall-license
uninstall-license:
-rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE"
-rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
|