summaryrefslogtreecommitdiff
path: root/Docs/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Docs/Makefile.am')
-rw-r--r--Docs/Makefile.am120
1 files changed, 120 insertions, 0 deletions
diff --git a/Docs/Makefile.am b/Docs/Makefile.am
new file mode 100644
index 00000000000..fbe0ca41619
--- /dev/null
+++ b/Docs/Makefile.am
@@ -0,0 +1,120 @@
+# Monty
+
+# 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
+# david@mysql.com
+
+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
+
+targets = manual.txt mysql.info manual.html manual.pdf
+
+BUILT_SOURCES = $(targets) manual_toc.html include.texi
+EXTRA_DIST = $(noinst_SCRIPTS) $(BUILT_SOURCES) mysqld_error.txt INSTALL-BINARY
+
+all: $(targets) txt_files
+
+txt_files: ../INSTALL-SOURCE ../COPYING ../COPYING.LIB \
+ ../MIRRORS INSTALL-BINARY
+
+# The PostScript version is so big that is not included in the
+# standard distribution. It is available for download from the home page.
+paper: manual_a4.ps manual_letter.ps
+
+#########################################################################
+
+# The Makefile contains the previous version so we can not use that
+include.texi: ../configure.in
+ echo -n "@c This file is autogenerated by the Makefile" > $@
+ echo -n "@set mysql_version " > $@
+ 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=;;' >> $@
+
+mysql.info: manual.texi include.texi
+ cd $(srcdir) && $(MAKEINFO) --no-split -I $(srcdir) $<
+
+manual.txt: manual.texi include.texi
+ cd $(srcdir) && \
+ $(MAKEINFO) -I $(srcdir) --no-headers --no-split --output $@ $<
+
+manual.html: manual.texi include.texi $(srcdir)/Support/texi2html
+ cd $(srcdir) && @PERL@ $(srcdir)/Support/texi2html $(TEXI2HTML_FLAGS) $<
+
+# Fix: add --output-comment with some interesting info?
+# Fix: @image worked with a older version of pdftex.
+# Comment: We need to run pdftex 2 times to get the cross references right.
+manual.pdf: manual.texi
+ cat manual.texi | sed -e 's|@image{[^}]*} *||g' > manual-tmp.texi; \
+ pdftex --interaction=nonstopmode '\input manual-tmp.texi'; \
+ pdftex --interaction=nonstopmode '\pdfcompresslevel=9' \
+ '\input manual-tmp.texi'; \
+ mv manual-tmp.pdf manual.pdf; \
+ rm -f manual-tmp.* ; \
+ touch $@
+
+# The texi2dvi gives a lot of harmless errors. Just ignore them unless
+# you want to help with the typesetting part.
+# This is the European papersize version
+manual_a4.ps: manual.texi include.texi
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
+ $(TEXI2DVI) --batch --texinfo '@afourpaper' $<
+ $(DVIPS) -t a4 manual.dvi -o $@
+ touch $@
+
+# This is the American papersize version
+manual_letter.ps: manual.texi include.texi
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
+ $(TEXI2DVI) --batch $<
+ $(DVIPS) -t letter manual.dvi -o $@
+ touch $@
+
+# 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; \
+ cp -p $(srcdir)/Flags/*.gif $(srcdir)/Flags/*.eps $(srcdir)/Flags/*.txt \
+ $(distdir)/Flags;
+ 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)
+ perl -w $(GT) mysql.info "Installing" "Compatibility" > $@
+
+# 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" > $@
+
+../MIRRORS: manual.texi $(srcdir)/Support/generate-mirror-listing.pl
+ perl -w $(srcdir)/Support/generate-mirror-listing.pl manual.texi > $@