Makefile.am 7.78 KB
Newer Older
unknown's avatar
unknown committed
1 2 3 4 5 6 7 8 9
# Normally you do not need to remake the files here. But if you want
# to you will need the GNU TeX-info utilities. To make a Postscript
# files you also need TeX and dvips. To make the PDF file you will
# need pdftex. We use the teTeX distribution for all of these.

# We avoid default automake rules because of problems with .dvi file
# and BSD makes

# If you know how to fix any of this more elegantly please mail
10
# docs@mysql.com
unknown's avatar
unknown committed
11 12 13 14 15 16 17 18 19 20

TEXI2HTML_FLAGS =	-iso -number
DVIPS =			dvips
MAKEINFO =		@MAKEINFO@
TEXINFO_TEX =		Support/texinfo.tex

noinst_SCRIPTS =	Support/texi2html Support/generate-text-files.pl \
			Support/generate-mirror-listing.pl
info_TEXINFOS =		manual.texi

21
targets =		manual.txt mysql.info manual.html
unknown's avatar
unknown committed
22 23

BUILT_SOURCES =		$(targets) manual_toc.html include.texi
unknown's avatar
unknown committed
24
EXTRA_DIST =		$(noinst_SCRIPTS) $(BUILT_SOURCES) mysqld_error.txt \
25
			INSTALL-BINARY reservedwords.texi 
unknown's avatar
unknown committed
26 27 28 29

all:			$(targets) txt_files

txt_files:		../INSTALL-SOURCE ../COPYING ../COPYING.LIB \
30
			INSTALL-BINARY ../support-files/MacOSX/ReadMe.txt
unknown's avatar
unknown committed
31

unknown's avatar
unknown committed
32 33
CLEAN_FILES:		$(BUILD_SOURCES)
	touch $(BUILD_SOURCES)
unknown's avatar
unknown committed
34

35
# The PostScript and PDF version are so big that they are not included in the
unknown's avatar
unknown committed
36
# standard distribution. It is available for download from the home page.  
37
paper: manual_a4.ps manual_letter.ps  $(PDFMANUAL)
unknown's avatar
unknown committed
38 39 40 41 42

#########################################################################

# The Makefile contains the previous version so we can not use that
include.texi:	../configure.in
unknown's avatar
unknown committed
43 44
	echo "@c This file is autogenerated by the Makefile" > $@
	echo -n "@set mysql_version " >> $@
unknown's avatar
unknown committed
45 46 47 48 49 50
	grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \
	 sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;' >> $@
	echo -n "@set default_port " >> $@
	grep "MYSQL_TCP_PORT_DEFAULT=" ../configure.in | \
	 sed -e 's;MYSQL_TCP_PORT_DEFAULT=;;' >> $@

51 52 53 54 55 56

#
# English Manual
#

# GNU Info
unknown's avatar
unknown committed
57 58 59
mysql.info:	manual.texi include.texi
	cd $(srcdir) && $(MAKEINFO) --no-split -I $(srcdir) $<

60
# Plain Text
unknown's avatar
unknown committed
61 62 63 64
manual.txt:	manual.texi include.texi
	cd $(srcdir) && \
	$(MAKEINFO) -I $(srcdir) --no-headers --no-split --output $@ $<

65
# HTML, all in one file
unknown's avatar
unknown committed
66 67
manual.html:	manual.texi include.texi $(srcdir)/Support/texi2html
	cd $(srcdir) && @PERL@ $(srcdir)/Support/texi2html $(TEXI2HTML_FLAGS) $<
unknown's avatar
unknown committed
68 69
manual_toc.html: manual.html

70
# PDF, Portable Document Format
unknown's avatar
unknown committed
71
manual.pdf: manual.texi
72
	sed -e 's|@image{[^}]*} *||g' <$< >manual-tmp.texi
unknown's avatar
unknown committed
73 74 75 76 77
	pdftex --interaction=nonstopmode manual-tmp.texi
	texindex manual-tmp.??
	pdftex --interaction=nonstopmode manual-tmp.texi
	texindex manual-tmp.??
	pdftex --interaction=nonstopmode manual-tmp.texi
