1725dd07540a2f325a959fbc13d23a6df7be58f1
[oweals/gnunet.git] / doc / handbook / Makefile.am
1 # This Makefile.am is in the public domain
2 docdir = $(datadir)/doc/gnunet/
3
4 infoimagedir = $(infodir)/images
5
6 #DOT_FILES = images/$(wildcard *.dot)
7
8 #DOT_VECTOR_GRAPHICS =                                                          \
9 #       $(DOT_FILES:%.dot=%.eps)                                                \
10 #       $(DOT_FILES:%.dot=%.pdf)
11
12 if ACTIVATE_TEXINFO4
13 # NOTE: While GNU makeinfo 6.5 supports --css-ref=URL,
14 # makeinfo 4.8 (in NetBSD 8.0, macOS, and maybe other
15 # base) does only support --css-include=FILE.
16 # The only difference is a shorter html output and
17 # in 6.5 the ability to use refs instead of include.
18 # We prefer not to break builds in this case, so
19 # we use the include version which is backwards compatible
20 # and upwards compatible, while the ref variant is neither.
21 AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css
22 else
23 # In the 5.x version they added `--split=chapters|sections` in
24 # addition to `--split=nodes`.
25 AM_MAKEINFOHTMLFLAGS = --split=sections --css-ref="../style.css" --css-ref="../manual.css"
26 endif
27
28 dist_infoimage_DATA =                                           \
29         images/gnunet-gtk-0-10-gns-a-done.png                   \
30         images/gnunet-gtk-0-10-gns-a.png                        \
31         images/daemon_lego_block.png                            \
32         images/gnunet-gtk-0-10-gns.png                          \
33         images/gnunet-0-10-peerinfo.png                         \
34         images/gnunet-gtk-0-10-identity.png                     \
35         images/gnunet-fs-gtk-0-10-star-tab.png                  \
36         images/gnunet-gtk-0-10-download-area.png                \
37         images/gnunet-gtk-0-10-search-selected.png              \
38         images/gnunet-gtk-0-10-fs-menu.png                      \
39         images/gnunet-gtk-0-10-traffic.png                      \
40         images/gnunet-gtk-0-10-fs.png                           \
41         images/gnunet-namestore-gtk-phone.png                   \
42         images/gnunet-gtk-0-10-fs-publish-editing.png           \
43         images/gnunet-namestore-gtk-vpn.png                     \
44         images/gnunet-gtk-0-10-fs-published.png                 \
45         images/gnunet-setup-exit.png                            \
46         images/gnunet-gtk-0-10-fs-publish.png                   \
47         images/iceweasel-preferences.png                        \
48         images/gnunet-gtk-0-10-fs-publish-select.png            \
49         images/iceweasel-proxy.png                              \
50         images/gnunet-gtk-0-10-fs-publish-with-file_0.png       \
51         images/service_lego_block.png                           \
52         images/gnunet-gtk-0-10-fs-publish-with-file.png         \
53         images/service_stack.png                                \
54         images/gnunet-gtk-0-10-fs-search.png                    \
55         images/gnunet-tutorial-service.png                      \
56         images/gnunet-tutorial-system.png                       \
57         images/daemon_lego_block.svg                            \
58         images/lego_stack.svg                                   \
59         images/service_lego_block.svg                           \
60         images/structure.dot                                    \
61         images/gns.dot  \
62         images/gns.jpg
63
64 #       images/$(wildcard *.png)                                                \
65 #       images/$(wildcard *.svg)
66 #       $(DOT_FILES:%.dot=%.png)
67
68 #DOT_OPTIONS =                                                                  \
69 #       -Gratio=.9 -Gnodesep=.005 -Granksep=.00005                              \
70 #       -Nfontsite=9 -Nheight=.1 -Nwidth=.1
71
72 # .dot.png:
73 #       $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
74 #       mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
75
76 # .dot.pdf:
77 #       $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
78 #       mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
79
80 # .dot.eps:
81 #       $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
82 #       mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
83
84 # .png.eps:
85 #       $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
86 #       mv "$@-tmp.eps" "$@"
87
88 # pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
89 # info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
90 # ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps)                \
91 #       $(top_srcdir)/%D%/images/coreutils-size-map.eps
92 # dvi-local: ps-local
93
94
95 info_TEXINFOS =                                                 \
96         gnunet.texi
97
98 gnunet_TEXINFOS =                                               \
99         chapters/developer.texi                                 \
100         chapters/keyconcepts.texi                               \
101         chapters/preface.texi                           \
102         chapters/philosophy.texi                                \
103         chapters/installation.texi                              \
104         chapters/user.texi                                      \
105         chapters/vocabulary.texi                                \
106         chapters/configuration.texi                             \
107         chapters/contributing.texi                              \
108         fdl-1.3.texi                                            \
109         gpl-3.0.texi                                            \
110         agpl-3.0.texi                                           \
111         version.texi
112
113 EXTRA_DIST =                                                    \
114         $(gnunet_TEXINFOS)                                      \
115         htmlxref.cnf                                            \
116         gversion.texi                                           \
117         run-gendocs.sh                                          \
118         docstyle.css                                            \
119         manual.css                                              \
120         reset.css                                               \
121         style.css
122
123
124 #       $(DOT_FILES)                                                            \
125 #       $(DOT_VECTOR_GRAPHICS)
126
127 DISTCLEANFILES =                                                \
128         gnunet.cps                                              \
129         chapters/developer.cps                                  \
130         chapters/installation.cps                               \
131         chapter/philosophy.cps                                  \
132         chapters/user.cps                                       \
133         chapters/configuration.cps                              \
134         chapters/terminology.cps                                \
135         chapters/vocabulary.cps                                 \
136         fdl-1.3.cps                                             \
137         agpl-3.0.cps                                            \
138         gpl-3.0.cps
139
140 # if HAVE_EXTENDED_DOCUMENTATION_BUILDING
141 daemon_lego_block.png: images/daemon_lego_block.svg
142         convert images/daemon_lego_block.svg images/daemon_lego_block.png &&
143         pngcrush images/daemon_lego_block.png images/daemon_lego_block.png
144
145 service_lego_block.png: images/service_lego_block.svg
146         convert images/service_lego_block.svg images/service_lego_block.png &&
147         pngcrush images/service_lego_block.png images/serivce_lego_block.png
148
149 lego_stack.png: images/lego_stack.svg
150         convert images/lego_stack.svg images/lego_stack.png &&
151         pngcrush images/lego_stack.png images/lego_stack.png
152
153 # XXX: is this sed invocation portable enough? otherwise try tr(1).
154 version.texi/replacement: version.texi/replacement/revert
155         @sed "s/GPACKAGE_VERSION/$(PACKAGE_VERSION)/g" gversion.texi > gversion.texi.tmp
156         @mv gversion.texi.tmp gversion.texi
157
158 version.texi/replacement/revert:
159         @echo "@set VERSION GPACKAGE_VERSION" > gversion.texi
160         @echo "@set EDITION GPACKAGE_VERSION" >> gversion.texi
161
162
163 # FIXME: rm *.html and *.pdf
164 #doc-clean:
165 #       @rm *.aux *.log *.toc *.cp *.cps
166
167 all: version.texi/replacement
168
169 doc-all-install:
170         @mkdir -p $(DESTDIR)/$(docdir)
171         @mkdir -p $(DESTDIR)/$(infoimagedir)
172         @mkdir -p $(DESTDIR)/$(infodir)
173         @install -m 0755 gnunet.pdf $(DESTDIR)/$(docdir)
174         @install -m 0755 gnunet.info $(DESTDIR)/$(infodir)
175         @install gnunet.html $(DESTDIR)/$(docdir)
176
177 doc-gendoc-install:
178         @mkdir -p $(DESTDIR)/$(docdir)
179         @cp -r manual $(DESTDIR)/$(docdir)
180
181 #       @cp -r images $(DESTDIR)/$(infoimagedir)
182
183 dev-build: version.texi/replacement
184         @makeinfo --pdf gnunet.texi
185         @makeinfo --html gnunet.texi
186         @makeinfo --no-split gnunet.texi
187
188 # TODO: Add more to clean.
189 clean: version.texi/replacement/revert
190         @rm -f gnunet.pdf
191         @rm -f gnunet.html
192         @rm -f gnunet.info
193         @rm -f gnunet.info-1
194         @rm -f gnunet.info-2
195         @rm -f gnunet.info-3
196         @rm -fr gnunet.t2p
197         @rm -fr gnunet-c-tutorial.t2p
198         @rm -fr manual
199
200 # CLEANFILES =                                          \
201 #       gnunet.log                                      \
202 #       gnunet-c-tutorial.log                           \
203 #       $(wildcard *.aux)                               \
204 #       $(wildcard *.toc)                               \
205 #       $(wildcard *.cp)                                \
206 #       $(wildcard *.cps)
207
208 #.PHONY: version.texi
209 # if HAVE_EXTENDED_DOCUMENTATION_BUILDING_PDF
210
211 # if HAVE_EXTENDED_DOCUMENTATION_BUILDING_HTML
212
213 # endif
214 # endif
215 # endif