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