78
	mv manual-tmp.pdf $@
unknown's avatar
unknown committed
79
	rm -f manual-tmp.*
unknown's avatar
unknown committed
80 81
	touch $@

82
# XML, DocBook 4.0
83
mysql.xml: manual.texi include.texi
84 85 86
	$(MAKEINFO) --force --no-ifinfo --docbook $<
	mv $@ mysql-tmp.xml
	Support/docbook-fixup.pl <mysql-tmp.xml >$@
87
	rm -f mysql-tmp.xml
88

89
# Postscript, A4 Paper
unknown's avatar
unknown committed
90 91 92
manual_a4.ps:	manual.texi include.texi
	TEXINPUTS=$(srcdir):$$TEXINPUTS \
	  MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
93
	    $(TEXI2DVI) --batch --texinfo --quiet '@afourpaper' $<
unknown's avatar
unknown committed
94 95 96
	$(DVIPS) -t a4 manual.dvi -o $@
	touch $@

97
# Postscript, US Letter Paper
unknown's avatar
unknown committed
98 99 100 101 102 103 104
manual_letter.ps:	manual.texi include.texi
	TEXINPUTS=$(srcdir):$$TEXINPUTS \
	  MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
	    $(TEXI2DVI) --batch $<
	$(DVIPS) -t letter manual.dvi -o $@
	touch $@

105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125

#
# German Manual
#

# GNU Info
mysql.de.info:	manual.de.texi include.texi
	cd $(srcdir) && $(MAKEINFO) --no-split -I $(srcdir) $<

# Plain Text
manual.de.txt:	manual.de.texi include.texi
	cd $(srcdir) && \
	$(MAKEINFO) -I $(srcdir) --no-headers --no-split --output $@ $<

# HTML, all in one file
manual.de.html:	manual.de.texi include.texi $(srcdir)/Support/texi2html
	cd $(srcdir) && @PERL@ $(srcdir)/Support/texi2html $(TEXI2HTML_FLAGS) $<
manual_toc.de.html: manual.html

# PDF, Portable Document Format
manual.de.pdf: manual.de.texi
126
	sed -e 's|@image{[^}]*} *||g' <$< >manual-tmp.texi
127 128 129 130 131
	pdftex --interaction=nonstopmode manual-tmp.texi
	texindex manual-tmp.??
	pdftex --interaction=nonstopmode manual-tmp.texi
	texindex manual-tmp.??
	pdftex --interaction=nonstopmode manual-tmp.texi
132
	mv manual-tmp.pdf $@
133 134 135 136 137
	rm -f manual-tmp.*
	touch $@

# XML, DocBook 4.0
mysql.de.xml: manual.de.texi include.texi
138 139 140
	$(MAKEINFO) --force --no-ifinfo --docbook $<
	mv $@ mysql-tmp.xml
	Support/docbook-fixup.pl <mysql-tmp.xml >$@
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
	rm -f mysql-tmp.xml

# Postscript, A4 Paper
manual_a4.de.ps:	manual.de.texi include.texi
	TEXINPUTS=$(srcdir):$$TEXINPUTS \
	  MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
	    $(TEXI2DVI) --batch --texinfo --quiet '@afourpaper' $<
	$(DVIPS) -t a4 manual.de.dvi -o $@
	touch $@

# Postscript, US Letter Paper
manual_letter.de.ps:	manual.de.texi include.texi
	TEXINPUTS=$(srcdir):$$TEXINPUTS \
	  MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
	    $(TEXI2DVI) --batch $<
	$(DVIPS) -t letter manual.de.dvi -o $@
	touch $@


160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
#
# Internals Manual
#

# GNU Info
internals.info:	internals.texi include.texi
	cd $(srcdir) && $(MAKEINFO) --no-split -I $(srcdir) $<

# Plain Text
internals.txt:	internals.texi include.texi
	cd $(srcdir) && \
	$(MAKEINFO) -I $(srcdir) --no-headers --no-split --output $@ $<

