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