who makes these decisions at gnu texinfo... argh!
[oweals/gnunet.git] / doc / tutorial / Makefile.am
1 # This Makefile.am is in the public domain
2 docdir = $(datadir)/doc/gnunet/
3
4 #DOT_FILES = images/$(wildcard *.dot)
5
6 #DOT_VECTOR_GRAPHICS =                                          \
7 #       $(DOT_FILES:%.dot=%.eps)                                \
8 #       $(DOT_FILES:%.dot=%.pdf)
9
10 if ACTIVATE_TEXINFO4
11 # NOTE: While GNU makeinfo 6.5 supports --css-ref=URL,
12 # makeinfo 4.8 (in NetBSD 8.0, macOS, and maybe other
13 # base) does only support --css-include=FILE.
14 # The only difference is a shorter html output and
15 # in 6.5 the ability to use refs instead of include.
16 # We prefer not to break builds in this case, so
17 # we use the include version which is backwards compatible
18 # and upwards compatible, while the ref variant is neither.
19 AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css
20 else
21 # In the 5.x version they added `--split=chapters|sections` in
22 # addition to `--split=nodes`.
23 # Hold on to your hats: In version 6.5 this is already removed, ffs.
24 # GNU Texinfo, please be more consistent than 1 version in switches.
25 # This however is compatible to version 5.2. Thanks, I hate it.
26 # AM_MAKEINFOHTMLFLAGS = --split=sections --css-ref="../style.css" --css-ref="../manual.css"
27 AM_MAKEINFOHTMLFLAGS = --split --css-ref="../style.css" --css-ref="../manual.css"
28 endif
29
30 #DOT_OPTIONS =                                                  \
31 #       -Gratio=.9 -Gnodesep=.005 -Granksep=.00005              \
32 #       -Nfontsite=9 -Nheight=.1 -Nwidth=.1
33
34 # .dot.png:
35 #       $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
36 #       mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
37
38 # .dot.pdf:
39 #       $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
40 #       mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
41
42 # .dot.eps:
43 #       $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
44 #       mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
45
46 # .png.eps:
47 #       $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
48 #       mv "$@-tmp.eps" "$@"
49
50 # pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
51 # info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
52 # ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps)                \
53 #       $(top_srcdir)/%D%/images/coreutils-size-map.eps
54 # dvi-local: ps-local
55
56
57 gnunet_tutorial_examples =                                              \
58         examples/001.c                                                  \
59         examples/002.c                                                  \
60         examples/003.c                                                  \
61         examples/004.c                                                  \
62         examples/005.c                                                  \
63         examples/006.c                                                  \
64         examples/007.c                                                  \
65         examples/008.c                                                  \
66         examples/009.c                                                  \
67         examples/010.c                                                  \
68         examples/011.c                                                  \
69         examples/012.c                                                  \
70         examples/013.c                                                  \
71         examples/013.1.c                                                \
72         examples/014.c                                                  \
73         examples/015.c                                                  \
74         examples/016.c                                                  \
75         examples/017.c                                                  \
76         examples/018.c                                                  \
77         examples/019.c                                                  \
78         examples/020.c                                                  \
79         examples/021.c                                                  \
80         examples/022.c                                                  \
81         examples/023.c                                                  \
82         examples/024.c                                                  \
83         examples/025.Makefile.am                                        \
84         examples/026.c                                                  \
85         examples/testbed_test.c
86
87 info_TEXINFOS =                                                 \
88         gnunet-tutorial.texi
89
90 EXTRA_DIST =                                                    \
91         $(gnunet_tutorial_examples)                             \
92         htmlxref.cnf                                            \
93         run-gendocs.sh                                          \
94         docstyle.css                                            \
95         manual.css                                              \
96         reset.css                                               \
97         style.css
98
99
100 DISTCLEANFILES =                                                \
101         gnunet-tutorial.cps                                     \
102         fdl-1.3.cps
103
104 # XXX: is this sed invocation portable enough? otherwise try tr(1).
105 version.texi/replacement: version.texi/replacement/revert
106         @sed "s/GPACKAGE_VERSION/$(PACKAGE_VERSION)/g" gversion.texi > gversion.texi.tmp
107         @mv gversion.texi.tmp gversion.texi
108
109 version.texi/replacement/revert:
110         @echo "@set VERSION GPACKAGE_VERSION" > gversion.texi
111         @echo "@set EDITION GPACKAGE_VERSION" >> gversion.texi
112
113
114
115 # FIXME: rm *.html and *.pdf
116 #doc-clean:
117 #       @rm *.aux *.log *.toc *.cp *.cps
118
119 all: version.texi/replacement
120
121 doc-all-install:
122         @mkdir -p $(DESTDIR)/$(docdir)
123         @mkdir -p $(DESTDIR)/$(infoimagedir)
124         @mkdir -p $(DESTDIR)/$(infodir)
125         @install -m 0755 gnunet-tutorial.pdf $(DESTDIR)/$(docdir)
126         @install -m 0755 gnunet-tutorial.info $(DESTDIR)/$(infodir)
127         @install gnunet-tutorial.html $(DESTDIR)/$(docdir)
128
129 doc-gendoc-install:
130         @mkdir -p $(DESTDIR)/$(docdir)
131         @cp -r manual $(DESTDIR)/$(docdir)
132
133 #       @cp -r images $(DESTDIR)/$(infoimagedir)
134
135 dev-build: version.texi/replacement
136         @makeinfo --pdf gnunet-c-tutorial.texi
137         @makeinfo --html gnunet-c-tutorial.texi
138         @makeinfo --no-split gnunet-c-tutorial.texi
139
140 # TODO: Add more to clean.
141 clean: version.texi/replacement/revert
142         @rm -f gnunet-tutorial.pdf
143         @rm -f gnunet-tutorial.info
144         @rm -rf gnunet-tutorial.html
145         @rm -fr gnunet-tutorial.t2p
146
147 # CLEANFILES =                                          \
148 #       gnunet.log                                      \
149 #       gnunet-c-tutorial.log                           \
150 #       $(wildcard *.aux)                               \
151 #       $(wildcard *.toc)                               \
152 #       $(wildcard *.cp)                                \
153 #       $(wildcard *.cps)
154
155 #.PHONY: version.texi
156 # if HAVE_EXTENDED_DOCUMENTATION_BUILDING_PDF
157
158 # if HAVE_EXTENDED_DOCUMENTATION_BUILDING_HTML
159
160 # endif
161 # endif
162 # endif