# HTML, all in one file
internals.html:	internals.texi include.texi $(srcdir)/Support/texi2html
	cd $(srcdir) && @PERL@ $(srcdir)/Support/texi2html $(TEXI2HTML_FLAGS) $<
internals_toc.html: internals.html

# PDF, Portable Document Format
internals.pdf: internals.texi
	sed -e 's|@image{[^}]*} *||g' <$< >internals-tmp.texi
	pdftex --interaction=nonstopmode internals-tmp.texi
	texindex internals-tmp.??
	pdftex --interaction=nonstopmode internals-tmp.texi
	texindex internals-tmp.??
	pdftex --interaction=nonstopmode internals-tmp.texi
	mv internals-tmp.pdf $@
	rm -f internals-tmp.*
	touch $@

# Postscript, A4 Paper
internals_a4.ps:	internals.texi include.texi
	TEXINPUTS=$(srcdir):$$TEXINPUTS \
	  MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
	    $(TEXI2DVI) --batch --texinfo --quiet '@afourpaper' $<
	$(DVIPS) -t a4 internals.dvi -o $@
	touch $@

# Postscript, US Letter Paper
internals_letter.ps:	internals.texi include.texi
	TEXINPUTS=$(srcdir):$$TEXINPUTS \
	  MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
	    $(TEXI2DVI) --batch $<
	$(DVIPS) -t letter internals.dvi -o $@
	touch $@


207 208 209 210 211 212
#
# Miscellaneous
#

# Target to produce NuSphere Manual
nusphere.pdf: manual.texi
213 214 215 216 217
	sed -e 's/@example/@smallexample/g' \
	    -e 's/@end example/@end smallexample/g' \
	    -e 's/@c ifnusphere //g' \
	    -e 's|@image{[^}]*} *||g' \
	<$< >manual-tmp.texi
218 219 220 221 222
	pdftex --interaction=nonstopmode manual-tmp.texi
	texindex manual-tmp.??
	pdftex --interaction=nonstopmode manual-tmp.texi
	texindex manual-tmp.??
	pdftex --interaction=nonstopmode manual-tmp.texi
223
	mv manual-tmp.pdf $@
224 225 226
	rm -f manual-tmp.*
	touch $@

unknown's avatar
unknown committed
227 228 229 230
# Include images for the manual in the distribution
dist-hook:
	BD=`cd $(top_srcdir); pwd`; \
	if test ! -d $(distdir)/Flags; then mkdir -p $(distdir)/Flags; fi; \
unknown's avatar
unknown committed
231 232
	$(INSTALL_DATA) $(srcdir)/Flags/*.gif $(srcdir)/Flags/*.eps \
		$(srcdir)/Flags/*.txt $(distdir)/Flags;
unknown's avatar
unknown committed
233 234 235 236 237 238 239 240 241 242
	echo "PostScript and PDF versions suitable for printing" \
		> $(distdir)/manual.ps
	echo "are available from http://www.mysql.com/Manual/" \
		>> $(distdir)/manual.ps
	echo "or any mirror site" \
		>> $(distdir)/manual.ps

GT = $(srcdir)/Support/generate-text-files.pl

../INSTALL-SOURCE:	mysql.info $(GT)
unknown's avatar
unknown committed
243
	perl -w $(GT) mysql.info "Installing" "Tutorial" > $@
unknown's avatar
unknown committed
244 245 246 247 248 249 250 251 252 253 254 255 256

# We put the description for the binary installation here so that
# people who download source wont have to see it. It is moved up to
# the toplevel by the script that makes the binary tar files.
INSTALL-BINARY:	mysql.info $(GT)
	perl -w $(GT) mysql.info "Installing binary" "Installing source" > $@

../COPYING:		mysql.info $(GT)
	perl -w $(GT) mysql.info "GPL license" "LGPL license" > $@

../COPYING.LIB:		mysql.info $(GT)
	perl -w $(GT) mysql.info "LGPL license" "Function Index" > $@

257 258 259
../support-files/MacOSX/ReadMe.txt:	mysql.info $(GT)
	perl -w $(GT) mysql.info "Mac OS X installation" "Netware installation" > $@

260 261
# Don't update the files from bitkeeper
%::SCCS/s.%