summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraydon, Tracy <tracy.graydon@intel.com>2012-08-31 11:45:01 -0700
committerGraydon, Tracy <tracy.graydon@intel.com>2012-08-31 11:45:01 -0700
commit4a80e1a972678b7856b404c9d270c3494372cac1 (patch)
tree46351e62753d6269a4f500bb0cdc5d8c8dc21a02
downloaddocbook-utils-1.0.tar.gz
docbook-utils-1.0.tar.bz2
docbook-utils-1.0.zip
-rw-r--r--AUTHORS6
-rw-r--r--COPYING340
-rw-r--r--ChangeLog432
-rw-r--r--INSTALL229
-rw-r--r--Makefile.am7
-rw-r--r--Makefile.in547
-rw-r--r--NEWS31
-rw-r--r--README106
-rw-r--r--TODO129
-rw-r--r--aclocal.m4542
-rw-r--r--backends/Makefile.am5
-rw-r--r--backends/Makefile.in286
-rw-r--r--backends/dvi36
-rw-r--r--backends/html11
-rw-r--r--backends/man.in27
-rw-r--r--backends/pdf31
-rw-r--r--backends/ps49
-rw-r--r--backends/rtf11
-rw-r--r--backends/tex11
-rw-r--r--backends/texi.in11
-rw-r--r--backends/txt38
-rw-r--r--bin/Makefile.am7
-rw-r--r--bin/Makefile.in289
-rwxr-xr-xbin/docbook2dvi2
-rwxr-xr-xbin/docbook2html2
-rwxr-xr-xbin/docbook2man2
-rwxr-xr-xbin/docbook2pdf2
-rwxr-xr-xbin/docbook2ps2
-rwxr-xr-xbin/docbook2rtf2
-rwxr-xr-xbin/docbook2tex2
-rwxr-xr-xbin/docbook2texi2
-rwxr-xr-xbin/docbook2txt2
-rw-r--r--bin/jw.in442
-rw-r--r--bin/sgmldiff.in449
-rwxr-xr-xconfigure2630
-rw-r--r--configure.in48
-rw-r--r--doc/HTML/Makefile.am30
-rw-r--r--doc/HTML/Makefile.in306
-rw-r--r--doc/Makefile.am14
-rw-r--r--doc/Makefile.in409
-rw-r--r--doc/docbook-utils.sgml605
-rw-r--r--doc/man/Makefile.am16
-rw-r--r--doc/man/Makefile.in365
-rw-r--r--doc/man/backend-spec.764
-rw-r--r--doc/man/docbook2man-spec.pl.1100
-rw-r--r--doc/man/docbook2texi-spec.pl.191
-rw-r--r--doc/man/frontend-spec.7103
-rw-r--r--doc/man/jw.1377
-rw-r--r--doc/man/sgmldiff.1123
-rw-r--r--doc/refentry/Makefile.am2
-rw-r--r--doc/refentry/Makefile.in257
-rw-r--r--doc/refentry/backend-spec.sgml162
-rw-r--r--doc/refentry/docbook2man-spec.pl.sgml169
-rw-r--r--doc/refentry/docbook2texi-spec.pl.sgml171
-rw-r--r--doc/refentry/frontend-spec.sgml196
-rw-r--r--doc/refentry/jw.sgml643
-rw-r--r--doc/refentry/sgmldiff.sgml264
-rw-r--r--doc/version.in1
-rw-r--r--docbook-utils.dsl115
-rw-r--r--docbook-utils.spec60
-rw-r--r--docbook-utils.spec.in60
-rw-r--r--frontends/Makefile.am3
-rw-r--r--frontends/Makefile.in283
-rw-r--r--frontends/docbook.in52
-rw-r--r--helpers/Makefile.am5
-rw-r--r--helpers/Makefile.in281
-rw-r--r--helpers/docbook2man-spec.pl1248
-rw-r--r--helpers/docbook2texi-spec.pl848
-rwxr-xr-xinstall-sh310
-rwxr-xr-xmissing360
-rw-r--r--packaging/db2html34
-rw-r--r--packaging/docbook-utils-2ndspaces.patch260
-rw-r--r--packaging/docbook-utils-grepnocolors.patch15
-rw-r--r--packaging/docbook-utils-rtfmanpage.patch15
-rw-r--r--packaging/docbook-utils-sgmlinclude.patch24
-rw-r--r--packaging/docbook-utils-spaces.patch32
-rw-r--r--packaging/docbook-utils-w3mtxtconvert.patch12
-rw-r--r--packaging/docbook-utils.changes2
-rw-r--r--packaging/docbook-utils.spec133
-rw-r--r--packaging/docbook2man-spec.pl1551
-rw-r--r--packaging/gdp-both.dsl1061
81 files changed, 18000 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..a416a89
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,6 @@
+Eric Bischoff <e.bischoff@noos.fr>
+Mark Galassi <rosalia@galassi.org>
+Jochem Huhmann <joh@revier.com>
+Steve Cheng <steve@ggi-project.org>
+Frederik Fouvry <fouvry@sfs.nphil.uni-tuebingen.de>
+Tim Waugh <twaugh@redhat.com>
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..d60c31a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..3a95da2
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,432 @@
+2004-02-11 Tim Waugh <twaugh@redhat.com>
+
+ * configure.in: Version 0.6.14 (stable).
+
+2004-02-11 Tim Waugh <twaugh@redhat.com>
+
+ * backends/txt: Use w3m as last resort.
+
+2003-06-10 Tim Waugh <twaugh@redhat.com>
+
+ * helpers/docbook2man-spec.pl: Escape dots and single quotes in
+ column 1 (Red Hat bugzilla bug #97087).
+
+2003-04-30 Tim Waugh <twaugh@redhat.com>
+
+ * bin/jw.in: Use head(1) in a POSIX-compliant manner.
+
+2003-03-17 Tim Waugh <twaugh@redhat.com>
+
+ * configure.in: Version 0.6.13 (stable).
+
+2003-03-17 Tim Waugh <twaugh@redhat.com>
+
+ * backends/ps: Pass -R to dvips.
+
+ * backends/ps: Specify paper type when using dvips.
+
+ * backends/pdf: Use rm -f when tidying up.
+
+ * bin/jw.in: The DSSSL parameter is paper-type, not paper-size.
+
+2003-02-11 Tim Waugh <twaugh@redhat.com>
+
+ * doc/refentry/sgmldiff.sgml: Fix typos (pointed out by Alain
+ PORTAL).
+
+2003-01-13 Tim Waugh <twaugh@redhat.com>
+
+ * backends/ps, backends/dvi: Use .tmp not .out for temporary
+ stuff (debian bug 176204).
+
+2002-11-02 Tim Waugh <twaugh@redhat.com>
+
+ * frontends/docbook.in: Fix stupid typo spotted by Masanori
+ Kobayasi.
+
+2002-10-21 Tim Waugh <twaugh@redhat.com>
+
+ * doc/refentry/jw.sgml: Fix URL.
+ * doc/refentry/sgmldiff.sgml: Likewise.
+
+2002-10-14 Tim Waugh <twaugh@redhat.com>
+
+ * helpers/docbook2man-spec.pl: Translatable 'name' heading
+ (Philippe Batailler).
+
+ * helpers/docbook2man-spec.pl: Use 'lang' attribute in output
+ filename (Denis Barbier).
+
+2002-10-13 Tim Waugh <twaugh@redhat.com>
+
+ * configure.in: Version 0.6.12 (stable).
+
+2002-08-05 Tim Waugh <twaugh@redhat.com>
+
+ * backends/texi.in: Send output to file like the other backends do.
+
+2002-07-28 Tim Waugh <twaugh@redhat.com>
+
+ * backends/man.in: Report errors.
+
+ * helpers/docbook2man-spec.pl: Move handlers for &minus; and &copy;
+ to the right place. Add handlers for &nbsp; and &thinsp;
+ (Philippe Batailler).
+
+2002-06-27 Tim Waugh <twaugh@redhat.com>
+
+ * docbook-utils.spec: Renamed..
+ * docbook-utils.spec.in: ..to this. Use @VERSION@.
+ * configure.in: Generate docbook-utils.spec.
+
+2002-06-27 Tim Waugh <twaugh@redhat.com>
+
+ * configure.in, docbook-utils.spec: Version 0.6.11 (stable).
+
+2002-06-27 Tim Waugh <twaugh@redhat.com>
+
+ * doc/man/Makefile.am: Use man1_MANS instead of man1_DATA, and the
+ same for man7.
+
+ * bin/jw.in, frontends/docbook.in: Apply patch from Mikhail Zebaluev
+ which implements a cleaner way to set paper size based on locale.
+
+ * bin/jw.in, frontends/docbook.in: Apply patch from Mikhail Zabaluev
+ which plugs in an SGML normalizer to obtain the real doctype
+ declaration for cases when other <!DOCTYPE declarations are snuck
+ inside comments.
+
+ * backends/txt: Use -nolist and -width=72 when using lynx.
+
+2002-05-16 Tim Waugh <twaugh@redhat.com>
+
+ * helpers/docbook2man-spec.pl: Handle glosslists.
+
+ * helpers/docbook2man-spec.pl: Handle &copy;
+
+2002-05-01 Tim Waugh <twaugh@redhat.com>
+
+ * configure.in: Version 0.6.10 (stable).
+
+2002-05-01 Tim Waugh <twaugh@redhat.com>
+
+ * docbook-utils.dsl: Turn off %use-id-as-filename%.
+
+2002-04-26 Tim Waugh <twaugh@redhat.com>
+
+ * backends/man.in: Re-run docbook2man-spec.pl if references need
+ resolving.
+
+2002-04-22 Tim Waugh <twaugh@redhat.com>
+
+ * doc/HTML/Makefile.am, doc/man/Makefile.am: Fixes for
+ top_srcdir != top_builddir.
+
+ * doc/version.in: New file.
+ * doc/docbook-utils.sgml: Source version number from doc/version.
+ * doc/refentry/jw.sgml: Use SGML entity rather than '@VERSION@'.
+ * configure.in: Create doc/version from doc/version.in. Don't
+ look for doc/HTML/jw.html.in or doc/man/jw.1.in any more.
+ * doc/HTML/Makefile.am: Add rule to create HTML output directly.
+ (Moved from Makefile.cvs).
+ * doc/man/Makefile.am: Add rule to create man output directly (moved
+ from Makefile.cvs).
+ * Makefile.cvs: Removed.
+ * bootstrap: New file.
+
+2002-04-19 Tim Waugh <twaugh@redhat.com>
+
+ * frontends/Makefile.am: No need for EXTRA_DIST here.
+
+ * Makefile.cvs: Don't remove CVS directories at all.
+
+2002-04-18 Tim Waugh <twaugh@redhat.com>
+
+ * backends/Makefile.am: Don't ship texi and man since they are
+ generated during configure.
+
+2002-04-18 Tim Waugh <twaugh@redhat.com>
+
+ * Makefile.am: Ship the spec file.
+
+ * doc/man/Makefile.am: Explicitly list man pages. Also ship them.
+ Except for jw.1 which is generated.
+
+ * Makefile.cvs: Copy in the autotool helper files rather than
+ distribute symlinks.
+
+ * Makefile.cvs: Use /etc/sgml/catalog rather than a more specific
+ catalog, in case this system doesn't split them out like we think.
+
+ * Makefile.cvs: It's okay for there to be no CVS directories to
+ remove.
+
+ * doc/refentry/jw.sgml: This file is part of a DocBook V3.1 document,
+ so remove the v4.1-ism and DOCTYPE declaration I added previously.
+
+ * AUTHORS: Add myself.
+
+2002-04-15 Tim Waugh <twaugh@redhat.com>
+
+ * frontends/docbook.in: LC_PAPER-based stylesheet flavour selection
+ (if A4 paper is to be used, look for docbook-utils-a4.dsl).
+
+ * backends/dvi, backends/pdf, backends/ps: Set TEXINPUTS to
+ include the source file's directory.
+
+ * frontends/docbook.in: Handle symlinks with extra version info.
+
+ * frontends/docbook.in: Fix shell quoting.
+
+ * bin/jw.in: More robust XML/SGML detection.
+
+ * bin/jw.in: Add -V option.
+ * doc/refentry/jw.sgml: Document it.
+
+ * helpers/docbook2man-spec.pl: Better orderedlist output.
+
+ * bin/jw.in: Quoting. Fixes --help output (for some reason).
+
+ * helpers/docbook2man-spec.pl: Handle some sdata (only 'minus' at
+ the moment).
+
+ * doc/refentry/jw.sgml: Various corrections and additions.
+ * helpers/docbook2man-spec.pl: Improvements to man page generation.
+
+ * bin/jw.in: Fix -o behaviour.
+
+ * bin/jw.in: Select the correct stylesheet for plain text output.
+ * backends/txt: Use links if lynx is not present.
+
+ * bin/jw.in: When delivering HTML with no-chunks, send output to
+ file rather than mingling it with stdout.
+
+ * backends/pdf: Redirect output to a file that tex doesn't use.
+ This fixes TOC-generation.
+
+ * bin/docbook2dvi, bin/docbook2html, bin/docbook2man, bin/docbook2pdf,
+ bin/docbook2ps, bin/docbook2rtf, bin/docbook2tex, bin/docbook2texi,
+ bin/docbook2txt: Better argument handling.
+
+ * bin/jw.in: Allow for custom backends.
+
+ * bin/jw.in: Handle filenames with multiple '.' characters.
+
+2001-05-23 Eric Bischoff <eric@caldera.de>
+
+ * doc/Makefile.am: small change - for the first time it works both on
+ Caldera and RedHat - kind of hacky though
+
+ * switched to version 0.6.9
+
+2001-04-27 Eric Bischoff <eric@caldera.de>
+
+ * Makefile.cvs: "automake -a" flag is better now Mark removed install-sh
+ and friends
+
+ * Reverting a lot of Makefile.am changes. This stuff is driving me crazy.
+
+ * switched to version 0.6.8
+
+2001-04-21 Mark Galassi <rosalia@galassi.org>
+
+ * starting to prepare a clean version
+
+2001-03-23 Eric Bischoff <eric@caldera.de>
+
+ * bin/sgmldiff.in: put location of "perl" and "nsgmls" under autoconf
+
+ * frontends/docbook.in: allow more complicated DTD numbers like 4.1.2
+
+ * .../Makefile.am: fixed (again!) problems with autoconf :-((
+
+ * switched to version 0.6.7
+
+2001-01-30 Eric Bischoff <eric@caldera.de>
+
+ * Fixed autoconf support on popular demand
+
+ * switched to version 0.6.6
+
+2001-01-19 Eric Bischoff <eric@caldera.de>
+
+ * Makefile.cvs, configure.in: put doc/man/jw.1 under autoconf
+
+ * switched to version 0.6.5
+
+2001-01-19 Eric Bischoff <eric@caldera.de>
+
+ * Makefile.cvs, configure.in: put doc/HTML/jw.html under autoconf
+
+ * doc/refentry/jw.sgml: added explanations about "--dsl default",
+ "--dsl none", -w and -e options
+
+ * switched to version 0.6.4
+
+2001-01-18 Eric Bischoff <eric@caldera.de>
+
+ * bin/jw.in: added -w and -e arguments for controlling warnings
+ and errors
+
+ * switched to version 0.6.3
+
+2001-01-12 Eric Bischoff <eric@caldera.de>
+
+ * Makefile.am: fixed EXTRA_DIST variable
+
+ * configure.in: fixed problem appearing when buildrooting
+
+ * switched to version 0.6.2
+
+2000-12-06 Eric Bischoff <eric@caldera.de>
+
+ * bin/jw.in: added explanations about --dcl option
+
+ * switched to version 0.6.1
+
+2000-11-09 Eric Bischoff <eric@caldera.de>
+
+ * bin/jw.in, frontends/docbook, doc/*: added support for
+ XML.
+
+ * switched to version 0.6
+
+2000-11-09 Eric Bischoff <eric@caldera.de>
+
+ * docbook-utils.dsl: added some magic so the mediaobject
+ uses EPS when printing and other formats when putting online.
+ I'm not sure this choice is correct for non-TeX printing
+ formats like RTF or PDF though - might need be fixed later.
+
+ * switched to version 0.5.7
+
+2000-10-27 Eric Bischoff <eric@caldera.de>
+
+ * doc/Makefile.am: RPM 4.0 now refuses buildrooted absolute
+ symbolic links. Let's please him.
+
+ * switched to version 0.5.6
+
+2000-09-23 Eric Bischoff <eric@caldera.de>
+
+ * frontends/docbook: the first version number of the DTD
+ is the one to use to determine the catalog - this
+ allows variants with their own version number
+ (see http://www.docbook.org/tdg/html/ch05.html#S-NOTDOCBOOK)
+
+ * switched to version 0.5.5
+
+2000-09-12 Eric Bischoff <eric@caldera.de>
+
+ * doc/HTML/Makefile.am: path to HTML pages is not hardcoded
+ anymore but determined through configure.
+
+ * switched to version 0.5.4
+
+2000-09-12 Eric Bischoff <eric@caldera.de>
+
+ * doc/man/Makefile.am: path to man pages is not hardcoded
+ anymore but determined through configure.
+
+ * switched to version 0.5.3
+
+2000-08-15 Eric Bischoff <eric@caldera.de>
+
+ * doc: removed the conflict between docbook2man and
+ docbook2man-spec.pl, same for docbook2texi and
+ docbook2texi-spec.pl.
+
+2000-08-12 Eric Bischoff <eric@caldera.de>
+
+ * docbook-utils.dsl: the output directory must not be
+ defined in the style sheet. The shell scripts do not know
+ what's happening in the style sheets and therefore are
+ unable to create this directory if it did not exist previously.
+
+ * switched to version 0.5.2
+
+2000-08-10 Eric Bischoff <eric@caldera.de>
+
+ * backends/pdf: unconditionally re-run pdfjadetex
+ so very simple files get converted correctly as well
+
+ * switched to version 0.5.1
+
+2000-08-07 Eric Bischoff <eric@caldera.de>
+
+ * Makefile.cvs: HTML and man pages must be created at
+ tarball generation time
+
+ * doc/Makefile.am: readded symbolic links generation at install
+ time for docbook2* man pages
+
+ * switched to version 0.5
+
+2000-08-04 Eric Bischoff <eric@caldera.de>
+
+ * docbook-utils.dsl: commented out eurocentric reference to
+ A4 paper
+
+ * docbook-utils.spec: removed because a SPEC file should
+ reside outside of the package's sources
+
+ * ABOUT: Mark saved it as "README". Removed it to avoid
+ having a duplicate file.
+
+ * Makefile.am: ABOUT => README as well
+
+ * AUTHORS: added scripts and documentation authors
+
+ * LICENCE: renamed as COPYING to follow GNU conventions
+
+ * doc/Makefile.am: pre-built man and HTML pages again
+
+ * bin/: removed db2* and docbook-build scripts to have a
+ clearer design,
+ put sgmldiff under autoconf
+
+ * bin/jw now takes docbook-utils.dsl as a default stylesheet, but
+ it is still possible to have alternate stylesheets or to use
+ Norm's style
+
+ * backends/: put man and texi under autoconf as well
+
+ * frontends/: put docbook under autoconf
+
+2000-08-03 Mark Galassi <rosalia@galassi.org>
+
+ * docbook-utils.spec (Prereq): took out the prereq for perl-sgmls,
+ since perl-SGMLSpm has replaced that.
+ (Release): upped the release number, since I changed the .spec
+ file.
+
+ * frontends/docbook: fixed a problem where the user might have had
+ a <!docbook instead of <!DOCBOOK at the beginning. I added -i to
+ the "grep" that looks for this string.
+
+ * doc/Makefile.am: improved the rendering by adding the -dsl
+ docbook-utils.dsl option.
+
+ * bin/docbook2*: new names for the programs.
+
+ * bin/Makefile.am (primitive_scripts): added the docbook2html (and
+ so forth) names, as well as the db2html (and so forth) ones.
+ These will eventually be the names of the tools.
+
+ * docbook-utils.spec: upped the release number and added some
+ prerequisites.
+
+2000-07-23 Mark Galassi <rosalia@galassi.org>
+
+ * docbook-utils.spec, configure.in: changed version to 0.4
+
+2000-07-21 Mark Galassi <rosalia@galassi.org>
+
+ * docbook-utils.spec: updated spec file to work with the new
+ automake-based approach. You can now use
+ rpm -ta docbook-utils-VERSION.tar.gz
+ to build the RPM.
+
+ * doc/Makefile.am (install-data-local): took out .gif and .png
+ installation for now.
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..54caf7c
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,229 @@
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..67e03bb
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,7 @@
+SUBDIRS = backends bin doc frontends helpers
+
+sgmldudir = $(prefix)/share/sgml/docbook/utils-@VERSION@
+sgmldu_DATA = docbook-utils.dsl
+
+EXTRA_DIST = AUTHORS README COPYING INSTALL NEWS ChangeLog TODO \
+ $(sgmldu_DATA) docbook-utils.spec
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..363d7c3
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,547 @@
+# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/docbook-utils.spec.in \
+ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+ TODO install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(mkdir_p)
+CONFIG_CLEAN_FILES = docbook-utils.spec
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+am__installdirs = $(DESTDIR)$(sgmldudir)
+sgmlduDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(sgmldu_DATA)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+jade_bindir = @jade_bindir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+perl_bindir = @perl_bindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = backends bin doc frontends helpers
+sgmldudir = $(prefix)/share/sgml/docbook/utils-@VERSION@
+sgmldu_DATA = docbook-utils.dsl
+EXTRA_DIST = AUTHORS README COPYING INSTALL NEWS ChangeLog TODO \
+ $(sgmldu_DATA) docbook-utils.spec
+
+all: all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+docbook-utils.spec: $(top_builddir)/config.status $(srcdir)/docbook-utils.spec.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+uninstall-info-am:
+install-sgmlduDATA: $(sgmldu_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkdir_p) $(DESTDIR)$(sgmldudir)
+ @list='$(sgmldu_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(sgmlduDATA_INSTALL) $$d$$p $(DESTDIR)$(sgmldudir)/$$f"; \
+ $(sgmlduDATA_INSTALL) $$d$$p $(DESTDIR)$(sgmldudir)/$$f; \
+ done
+
+uninstall-sgmlduDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sgmldu_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(sgmldudir)/$$f"; \
+ rm -f $(DESTDIR)$(sgmldudir)/$$f; \
+ done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if (etags --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ else \
+ include_option=--include; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ $(mkdir_p) $(distdir)/. $(distdir)/backends $(distdir)/bin $(distdir)/doc $(distdir)/frontends
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || mkdir "$(distdir)/$$subdir" \
+ || exit 1; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="../$(top_distdir)" \
+ distdir="../$(distdir)/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && $(mkdir_p) "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkdir_p) $(DESTDIR)$(sgmldudir)
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-sgmlduDATA
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-sgmlduDATA
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-recursive ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
+ dist-tarZ dist-zip distcheck distclean distclean-generic \
+ distclean-recursive distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-sgmlduDATA install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am uninstall-sgmlduDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..796bd71
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,31 @@
+docbook-utils news
+------------------
+
+0.6.14 (stable)
+
+ A portability bug in jw was corrected and a small bug in man page
+ output was fixed. The docbook2txt utility now uses w3m if no other
+ text-mode browser is available.
+
+0.6.13 (stable)
+
+ Several small bugs were fixed.
+
+0.6.12 (stable)
+
+ Minor bugfixes.
+
+0.6.11 (stable)
+
+ Some small enhancements were made.
+
+0.6.10 (stable)
+
+ Several bugs were fixed.
+
+Version 0.6 * added support for XML
+Version 0.5 * there is a default stylesheet again
+Version 0.4 * introduced automake/autoconf support so we can make tarballs
+Version 0.3 * intelligent guessing of the centralized catalog to use
+Version 0.2 * changed file locations to make them conformant with FHS
+Version 0.1 * major rewriting of Mark Galassi's scripts
diff --git a/README b/README
new file mode 100644
index 0000000..b85e8f6
--- /dev/null
+++ b/README
@@ -0,0 +1,106 @@
+Eric Bischoff
+ebisch@cybercable.tm.fr July 18, 2000
+
+Introduction
+------------
+
+The docbook-utils is a set of a few small programs intended to ease
+everyday's use of technical documentation software and more generally
+use of SGML and XML. They are released under the GPL licence.
+
+Tasks they currently accomplish are:
+ - jw: convert SGML files to other formats (HTML, RTF, Postscript, PDF)
+ - sgmldiff: detect the differerences in markup between two SGML files
+
+Tasks they might accomplish in the future are:
+ - convert legacy formats (linuxdoc, *roff, texinfo, ...) into docbook
+ - provide a nice interface to collateindex.pl for easy index generation
+ - etc...
+
+The scripts assume that on the user's system the following is installed:
+ - James Clark's DSSSL engine, Jade, and associated utilities like nsgmls.
+ - a shell and a perl interpreters
+ - Sebastian Rahtz's Jadetex set of TeX macros for Jade
+ - ISO's SGML entities and other common files
+ - OASIS consortium's DocBook DTD
+ - Norman Walsh's modular DocBook stylesheets
+ - The SGMLS Perl module
+
+
+Compatibility
+-------------
+
+The docbook-utils scripts are inspired by the former scripts from the
+DocBook-Tools distribution (hosted by Cygnus sourceware project). The
+transition from the former docbook-tools can be ensured through the use
+of wrapper scripts.
+
+The following example of a wrapper script is for the KDE project, and can
+be easily adapted to meet other needs.
+ #!/bin/sh
+ if [ -n "`jw --version 2>/dev/null | grep '^docbook-utils'`" ]
+ then # docbook-utils
+ jw -c /usr/lib/sgml/kde/kde.cat \
+ -d /usr/lib/sgml/kde/stylesheets/kde.dsl#html \
+ -o db2html-dir \
+ index.docbook
+ else # cygnus
+ db2html -d /usr/lib/sgml/stylesheets/kde.dsl \
+ index.docbook
+ fi
+
+Thanks to the standardization effort that has been lead for LSB, we can
+hope that those tools are becoming more and more compatible with the
+SGML-Tools version 2, or with the packaging of SGML and DocBook done by
+many Linux distributions. Any feedback in this area is welcome.
+
+The docbook-utils are now able to run on non-lsb platforms by means of
+the same configuration files and scripts than the ones used by
+SGML-tools.
+
+Design
+------
+
+There is a number of deliberate design choices behind the docbook-utils:
+
+- They are maintained
+
+It means that they should evolve in the future, with the help of the feedback
+from their users. It also means that some FTP space and a Web page will be
+dedicated to them. There is already a mailing list available:
+ docbook-utils@bazar.conectiva.com.br
+
+- They are distributed seperately from the other packages
+
+They will be able to work from a package of their own, thus easing distribution
+packager's work and making the whole design much clearer to anyone.
+
+- Full support for alternate stylesheets
+
+Anyone can write new customization stylesheets, for HTML, printout, or
+both. But it is not assumed anymore that there is such a customization
+stylesheet. The DocBook stylesheets can be used "out of the box".The
+old db2ps problems with alternate stylesheets are fixed as well.
+
+- HTML can be generated in any destination directory
+
+HTML will be generated by jw in the current directory as a default, so
+there will be no more conflict if the customization stylesheets declare
+another target directory. This setting can be overriden through a new
+-o command-line output option.
+
+- GNUish syntax for the command-line options
+
+All options will be both in -s short or --long form. GNU style also implies
+new --help and --version options.
+
+- Any extension for DocBook files is supported
+
+There is no more restriction to ".sgm" or ".sgml". Someone can use
+".dbk" or ".docbook" for instance.
+
+- Modularity:
+
+jw isolates the handling of the output format and of the input format
+by means of backend and frontend files. A new backend or a new frontend
+are very easy to write.
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..9397d3b
--- /dev/null
+++ b/TODO
@@ -0,0 +1,129 @@
+ PACKAGING
+
+- Directories should be owned
+
+- Use macros to ease porting
+
+- install-catalog has problems with updates because the post-install
+ is called before the post-uninstall
+
+
+ PRINTING
+
+- Support hyperlinks in acroread
+
+Hyperlinks are rendered nicely when converted to PDF, but aren't
+dynamical in acroread (they are just underlined text)
+
+- Support Asian languages on printing
+
+Already did some tries with hlatex (Korean)
+
+- Italian does not seem to work when printing
+
+Solved with the new packaging of jadetex?
+
+- Tables aren't rendered nicely when printing
+
+The second line of text and the following ones have no margin
+
+- Add a switch to control TeX verbosity
+
+
+ BACKENDS
+
+- Do a new text backend based on html2text instead of lynx
+
+Merge Jochem's stuff with the current text backend. The choice of
+the method should be passed through the command line or through an
+configuration file.
+
+- Do a FOT backend, MIF backend and a palm backend
+
+Should be easy. Use -V and -t variables.
+
+- Backend options
+
+Provide an -e option in jw to pass directly a string to the backend
+through the SGML_EXTRA_OPTS variable. The html backend then can pass
+it to Jade through the -V option.
+
+- Configuration file for backends
+
+Pass a variable holding the name of the initialization file to the
+backend.
+
+(is this really needed?)
+
+
+ JW
+
+- Configuration variables for jw
+
+Simpler and more powerful to use "aliases" ?
+
+Name: SGML_BACKEND_DIR
+ Content: Directory containing the backends.
+ Default: $SGML_BASE_DIR/backends/
+ Example: /usr/share/sgml/docbook/docbook-utils-0.2/backends/
+ Notes: This directory should contain nothing else than backends.
+ This way a program can tell the user about available
+ backends by just doing "ls $SGML_BACKEND_DIR" or similar.
+
+Name: SGML_BACKEND
+ Content: The name of the default backend
+ Default: html
+(txt would be more neutral, but then be painful to the docbook users)
+ Example: ps
+
+Name: SGML_FRONTEND_DIR
+ Content: Directory containing the frontends.
+ Default: $SGML_BASE_DIR/frontends/
+ Example: /usr/share/sgml/docbook/docbook-utils-0.2/frontends/
+ Notes: This directory should contain nothing else than frontends.
+ This way a program can tell the user about available
+ frontends by just doing "ls $SGML_FRONTEND_DIR" or similar.
+
+Name: SGML_FRONTEND
+ Content: The name of the default frontend
+ Default: docbook
+(sgml would be more neutral, but then be painful to the docbook users)
+ Example: tei
+ Notes: At the time of determining the frontend, the frontend is not
+ known, so it is /etc/sgml/sgml.conf or $HOME/.sgml.conf
+ that is used as a configuration file.
+
+Name: SGML_HELPERS_DIR
+ Content: The name of the directory where reside the scripts that
+ can be called by the backends and the frontends
+ Default: $SGML_BASE_DIR/helpers/
+ Example: /usr/share/sgml/docbook/docbook-utils-0.2/helpers/
+
+Name: SGML_OUTPUT_DIR
+ Content: The directory to write the converted output files to.
+ Default: .
+ Example: /tmp
+ Note: This is not backend-specific. If for example the html
+ backend wants to put the resulting files in an directory named
+ HTML, it can override or refine this setting.
+
+Name: SGML_FILE
+ Content: The filename of the SGML source-file to convert.
+ Default: index.sgml
+ Example: index.docbook
+
+Name: SGML_JADE
+ Content: The flavour of jade parser to execute
+ Default: jade
+ Example: openjade
+ Notes: This variable is unused if using another parser
+
+Name: SGML_STYLESHEET
+ Content: The stylesheet to use
+ Default: (unset)
+ Example: /usr/share/sgml/docbook/kde-0.1/stylesheet/kde.dsl#html
+
+An "alias" on the contrary would concentrate all the options passed on the command
+line into a single symbol. Example:
+ htmlkde <=> -c /usr/share/sgml/docbook/kde-0.1/catalog
+ -d /usr/share/sgml/docbook/kde-0.1/kde.dsl#html
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..17eb7dd
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,542 @@
+# generated automatically by aclocal 1.8.2 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# -*- Autoconf -*-
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Generated from amversion.in; do not edit by hand.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.8.2])])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 11
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# -*- Autoconf -*-
+
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p -- . 2>/dev/null; then
+ # Keeping the `.' argument allows $(mkdir_p) to be used without
+ # argument. Indeed, we sometimes output rules like
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined.
+ # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
+ # expensive solution, as it forces Make to start a sub-shell.)
+ mkdir_p='mkdir -p -- .'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
diff --git a/backends/Makefile.am b/backends/Makefile.am
new file mode 100644
index 0000000..7863074
--- /dev/null
+++ b/backends/Makefile.am
@@ -0,0 +1,5 @@
+sgmldudir = $(prefix)/share/sgml/docbook/utils-@VERSION@
+sgmldubedir = $(sgmldudir)/backends
+sgmldube_DATA = dvi html man pdf ps rtf tex texi txt
+
+EXTRA_DIST = dvi html man.in pdf ps rtf tex texi.in txt
diff --git a/backends/Makefile.in b/backends/Makefile.in
new file mode 100644
index 0000000..35bea93
--- /dev/null
+++ b/backends/Makefile.in
@@ -0,0 +1,286 @@
+# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = backends
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/man.in $(srcdir)/texi.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(mkdir_p)
+CONFIG_CLEAN_FILES = man texi
+SOURCES =
+DIST_SOURCES =
+am__installdirs = $(DESTDIR)$(sgmldubedir)
+sgmldubeDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(sgmldube_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+jade_bindir = @jade_bindir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+perl_bindir = @perl_bindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+sgmldudir = $(prefix)/share/sgml/docbook/utils-@VERSION@
+sgmldubedir = $(sgmldudir)/backends
+sgmldube_DATA = dvi html man pdf ps rtf tex texi txt
+EXTRA_DIST = dvi html man.in pdf ps rtf tex texi.in txt
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu backends/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu backends/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+man: $(top_builddir)/config.status $(srcdir)/man.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+texi: $(top_builddir)/config.status $(srcdir)/texi.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+uninstall-info-am:
+install-sgmldubeDATA: $(sgmldube_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkdir_p) $(DESTDIR)$(sgmldubedir)
+ @list='$(sgmldube_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(sgmldubeDATA_INSTALL) $$d$$p $(DESTDIR)$(sgmldubedir)/$$f"; \
+ $(sgmldubeDATA_INSTALL) $$d$$p $(DESTDIR)$(sgmldubedir)/$$f; \
+ done
+
+uninstall-sgmldubeDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sgmldube_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(sgmldubedir)/$$f"; \
+ rm -f $(DESTDIR)$(sgmldubedir)/$$f; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ $(mkdir_p) $(DESTDIR)$(sgmldubedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-sgmldubeDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-sgmldubeDATA
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-sgmldubeDATA install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
+ uninstall-sgmldubeDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/backends/dvi b/backends/dvi
new file mode 100644
index 0000000..ace0cf8
--- /dev/null
+++ b/backends/dvi
@@ -0,0 +1,36 @@
+# Backend to convert something into DVI
+# Send any comments to Eric Bischoff <eric@caldera.de>
+# This program is under GPL license. See LICENSE file for details.
+
+TEXINPUTS="$(dirname "${SGML_FILE}"):${TEXINPUTS}"
+export TEXINPUTS
+
+# Convert to TeX
+$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
+if [ $? -ne 0 ]
+then exit 1
+fi
+
+# Convert from TeX to DVI
+jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
+if [ $? -ne 0 ]
+then
+ cat ${SGML_FILE_NAME}.tmp
+ rm ${SGML_FILE_NAME}.tmp
+ rm ${SGML_FILE_NAME}.tex
+ exit 2
+fi
+rm ${SGML_FILE_NAME}.tmp
+
+# If there are unresolved references, re-run jadetex, twice
+if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
+then
+ jadetex ${SGML_FILE_NAME}.tex >/dev/null
+ jadetex ${SGML_FILE_NAME}.tex >/dev/null
+fi
+rm ${SGML_FILE_NAME}.log
+rm ${SGML_FILE_NAME}.aux
+rm ${SGML_FILE_NAME}.tex
+rm ${SGML_FILE_NAME}.out
+
+exit 0
diff --git a/backends/html b/backends/html
new file mode 100644
index 0000000..ee301f6
--- /dev/null
+++ b/backends/html
@@ -0,0 +1,11 @@
+# Backend to convert something into HTML
+# Send any comments to Eric Bischoff <eric@caldera.de>
+# This program is under GPL license. See LICENSE file for details.
+
+# Convert to HTML
+$SGML_JADE -t sgml $SGML_ARGUMENTS
+if [ $? -ne 0 ]
+then exit 1
+fi
+
+exit 0
diff --git a/backends/man.in b/backends/man.in
new file mode 100644
index 0000000..e95d3c6
--- /dev/null
+++ b/backends/man.in
@@ -0,0 +1,27 @@
+# Backend to convert a DocBook file into a man page
+# Send any comments to Jochem Huhmann <joh@revier.com>
+# This program is under GPL license. See LICENSE file for details.
+
+# Convert to *roff
+HELPER=$SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2man-spec.pl
+TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \
+ { echo >&2 "man backend: could not create secure temporary directory"; exit 1;}
+trap 'rm -rf "${TMPDIR}"' EXIT
+nsgmls $SGML_FILE > "${TMPDIR}/nsgmls.tmp"
+sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs"
+if [ $? -ne 0 ]
+then
+ cat "${TMPDIR}/errs"
+ exit 1
+fi
+
+if grep unresolved "${TMPDIR}/errs" >/dev/null 2>&1
+then
+ echo "Resolving references.."
+ sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp"
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+fi
+
+exit 0
diff --git a/backends/pdf b/backends/pdf
new file mode 100644
index 0000000..d292f46
--- /dev/null
+++ b/backends/pdf
@@ -0,0 +1,31 @@
+# Backend to convert something into PDF
+# Send any comments to Eric Bischoff <eric@caldera.de>
+# This program is under GPL license. See LICENSE file for details.
+
+TEXINPUTS="$(dirname "${SGML_FILE}"):${TEXINPUTS}"
+export TEXINPUTS
+
+# Convert to TeX
+$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
+if [ $? -ne 0 ]
+then exit 1
+fi
+
+# Convert from TeX to PDF
+pdfjadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
+if [ $? -ne 0 ]
+then
+ cat ${SGML_FILE_NAME}.tmp
+ rm ${SGML_FILE_NAME}.tmp
+ rm ${SGML_FILE_NAME}.tex
+ exit 2
+fi
+rm ${SGML_FILE_NAME}.tmp
+
+# Unconditionally re-run pdfjadetex, twice
+pdfjadetex ${SGML_FILE_NAME}.tex >/dev/null
+pdfjadetex ${SGML_FILE_NAME}.tex >/dev/null
+rm -f ${SGML_FILE_NAME}.log ${SGML_FILE_NAME}.aux \
+ ${SGML_FILE_NAME}.tex ${SGML_FILE_NAME}.out
+
+exit 0
diff --git a/backends/ps b/backends/ps
new file mode 100644
index 0000000..160c63b
--- /dev/null
+++ b/backends/ps
@@ -0,0 +1,49 @@
+# Backend to convert something into PostScript
+# Send any comments to Eric Bischoff <eric@caldera.de>
+# This program is under GPL license. See LICENSE file for details.
+
+TEXINPUTS="$(dirname "${SGML_FILE}"):${TEXINPUTS}"
+export TEXINPUTS
+
+# Convert to TeX
+$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
+if [ $? -ne 0 ]
+then exit 1
+fi
+
+# Convert from TeX to DVI
+jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
+if [ $? -ne 0 ]
+then
+ cat ${SGML_FILE_NAME}.tmp
+ rm ${SGML_FILE_NAME}.tmp
+ rm ${SGML_FILE_NAME}.tex
+ exit 2
+fi
+rm ${SGML_FILE_NAME}.tmp
+
+# If there are unresolved references, re-run jadetex, twice
+if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
+then
+ jadetex ${SGML_FILE_NAME}.tex >/dev/null
+ jadetex ${SGML_FILE_NAME}.tex >/dev/null
+fi
+rm -f ${SGML_FILE_NAME}.log ${SGML_FILE_NAME}.aux \
+ ${SGML_FILE_NAME}.tex ${SGML_FILE_NAME}.out
+
+# Convert from DVI to PostScript
+PAPERSIZE="-t letter"
+if echo x$SGML_ARGUMENTS | grep -- '-V paper-type=A4'
+then
+ PAPERSIZE="-t a4"
+fi
+
+dvips -R -q $PAPERSIZE ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}.ps
+if [ $? -ne 0 ]
+then
+ rm ${SGML_FILE_NAME}.dvi
+ exit 3
+fi
+rm ${SGML_FILE_NAME}.dvi
+
+exit 0
diff --git a/backends/rtf b/backends/rtf
new file mode 100644
index 0000000..b96df5b
--- /dev/null
+++ b/backends/rtf
@@ -0,0 +1,11 @@
+# Backend to convert something into RTF
+# Send any comments to Eric Bischoff <eric@caldera.de>
+# This program is under GPL license. See LICENSE file for details.
+
+# Convert to RTF
+$SGML_JADE -t rtf -o ${SGML_FILE_NAME}.rtf $SGML_ARGUMENTS
+if [ $? -ne 0 ]
+then exit 1
+fi
+
+exit 0
diff --git a/backends/tex b/backends/tex
new file mode 100644
index 0000000..56ab924
--- /dev/null
+++ b/backends/tex
@@ -0,0 +1,11 @@
+# Backend to convert something into TeX
+# Send any comments to Eric Bischoff <eric@caldera.de>
+# This program is under GPL license. See LICENSE file for details.
+
+# Convert to TeX
+$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
+if [ $? -ne 0 ]
+then exit 1
+fi
+
+exit 0
diff --git a/backends/texi.in b/backends/texi.in
new file mode 100644
index 0000000..ab838d2
--- /dev/null
+++ b/backends/texi.in
@@ -0,0 +1,11 @@
+# Backend to convert a DocBook file into a texinfo file
+# Send any comments to Jochem Huhmann <joh@revier.com>
+# This program is under GPL license. See LICENSE file for details.
+
+# Convert to texinfo
+nsgmls $SGML_FILE | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
+if [ $? -ne 0 ]
+then exit 1
+fi
+
+exit 0
diff --git a/backends/txt b/backends/txt
new file mode 100644
index 0000000..2dd43ba
--- /dev/null
+++ b/backends/txt
@@ -0,0 +1,38 @@
+# Backend to convert something into ASCII text
+# Send any comments to Eric Bischoff <eric@caldera.de>
+# This program is under GPL license. See LICENSE file for details.
+
+if [ -x /usr/bin/lynx ]
+then
+ CONVERT=/usr/bin/lynx
+ ARGS="-force_html -dump -nolist -width=72"
+elif [ -x /usr/bin/links ]
+then
+ CONVERT=/usr/bin/links
+ ARGS="-dump"
+elif [ -x /usr/bin/w3m ]
+then
+ CONVERT=/usr/bin/w3m
+ ARGS="-dump"
+else
+ echo >&2 "No way to convert HTML to text found."
+ exit 1
+fi
+
+HTML=$(mktemp /tmp/html-XXXXXX) || exit 1
+trap 'rm -f "$HTML"; exit' 0 1 2 3 7 13 15
+
+# Convert to HTML
+$SGML_JADE -V nochunks -t sgml ${SGML_ARGUMENTS} >${HTML}
+if [ $? -ne 0 ]
+then exit 1
+fi
+
+# Convert from HTML to ASCII
+${CONVERT} ${ARGS} ${HTML} > "${SGML_FILE_NAME}.txt"
+if [ $? -ne 0 ]
+then
+ exit 2
+fi
+
+exit 0
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100644
index 0000000..e4775b7
--- /dev/null
+++ b/bin/Makefile.am
@@ -0,0 +1,7 @@
+primitive_scripts = docbook2dvi docbook2html docbook2man docbook2pdf \
+ docbook2ps docbook2rtf docbook2tex docbook2texi docbook2txt
+
+bindir = $(prefix)/bin
+bin_SCRIPTS = jw sgmldiff $(primitive_scripts)
+
+EXTRA_DIST = jw.in sgmldiff.in $(primitive_scripts)
diff --git a/bin/Makefile.in b/bin/Makefile.in
new file mode 100644
index 0000000..114efeb
--- /dev/null
+++ b/bin/Makefile.in
@@ -0,0 +1,289 @@
+# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = bin
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/jw.in $(srcdir)/sgmldiff.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(mkdir_p)
+CONFIG_CLEAN_FILES = jw sgmldiff
+am__installdirs = $(DESTDIR)$(bindir)
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(bin_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+bindir = $(prefix)/bin
+build_alias = @build_alias@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+jade_bindir = @jade_bindir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+perl_bindir = @perl_bindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+primitive_scripts = docbook2dvi docbook2html docbook2man docbook2pdf \
+ docbook2ps docbook2rtf docbook2tex docbook2texi docbook2txt
+
+bin_SCRIPTS = jw sgmldiff $(primitive_scripts)
+EXTRA_DIST = jw.in sgmldiff.in $(primitive_scripts)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu bin/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+jw: $(top_builddir)/config.status $(srcdir)/jw.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+sgmldiff: $(top_builddir)/config.status $(srcdir)/sgmldiff.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ $(mkdir_p) $(DESTDIR)$(bindir)
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
+ $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
+ done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ $(mkdir_p) $(DESTDIR)$(bindir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binSCRIPTS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binSCRIPTS install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/bin/docbook2dvi b/bin/docbook2dvi
new file mode 100755
index 0000000..290c50e
--- /dev/null
+++ b/bin/docbook2dvi
@@ -0,0 +1,2 @@
+#! /bin/sh
+jw -f docbook -b dvi "$@"
diff --git a/bin/docbook2html b/bin/docbook2html
new file mode 100755
index 0000000..a70fb67
--- /dev/null
+++ b/bin/docbook2html
@@ -0,0 +1,2 @@
+#! /bin/sh
+jw -f docbook -b html "$@"
diff --git a/bin/docbook2man b/bin/docbook2man
new file mode 100755
index 0000000..4a217ea
--- /dev/null
+++ b/bin/docbook2man
@@ -0,0 +1,2 @@
+#! /bin/sh
+jw -f docbook -b man "$@"
diff --git a/bin/docbook2pdf b/bin/docbook2pdf
new file mode 100755
index 0000000..c81f063
--- /dev/null
+++ b/bin/docbook2pdf
@@ -0,0 +1,2 @@
+#! /bin/sh
+jw -f docbook -b pdf "$@"
diff --git a/bin/docbook2ps b/bin/docbook2ps
new file mode 100755
index 0000000..44ce92c
--- /dev/null
+++ b/bin/docbook2ps
@@ -0,0 +1,2 @@
+#! /bin/sh
+jw -f docbook -b ps "$@"
diff --git a/bin/docbook2rtf b/bin/docbook2rtf
new file mode 100755
index 0000000..8847d5b
--- /dev/null
+++ b/bin/docbook2rtf
@@ -0,0 +1,2 @@
+#! /bin/sh
+jw -f docbook -b rtf "$@"
diff --git a/bin/docbook2tex b/bin/docbook2tex
new file mode 100755
index 0000000..77bc311
--- /dev/null
+++ b/bin/docbook2tex
@@ -0,0 +1,2 @@
+#! /bin/sh
+jw -f docbook -b tex "$@"
diff --git a/bin/docbook2texi b/bin/docbook2texi
new file mode 100755
index 0000000..b11db3a
--- /dev/null
+++ b/bin/docbook2texi
@@ -0,0 +1,2 @@
+#! /bin/sh
+jw -f docbook -b texi "$@"
diff --git a/bin/docbook2txt b/bin/docbook2txt
new file mode 100755
index 0000000..4b9f888
--- /dev/null
+++ b/bin/docbook2txt
@@ -0,0 +1,2 @@
+#! /bin/sh
+jw -f docbook -b txt "$@"
diff --git a/bin/jw.in b/bin/jw.in
new file mode 100644
index 0000000..4bfb312
--- /dev/null
+++ b/bin/jw.in
@@ -0,0 +1,442 @@
+#! /bin/sh
+# Jade Wrapper
+# Script to convert a SGML file into some other format
+# Send any comments to Eric Bischoff <eric@caldera.de>
+# This program is under GPL license. See LICENSE file for details.
+
+# Set help message
+SGML_HELP_MESSAGE="Usage: `basename $0` [<options>] <sgml_file>\n\
+where <options> are:\n\
+\040 -f|--frontend <frontend>: \t Specify the frontend (source format)\n\
+\040 \t\t\t\t (default is docbook)\n\
+\040 -b|--backend <backend>: \t Specify the backend (destination format)\n\
+\040 \t\t\t\t (default is html)\n\
+\040 -c|--cat <file>: \t\t Specify an extra SGML open catalog\n\
+\040 -n|--nostd: \t\t\t Do not use the standard SGML open catalogs\n\
+\040 -d|--dsl <file>|default|none:\t Specify an alternate style sheet\n\
+\040 \t\t\t\t (default is to use the default stylesheet)\n\
+\040 -l|--dcl <file>: \t\t Specify an alternate SGML declaration\n\
+\040 \t\t\t\t (usual ones like xml.dcl get detected automatically)\n\
+\040 -s|--sgmlbase <path>: \t Change base directory for SGML distribution\n\
+\040 \t\t\t\t (usually @prefix@/share/sgml)\n\
+\040 -p|--parser <program>: \t Specify the parser if several are installed\n\
+\040 \t\t\t\t (jade or openjade)\n\
+\040 -o|--output <directory>: \t Set output directory\n\
+\040 -u|--nochunks: \t\t Output only one big file\n\
+\040 \t\t\t\t (overrides the stylesheet settings)\n\
+\040 -i|--include <section>: \t Specify a SGML marked section to include\n\
+\040 \t\t\t\t (should be marked as \"ignore\" in the SGML text)\n\
+\040 -w|--warning <warning_type>|list: Control warnings or display the allowed warning types\n\
+\040 -e|--errors <error_type>|list: Control errors or display the allowed error types\n\
+\040 -h|--help: \t\t\t Print this help message and exit\n\
+\040 -V <variable[=value]>: \t Set a variable\n\
+\040 -v|--version: \t\t Print the version and exit"
+
+# Set list of warning types
+SGML_WARNINGS_LIST="\n\
+\040 xml \t\t Warn about constructs that are not allowed by XML\n\
+\040 mixed \t Warn about mixed content models that do not allow #pcdata anywhere\n\
+\040 sgmldecl \t Warn about various dubious constructions in the SGML declaration\n\
+\040 should \t Warn about various recommendations made in ISO 8879 that the document does not comply with\n\
+\040 default \t Warn about defaulted references\n\
+\040 duplicate \t Warn about duplicate entity declarations\n\
+\040 undefined \t Warn about undefined elements: elements used in the DTD but not defined\n\
+\040 unclosed \t Warn about unclosed start and end-tags\n\
+\040 empty \t Warn about empty start and end-tags\n\
+\040 net \t\t Warn about net-enabling start-tags and null end-tags\n\
+\040 min-tag \t Warn about minimized start and end-tags. Equivalent to: unclosed, empty and net\n\
+\040 unused-map \t Warn about unused short reference maps\n\
+\040 unused-param \t Warn about parameter entities that are defined but not used in a DTD\n\
+\040 notation-sysid Warn about notations for which no system identifier could be generated\n\
+\040 all \t\t Equivalent to: mixed, should, default, undefined, sgmldecl, unused-map, unused-param, empty and unclosed\n\n\
+\040 A warning can be disabled by using its name prefixed with no-. Example: -w all -w no-duplicate"
+
+# Set list of error types
+SGML_ERRORS_LIST="\n\
+\040 no-idref \t No error for an ID reference value which no element has as its ID\n\
+\040 no-significant No errors for characters not significant in the reference concrete syntax\n\
+\040 no-valid \t Do not require the document to be type-valid"
+
+# Get name of main SGML configuration file
+which sgmlwhich >/dev/null 2>/dev/null
+if [ $? -eq 0 ]
+then
+ SGML_CONF=`sgmlwhich`
+else
+ SGML_CONF="/etc/sgml/sgml.conf"
+fi
+
+# Set version message
+SGML_VERSION_MESSAGE="DocBook-utils version @VERSION@ (jw version 1.1)"
+
+# Set option: use standard catalogs
+SGML_STANDARD_CATALOGS="yes"
+
+# Set path to user SGML catalogs
+SGML_EXTRA_CATALOGS=""
+
+# Set SGML base directory and centralized catalogs directory
+SGML_BASE_DIR="@prefix@/share/sgml"
+SGML_CATALOGS_DIR="/etc/sgml"
+if [ -f "$SGML_CONF" ]
+then
+ RE='^[:space:]*SGML_BASE_DIR[:space:]*=[:space:]*'
+ SGML_BASE_DIR=`grep $RE $SGML_CONF | sed "s/$RE//"`
+ RE='^[:space:]*SGML_CATALOGS_DIR[:space:]*=[:space:]*'
+ SGML_CATALOGS_DIR=`grep $RE $SGML_CONF | sed "s/$RE//"`
+fi
+
+# Set frontend to use
+SGML_FRONTEND="$SGML_BASE_DIR/docbook/utils-@VERSION@/frontends/docbook"
+
+# Set backend to use
+SGML_BACKEND="$SGML_BASE_DIR/docbook/utils-@VERSION@/backends/html"
+
+# Set main stylesheet
+SGML_STYLESHEET="default"
+
+# Set flavour of jade parser to use
+SGML_JADE=""
+
+# Set SGML declaration and file to process
+SGML_DECL=""
+SGML_FILE=""
+
+# Set output and current directories
+SGML_OUTPUT_DIRECTORY="."
+SGML_CURRENT_DIRECTORY=`pwd`
+
+# Set of options to set
+SGML_OPTIONS=""
+
+# Set list of "include" marked sections
+SGML_INCLUDE=""
+
+# Set list of warning types and errors types
+SGML_WARNINGS=""
+
+# Process options
+while [ $# -gt 0 ]
+do case $1 in
+ -f|--frontend) case "$2" in
+ /*) SGML_FRONTEND="$2" ;;
+ *) d=$SGML_BASE_DIR/docbook/utils-@VERSION@/frontends
+ SGML_FRONTEND="$d/$2" ;;
+ esac
+ shift 2
+ ;;
+ -b|--backend) case "$2" in
+ /*) SGML_BACKEND="$2" ;;
+ *) d=$SGML_BASE_DIR/docbook/utils-@VERSION@/backends
+ SGML_BACKEND="$d/$2" ;;
+ esac
+ shift 2
+ ;;
+ -c|--cat) case "$2" in
+ /*) SGML_EXTRA_CATALOGS="$SGML_EXTRA_CATALOGS:$2" ;;
+ *) SGML_EXTRA_CATALOGS="$SGML_EXTRA_CATALOGS:$SGML_CURRENT_DIRECTORY/$2" ;;
+ esac
+ shift 2
+ ;;
+ -d|--dsl) case "$2" in
+ /*|none|default) SGML_STYLESHEET="$2" ;;
+ *) SGML_STYLESHEET="$SGML_CURRENT_DIRECTORY/$2" ;;
+ esac
+ shift 2
+ ;;
+ -l|--dcl) case "$2" in
+ /*) SGML_DECL="$2" ;;
+ *) SGML_DECL="$SGML_CURRENT_DIRECTORY/$2" ;;
+ esac
+ shift 2
+ ;;
+ -n|--nostd) SGML_STANDARD_CATALOGS="no"
+ shift 1
+ ;;
+ -s|--sgmlbase) case "$2" in
+ /*) SGML_BASE_DIR="$2" ;;
+ *) SGML_BASE_DIR="$SGML_CURRENT_DIRECTORY/$2" ;;
+ esac
+ shift 2
+ ;;
+ -p|--parser) case "$2" in
+ /*) SGML_JADE="$2" ;;
+ *) SGML_JADE="$SGML_CURRENT_DIRECTORY/$2" ;;
+ esac
+ shift 2
+ ;;
+ -o|--output) case "$2" in
+ /*) SGML_OUTPUT_DIRECTORY="$2" ;;
+ *) SGML_OUTPUT_DIRECTORY="$SGML_CURRENT_DIRECTORY/$2" ;;
+ esac
+ shift 2
+ ;;
+ -u|--nochunks) SGML_OPTIONS="$SGML_OPTIONS -V nochunks"
+ shift 1
+ ;;
+ -V) SGML_OPTIONS="$SGML_OPTIONS -V $2"
+ shift 2
+ ;;
+ -i|--include) case $2 in
+ print|html) echo "The marked section named \"$2\" is reserved for internal use by `basename $0`." >&2
+ exit 1
+ ;;
+ esac
+ SGML_INCLUDE="$SGML_INCLUDE -i $2"
+ shift 2
+ ;;
+ -w|--warning) case $2 in
+ list) echo -e "List of allowed warning types (multiple -w options are allowed):\n"
+ echo -e $SGML_WARNINGS_LIST
+ exit 0
+ ;;
+ xml|mixed|sgmldecl|should|default|duplicate|undefined|unclosed|empty|net|min-tag|unused-map|unused-param|notation-sysid|all|no-xml|no-mixed|no-sgmldecl|no-should|no-default|no-duplicate|no-undefined|no-unclosed|no-empty|no-net|no-min-tag|no-unused-map|no-unused-param|no-notation-sysid) \
+ SGML_WARNINGS="$SGML_WARNINGS -w $2"
+ shift 2
+ ;;
+ *) echo "Unknown warning type \"$2\". Allowed warning types are:" >&2
+ echo -e $SGML_WARNINGS_LIST >&2
+ exit 1
+ ;;
+ esac
+ ;;
+ -e|--error) case $2 in
+ list) echo -e "List of allowed error types (multiple -e options are allowed):\n"
+ echo -e $SGML_ERRORS_LIST
+ exit 0
+ ;;
+ no-idref|no-significant|no-valid) \
+ SGML_WARNINGS="$SGML_WARNINGS -w $2"
+ shift 2
+ ;;
+ *) echo "Unknown error type \"$2\". Allowed error types are:" >&2
+ echo -e $SGML_ERRORS_LIST >&2
+ exit 1
+ ;;
+ esac
+ ;;
+ -h|--help) echo -e "`basename $0` - Jade Wrapper\n"
+ echo -e "$SGML_HELP_MESSAGE"
+ exit 0
+ ;;
+ -v|--version) echo -e "$SGML_VERSION_MESSAGE"
+ exit 0
+ ;;
+ -*) echo -e "$SGML_HELP_MESSAGE" >&2
+ exit 1
+ ;;
+ *) if [ -z "$SGML_FILE" ]
+ then
+ case "$1" in
+ /*) SGML_FILE="$1" ;;
+ *) SGML_FILE="$SGML_CURRENT_DIRECTORY/$1" ;;
+ esac
+ shift 1
+ else
+ echo -e "$SGML_HELP_MESSAGE" >&2
+ exit 1
+ fi
+ ;;
+ esac
+done
+
+# Check that we have a frontend
+if [ -z "$SGML_FRONTEND" ]
+then
+ echo -e $SGML_HELP_MESSAGE >&2
+ exit 1
+fi
+if [ ! -s $SGML_FRONTEND ]
+then
+ echo "`basename $0`: There is no frontend called \"$SGML_FRONTEND\"." >&2
+ exit 2
+fi
+
+# Check that we have a backend
+if [ -z "$SGML_BACKEND" ]
+then
+ echo -e $SGML_HELP_MESSAGE >&2
+ exit 1
+fi
+if [ ! -s $SGML_BACKEND ]
+then
+ echo "`basename $0`: There is no backend called \"$SGML_BACKEND\"." >&2
+ exit 2
+fi
+
+# Check that we have a file to process
+if [ -z "$SGML_FILE" ]
+then
+ echo -e $SGML_HELP_MESSAGE >&2
+ exit 1
+fi
+if [ ! -s $SGML_FILE ]
+then
+ echo "`basename $0`: Cannot open \"$SGML_FILE\"." >&2
+ exit 3
+fi
+
+# Separate the file name and the extension (if any)
+SGML_FILE_NAME=`basename $SGML_FILE`
+SGML_FILE_NAME=${SGML_FILE_NAME%.*}
+
+# Determine if we are in an XML file
+SGML_XML=`head "$SGML_FILE" | grep "<?xml.*?>" | wc -l`
+if [ $SGML_XML -eq 1 ]; then
+ SGML_XML="xml"
+else
+ SGML_XML="sgml"
+fi
+
+# Use SGML declaration for XML if needed
+if [ "$SGML_DECL" = "" -a "$SGML_XML" = "xml" ]
+then SGML_DECL=${SGML_BASE_DIR}/xml.dcl
+fi
+
+# Try to find the SGML normalizer
+if [ -z "$SGML_NORM" ]
+then
+ SGML_NORM=`which sgmlnorm 2>/dev/null`
+ if [ -z "SGML_NORM" ]
+ then
+ SGML_NORM=`which osgmlnorm 2>/dev/null`
+ fi
+fi
+
+# Set path to SGML catalogs (first try centralized catalog)
+case $SGML_STANDARD_CATALOGS in
+ yes) export SGML_CATALOGS_DIR SGML_FILE SGML_XML SGML_NORM
+ SGML_CENTRALIZED_CATALOG=`sh $SGML_FRONTEND centralized-catalog`
+ if [ -s $SGML_CENTRALIZED_CATALOG ]
+ then
+ SGML_CATALOG_FILES=$SGML_CENTRALIZED_CATALOG
+ else
+ SGML_CATALOG_FILES=`find $SGML_BASE_DIR -name catalog`
+ SGML_CATALOG_FILES=`echo "$SGML_CATALOG_FILES" | tr [:space:] :`
+ fi
+ ;;
+ no) SGML_CATALOG_FILES=""
+ ;;
+esac
+SGML_CATALOG_FILES=${SGML_CATALOG_FILES}${SGML_EXTRA_CATALOGS}
+SGML_CATALOG_FILES=`echo "$SGML_CATALOG_FILES" | sed 's/^://;s/:$//'`
+if [ -z "$SGML_CATALOG_FILES" ]
+then
+ echo "`basename $0`: Please specify at least one catalog" >&2
+ exit 4
+fi
+
+# Determine the backend type
+case $SGML_BACKEND in
+ *html|*txt) \
+ SGML_TYPE=html
+ ;;
+ *) SGML_TYPE=print
+ ;;
+esac
+
+# Determine which stylesheet to use
+# (run the frontend to know it if the default stylesheet or no custom stylesheet is desired)
+if [ "$SGML_STYLESHEET" = "default" -o "$SGML_STYLESHEET" = "none" ]
+then
+ export SGML_BASE_DIR SGML_TYPE SGML_STYLESHEET
+ SGML_STYLESHEET=`sh $SGML_FRONTEND style-sheet`
+ SGML_RETURN=$?
+ if [ $SGML_RETURN -gt 0 ]
+ then exit `expr 7 + $SGML_RETURN`
+ fi
+fi
+if [ -z "$SGML_STYLESHEET" ]
+then
+ echo "`basename $0`: Please specify at least one stylesheet" >&2
+ exit 5
+fi
+
+case "$SGML_OPTIONS" in
+ *paper-type*)
+ ;;
+ *)
+ # Set the paper size to A4 if the locale suggests so
+ papersize=
+ if [ -x /usr/bin/locale ]
+ then
+ h=$(/usr/bin/locale LC_PAPER 2>/dev/null | head -n 1)
+ if [ "$h" = 297 ]
+ then
+ papersize=A4
+ fi
+ fi
+ if [ -n "$papersize" ]
+ then
+ SGML_OPTIONS="-V paper-type=$papersize $SGML_OPTIONS"
+ fi
+ ;;
+esac
+
+# Choose a parser
+if [ -z "$SGML_JADE" ]
+then
+ which jade >/dev/null 2>/dev/null
+ if [ $? -eq 0 ]
+ then
+ SGML_JADE="jade"
+ else
+ which openjade >/dev/null 2>/dev/null
+ if [ $? -eq 0 ]
+ then
+ SGML_JADE="openjade"
+ else
+ echo "`basename $0`: No parser available" >&2
+ exit 6
+ fi
+ fi
+else
+ which $SGML_JADE >/dev/null 2>/dev/null
+ if [ $? -ne 0 ]
+ then
+ echo "`basename $0`: parser $SGML_JADE is not available" >&2
+ exit 6
+ fi
+fi
+
+# Create output directory if not available
+if [ -z "$SGML_OUTPUT_DIRECTORY" ]
+then
+ echo -e $SGML_HELP_MESSAGE >&2
+ exit 1
+fi
+if [ ! -d $SGML_OUTPUT_DIRECTORY ]
+then
+ mkdir $SGML_OUTPUT_DIRECTORY 2>/dev/null
+ if [ $? -ne 0 ]
+ then
+ echo "`basename $0`: Could not create \"$SGML_OUTPUT_DIRECTORY\" output directory" >&2
+ exit 7
+ fi
+fi
+
+# Prepare the parser's arguments
+SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET $SGML_OPTIONS $SGML_WARNINGS $SGML_DECL $SGML_FILE"
+
+# Call the backend
+echo "Using catalogs: `echo $SGML_CATALOG_FILES | sed 's/:/, /g'`"
+echo "Using stylesheet: $SGML_STYLESHEET"
+echo "Working on: $SGML_FILE"
+cd $SGML_OUTPUT_DIRECTORY
+export SGML_JADE SGML_FILE_NAME SGML_ARGUMENTS
+export SGML_CATALOG_FILES SGML_BASE_DIR SGML_FILE SGML_STYLESHEET
+NOCHUNKS=`echo $SGML_OPTIONS | grep nochunks`
+if [ -z "$NOCHUNKS" ]
+then
+ sh $SGML_BACKEND
+else
+ sh $SGML_BACKEND >$SGML_FILE_NAME.html
+fi
+SGML_RETURN=$?
+cd $SGML_CURRENT_DIRECTORY
+
+if [ $SGML_RETURN -gt 0 ]
+then exit `expr 7 + $SGML_RETURN`
+fi
+echo "Done."
+exit 0
diff --git a/bin/sgmldiff.in b/bin/sgmldiff.in
new file mode 100644
index 0000000..9451349
--- /dev/null
+++ b/bin/sgmldiff.in
@@ -0,0 +1,449 @@
+#!@perl_bindir@/perl -w
+
+# Structurally diffs two SGML/XML files.
+# Copyright (C) 2000 Frederik Fouvry
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Send bug reports, comments, suggestions, improvements etc. to
+# Frederik Fouvry <fouvry@sfs.nphil.uni-tuebingen.de>.
+
+use strict;
+use integer;
+use vars qw($nsgmls $errors $errorlog $VERSION);
+use Getopt::Long 2.01;
+
+$VERSION = 1.03;
+
+my $nsgmls;
+$nsgmls = "@jade_bindir@/nsgmls";
+
+#----------------------------------------------------------------------
+# TODO:
+# - add text occurrences to diff file, such that diff has a bit more
+# context; it might help in some cases (and perhaps ruin it in others).
+# - Wait for suggestions ;-)
+#
+# Note: the input file need not be valid, nor is it necessary to have
+# the DTDs. nsgmls always returns a structure.
+#----------------------------------------------------------------------
+
+# Get file name
+chomp(my $progname = `basename $0`);
+
+my ($opt_a, $opt_s, $opt_h, $opt_v, $opt_c) = (0, 0, 0, 0, "");
+&GetOptions("h|help" => \$opt_h,
+ "v|version" => \$opt_v,
+ "s|statistics!" => \$opt_s,
+ "a|attributes!" => \$opt_a,
+ "c|context=s" => \$opt_c);
+ # -a includes the attribute values in the diff
+ # -s prints external entity information at the end
+ # -h prints help
+ # -v prints version
+ # -c add some context to improve the diff results
+
+if ($opt_v == 1) {
+ print STDOUT "DocBook-utils version @VERSION@ (sgmldiff v$VERSION)\n";
+ exit 0;
+};
+
+# Check number of arguments
+if ($opt_h == 1 || @ARGV != 2) {
+ print STDERR "DocBook-utils version @VERSION@ (sgmldiff v$VERSION)
+
+Usage: $progname [options] file1 file2
+ where the options are:
+ -a, --attributes includes the attribute values in the diff
+ -s, --statistics prints some SGML information at the end
+ -h, --help prints this usage information
+ -v, --version prints the version on the standard output
+ -c, --context adds more context to the diff, which may
+ improve the results. It takes \"attributes\", \"textpos\"
+ or \"nesting\" as an argument e.g. -c textpos, which can
+ also be combined: -c nesting,attributes
+
+";
+ exit 0;
+};
+
+$opt_a = 1 if $opt_c =~ /attributes/; # -c attributes = -a
+
+# Initialise
+my $file1 = $ARGV[0];
+my $diff1 = "$file1.difftmp$$";
+my $file2 = $ARGV[1];
+my $diff2 = "$file2.difftmp$$";
+$errors = "-E0 -e -g"; # allow any number of errors
+ # and show precise context position of error
+$errorlog = "-f /dev/null";
+my $indent = "";
+
+# Get structure of the files
+my ($lines1,@allfile1) = &prepare($file1, $diff1);
+my ($lines2,@allfile2) = &prepare($file2, $diff2);
+my @lines1 = split(/@/,$lines1);
+my @lines2 = split(/@/,$lines2);
+
+# Do diff and rebuild the original input
+open(SDIFF,"diff $diff1 $diff2 |");
+$_ = <SDIFF>;
+while (defined($_)) {
+ chomp $_;
+ my ($start1, $start2, $command, $d1, $d2, $end1, $end2);
+ # New difference
+ if ($_ =~ /^(\d+)(,(\d+))?([acd])(\d+)(,(\d+))?$/) {
+ $start1 = $1-1;
+ $command = $4;
+ $start2 = $5-1;
+ if (defined $3) { $d1 = $3-$1; } else { $d1 = 0; };
+ if (defined $7) { $d2 = $7-$5; } else { $d2 = 0; };
+ };
+ $end1 = $start1+$d1;
+ $end2 = $start2+$d2;
+ print "$lines1[$start1]"
+ .($lines1[$end1] > $lines1[$start1] ? ",$lines1[$end1]" : "")
+ ."$command$lines2[$start2]"
+ .($lines2[$end2] > $lines2[$start2] ? ",$lines2[$end2]" : "")
+ ."\n";
+ # Print lines of first file
+ $_ = <SDIFF>;
+ while (defined $_ && /^< /) {
+ print &normalise_text($allfile1[$start1++],"< ");
+ $_ = <SDIFF>;
+ };
+ undef $start1;
+ print "---\n";
+ # Print lines of second file
+ $_ = <SDIFF> if defined($_) && $_ =~ /^---$/;
+ while (defined $_ && /^> /) {
+ print &normalise_text($allfile2[$start2++],"> ");
+ $_ = <SDIFF>;
+ };
+ undef $start2;
+};
+close(SDIFF);
+
+# Clean up
+unlink $diff1;
+unlink $diff2;
+
+#---------------------------------------------------------------------
+# Process nsgmls output: keep all stuff that is important for the
+# structure comparison. Make two structures: one that is diffed
+# (without text) (DIFF) and one that is used to present the
+# differences to the user (@full). For more info: see SP
+# documentation, nsgmls output format.
+
+sub prepare {
+ my($filename,$todiffname) = @_;
+ my @full = ();
+ my @attributes;
+ my @e_attributes;
+ my ($system_identifier, $public_identifier, $f_info, $empty) = ("", "", "");
+ my %statistics = (notation => {},
+ text => {},
+ external_data => {},
+ subdocument => {},
+ files => {});
+ my @line_numbered = ();
+ my $line = 0;
+
+ open(ESIS, "$nsgmls -l $errors $errorlog -onotation-sysid -oid -oempty $filename | "); #-oentity generates strange output; ? -ononsgml
+ open(DIFF, "> $todiffname");
+ while (<ESIS>) {
+ chomp $_;
+ if ($_ =~ /^\((.+)$/) {
+ print DIFF "$indent<$1";
+ print DIFF " ".join(" ",@attributes)
+ if (@attributes > 0 && defined($opt_a) && $opt_a == 1);
+ print DIFF ">\n";
+ push @line_numbered, "$line";
+ push @full, "$indent<$1".(@attributes > 0 ? " ".join(" ",@attributes) : "").">\n";
+ @attributes = ();
+ $indent .= " " if $opt_c =~ /nesting/;
+ } elsif ($_ =~ /^\)(.+)$/) {
+ my $gi = $1;
+ $indent = substr($indent,0,-1) if $opt_c =~ /nesting/;
+ push @line_numbered, "$line" unless $empty;
+ push @full, "$indent</$gi>\n" unless $empty;
+ print DIFF "$indent</$gi>\n" unless $empty;
+ $empty = 0;
+ } elsif ($_ =~ /^-(.*)$/) {
+ my $data = $1;
+ my @a = split(/\\n/, $data);
+ push @line_numbered, "$line";
+ push @full, "$data\n";
+ $line += $#a;
+ print DIFF ($opt_c =~ /textpos/ ? "-" : "")."\n";
+ } elsif ($_ =~ /^\&(.*)$/) {
+ print DIFF "&$1;";
+ push @line_numbered, "$line";
+ push @full, "&$1;";
+ } elsif ($_ =~ /^\?(.*)$/) {
+ print DIFF "<?$1>\n";
+ push @line_numbered, "$line";
+ push @full, "<?$1>\n";
+ } elsif ($_ =~ /^A(\S+)\s+(IMPLIED|CDATA (.*)|NOTATION (.*)|ENTITY (.*)|TOKEN (.*)|ID (.*))$/) {
+ my $attr = $1;
+ my $val = $2;
+ if ($val eq "IMPLIED") {
+ # don't print anything
+ } elsif ($val =~ /^CDATA (.*)$/) {
+ @attributes = (@attributes, "$attr=\"$1\"");
+ } elsif ($val =~ /^NOTATION (.*)$/) {
+ @attributes = (@attributes, "$attr=\"$1\"");
+ } elsif ($val =~ /^ENTITY (.*)$/) {
+ @attributes = (@attributes, "$attr=\"$1\"");
+ } elsif ($val =~ /^TOKEN (.*)$/) {
+ @attributes = (@attributes, "$attr=\"$1\"");
+ } elsif ($val =~ /^ID (.*)$/) {
+ @attributes = (@attributes, "$attr=\"$1\"");
+ } else {
+ warn "Unrecognised construction `$val'";
+ };
+ } elsif ($_ =~ /^D(\S+)\s+(IMPLIED|CDATA (.*)|NOTATION (.*)|ENTITY (.*)|TOKEN (.*)|ID (.*))$/) {
+ # as yet never printed out
+ if ($opt_a == 1) {
+ my $attr = $1;
+ my $val = $2;
+ if ($val eq "IMPLIED") {
+ # don't print anything
+ } elsif ($val =~ /^CDATA (.*)$/) {
+ @e_attributes = (@e_attributes, "$attr=\"$1\"");
+ } elsif ($val =~ /^NOTATION (.*)$/) {
+ @e_attributes = (@e_attributes, "$attr=\"$1\"");
+ } elsif ($val =~ /^ENTITY (.*)$/) {
+ @e_attributes = (@e_attributes, "$attr=\"$1\"");
+ } elsif ($val =~ /^TOKEN (.*)$/) {
+ @e_attributes = (@e_attributes, "$attr=\"$1\"");
+ } elsif ($val =~ /^ID (.*)$/) {
+ @e_attributes = (@e_attributes, "$attr=\"$1\"");
+ } else {
+ warn "Unrecognised construction `$val'";
+ };
+ } else { };
+ } elsif ($_ =~ /^a(\S+)\s+(\S+)\s+(.*)$/) {
+ my_warn($_);
+ } elsif ($_ =~ /^N(.*)$/) {
+ $statistics{notation}->{$1}->{pubid} = "$public_identifier"
+ unless $public_identifier eq "";
+ $statistics{notation}->{$1}->{sysid} = "$system_identifier"
+ unless $system_identifier eq "";
+ $statistics{notation}->{$1}->{emsysid} = "$f_info"
+ unless $f_info eq "";
+ $system_identifier = "";
+ $public_identifier = "";
+ $f_info = "";
+ } elsif ($_ =~ /^E(\S+)\s+(CDATA|NDATA|SDATA)\s+(.*)$/) {
+ $statistics{external_data}->{$1}->{pubid} = "$public_identifier $2 $3"
+ unless $public_identifier eq "";
+ $statistics{external_data}->{$1}->{sysid} = "$system_identifier $2 $3"
+ unless $system_identifier eq "";
+ $statistics{external_data}->{$1}->{emsysid} = "$f_info"
+ unless $f_info eq "";
+ $system_identifier = "";
+ $public_identifier = "";
+ $f_info = "";
+ } elsif ($_ =~ /^I(\S+)\s+(CDATA|SDATA|PI|TEXT)\s+(.*)$/) {
+ my $typ = $2;
+ my $name = $1;
+ my $val = $3;
+ if ($typ =~ /^CDATA$/) {
+ push @full, "$val";
+ push @line_numbered, "$line";
+ print DIFF "$val";
+ } elsif ($typ =~ /^SDATA$/) {
+ my_warn($typ);
+ } elsif ($typ =~ /^PI$/) {
+ my_warn($typ);
+ } elsif ($typ =~ /^TEXT$/) {
+ my_warn($typ);
+ } else {
+ my_warn($typ);
+ };
+ } elsif ($_ =~ /^S(.*)$/) {
+ $statistics{subdocument}->{$1}->{pubid} = "$public_identifier"
+ unless $public_identifier eq "";
+ $statistics{subdocument}->{$1}->{sysid} = "$system_identifier"
+ unless $system_identifier eq "";
+ $statistics{subdocument}->{$1}->{emsysid} = "$f_info"
+ unless $f_info eq "";
+ $system_identifier = "";
+ $public_identifier = "";
+ $f_info = "";
+ } elsif ($_ =~ /^T(.*)$/) {
+ $statistics{text}->{$1}->{pubid} = "$public_identifier"
+ unless $public_identifier eq "";
+ $statistics{text}->{$1}->{sysid} = "$system_identifier"
+ unless $system_identifier eq "";
+ $statistics{text}->{$1}->{emsysid} = "$f_info"
+ unless $f_info eq "";
+ $system_identifier = "";
+ $public_identifier = "";
+ $f_info = "";
+ } elsif ($_ =~ /^s(.*)$/) {
+ $system_identifier = "$1";
+ } elsif ($_ =~ /^p(.*)$/) {
+ $public_identifier = "$1";
+ } elsif ($_ =~ /^f(.*)$/) {
+ $f_info = "$1";
+ } elsif ($_ =~ /^{(.*)$/) {
+ my_warn($_);
+ } elsif ($_ =~ /^}(.*)$/) {
+ my_warn($_);
+ } elsif ($_ =~ /^L((\d+)( (.+))?)$/) {
+ $line = $2;
+ # only line is set; nothing else is done
+ # print DIFF "----------$4----------\n" if defined($4);
+ # push @full, (defined($4) ? "----------$4----------\n" : "")."L$line\n";
+ # push @line_numbered, "$line";
+ $statistics{files}->{$4} = 1 if defined $4;
+ } elsif ($_ =~ /^#(.*)$/) {
+ my_warn($_);
+ } elsif ($_ =~ /^C$/) {
+ print STDERR "====================\n";
+ print STDERR "The file `$filename' is a valid document.\n";
+ } elsif ($_ =~ /^i$/) {
+ # don't do anything
+ # only output with the option -oincluded
+ # for elements that are allowed by inclusion exception
+ } elsif ($_ =~ /^e$/) {
+ $empty = 1;
+ # only output with the option -oempty
+ } else {
+ warn "Unrecognised construction `$_'";
+ };
+ };
+ close(DIFF);
+ close(ESIS);
+ if (defined $opt_s && $opt_s == 1) {
+ print STDERR "--------------------\n";
+ print STDERR "Used SGML text files:\n"
+ unless keys(%{$statistics{files}}) == 0;
+ foreach my $f (keys %{$statistics{files}}) {
+ print STDERR " $f\n";
+ };
+ delete $statistics{files};
+ my $stat_text = "";
+ foreach my $k (keys %statistics) {
+ my $stat_text1;
+ if ($k eq "external_data") { $stat_text1 .= "<!ENTITY"; }
+ elsif ($k eq "notation") { $stat_text1 .= "<!NOTATION"; }
+ elsif ($k eq "subdocument") { $stat_text1 .= "<!SUBDOC"; }
+ elsif ($k eq "text") { $stat_text1 .= "Entity"; }
+ else { die "Wrong statistics value"};
+ foreach my $l (keys %{$statistics{$k}}) {
+ $stat_text .= "$stat_text1 $l ";
+ foreach my $m (keys %{$statistics{$k}->{$l}}) {
+ my $value = "$statistics{$k}->{$l}->{$m}";
+ if ($m eq "pubid" && defined($value)) {
+ $stat_text .= "PUBLIC \"$value\">\n";
+ } elsif ($m eq "sysid" && defined($value)) {
+ $stat_text .= "SYSTEM \"$value\">\n";
+ };
+ };
+ my $value = $statistics{$k}->{$l}->{emsysid};
+ if (defined($value) && $value ne "") {
+ $value =~ s/^<(.*)>(.*)/$2/o, my $si = $1;
+ $si =~ s/^osfile$/FILE/io;
+ $stat_text .= " Full name of system identifier ($si) actually referred to:\n \"$value\"\n";
+ } else {
+ $stat_text .= " No system identifier could be generated\n";
+ };
+ };
+ };
+ if ($stat_text ne "") {
+ print STDERR "SGML information for `$filename':\n$stat_text";
+ } else {
+ print STDERR "No SGML information for `$filename'\n"
+ };
+ };
+ return (join("@",@line_numbered),@full);
+};
+
+#----------------------------------------------------------------------
+# Normalise data text from nsgmls (i.e. don't print the escaped text).
+sub normalise_text {
+ my($string,$prefix) = @_;
+ my $result = "$prefix";
+ my @string;
+ my ($char,$state,$c);
+
+ @string = split(//,$string);
+ foreach $c (@string) {
+ if (defined $state) { # we're in an escape sequence
+ if ($state eq "escape") { # which just started
+ if ($c eq "\\") { # slash
+ $result .= $c;
+ undef $state;
+ } elsif ($c eq "|") { # pipe
+ warn "Unresolved SDATA ";
+ $result .= $c;
+ undef $state;
+ } elsif ($c eq "n") { # newline
+ $result .= "\n$prefix";
+ undef $state;
+ } elsif ($c eq "%" || $c eq "#") { # character
+ # `\\#\d+;' is character number in internal character set
+ # (if not representable by output encoding)
+ # `\\%\d+;' is character number in document character set
+ # (numeric char ref to non-SGML chars in fixed char set mode)
+ $char = "";
+ $state = "decchar";
+ } elsif ($c =~ /^[0-7]$/) { # character
+ $char = $c;
+ $state = "octchar";
+ } else {
+ die "Unrecognised construction";
+ };
+ } elsif ($state eq "decchar") { # reading a character code
+ if ($c ne ";") {
+ $char .= $c;
+ } else {
+ $result .= chr($char);
+ undef $char;
+ undef $state;
+ };
+ } elsif ($state eq "octchar") { # reading a charactre code
+ if (length($char) < 2) {
+ $char .= $c;
+ } else { # length == 2
+ $result .= chr(oct($char.$c));
+ undef $state;
+ undef $char;
+ };
+ } else {
+ die "State `$state' does not exist, stopped ";
+ };
+ } elsif ($c eq "\\") { # an escape starts
+ $state = "escape";
+ } else { # normal case
+ $result .= $c;
+ };
+ };
+
+ return $result;
+};
+
+#----------------------------------------------------------------------
+sub my_warn {
+ my ($a) = @_;
+ warn "`$a' not implemented yet.
+Please send a message to the maintainer (see source file) and include
+an example (e.g. the input that caused this message)";
+};
+
+1;
diff --git a/configure b/configure
new file mode 100755
index 0000000..f9410d4
--- /dev/null
+++ b/configure
@@ -0,0 +1,2630 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="Makefile.am"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot docdir jade_bindir perl_bindir LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.8"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p -- . 2>/dev/null; then
+ # Keeping the `.' argument allows $(mkdir_p) to be used without
+ # argument. Indeed, we sometimes output rules like
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined.
+ # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
+ # expensive solution, as it forces Make to start a sub-shell.)
+ mkdir_p='mkdir -p -- .'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=docbook-utils
+ VERSION=0.6.14
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+
+
+docdir='$(prefix)/doc'
+
+
+jade_bindirs="/usr/bin /usr/local/bin"
+
+jade_bindir=""
+for i in $jade_bindirs; do
+ for j in nsgmls; do
+ if test -x "$i/$j"; then
+ jade_bindir=$i
+ break 2
+ fi
+ done
+done
+
+
+
+perl_bindirs="/usr/bin /usr/local/bin"
+
+perl_bindir=""
+for i in $perl_bindirs; do
+ for j in perl; do
+ if test -x "$i/$j"; then
+ perl_bindir=$i
+ break 2
+ fi
+ done
+done
+
+
+
+
+
+
+
+ ac_config_files="$ac_config_files Makefile docbook-utils.spec bin/Makefile bin/jw bin/sgmldiff backends/Makefile backends/man backends/texi frontends/Makefile frontends/docbook helpers/Makefile doc/Makefile doc/version doc/refentry/Makefile doc/man/Makefile doc/HTML/Makefile"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "docbook-utils.spec" ) CONFIG_FILES="$CONFIG_FILES docbook-utils.spec" ;;
+ "bin/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
+ "bin/jw" ) CONFIG_FILES="$CONFIG_FILES bin/jw" ;;
+ "bin/sgmldiff" ) CONFIG_FILES="$CONFIG_FILES bin/sgmldiff" ;;
+ "backends/Makefile" ) CONFIG_FILES="$CONFIG_FILES backends/Makefile" ;;
+ "backends/man" ) CONFIG_FILES="$CONFIG_FILES backends/man" ;;
+ "backends/texi" ) CONFIG_FILES="$CONFIG_FILES backends/texi" ;;
+ "frontends/Makefile" ) CONFIG_FILES="$CONFIG_FILES frontends/Makefile" ;;
+ "frontends/docbook" ) CONFIG_FILES="$CONFIG_FILES frontends/docbook" ;;
+ "helpers/Makefile" ) CONFIG_FILES="$CONFIG_FILES helpers/Makefile" ;;
+ "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "doc/version" ) CONFIG_FILES="$CONFIG_FILES doc/version" ;;
+ "doc/refentry/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/refentry/Makefile" ;;
+ "doc/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/Makefile" ;;
+ "doc/HTML/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/HTML/Makefile" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@docdir@,$docdir,;t t
+s,@jade_bindir@,$jade_bindir,;t t
+s,@perl_bindir@,$perl_bindir,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..99f4e1c
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,48 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(Makefile.am)
+
+AC_DEFUN(AC_FIND_PROGRAM,
+[
+$3=""
+for i in $2; do
+ for j in $1; do
+ if test -x "$i/$j"; then
+ $3=$i
+ break 2
+ fi
+ done
+done
+])
+
+AM_INIT_AUTOMAKE(docbook-utils, 0.6.14)
+
+docdir='$(prefix)/doc'
+AC_SUBST(docdir)
+
+dnl Checks for programs.
+jade_bindirs="/usr/bin /usr/local/bin"
+AC_FIND_PROGRAM(nsgmls, $jade_bindirs, jade_bindir)
+AC_SUBST(jade_bindir)
+
+perl_bindirs="/usr/bin /usr/local/bin"
+AC_FIND_PROGRAM(perl, $perl_bindirs, perl_bindir)
+AC_SUBST(perl_bindir)
+
+dnl Checks for libraries.
+
+dnl Checks for header files.
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+
+dnl Checks for library functions.
+
+AC_OUTPUT(Makefile docbook-utils.spec \
+ bin/Makefile bin/jw bin/sgmldiff \
+ backends/Makefile backends/man backends/texi \
+ frontends/Makefile frontends/docbook \
+ helpers/Makefile \
+ doc/Makefile \
+ doc/version \
+ doc/refentry/Makefile \
+ doc/man/Makefile \
+ doc/HTML/Makefile)
diff --git a/doc/HTML/Makefile.am b/doc/HTML/Makefile.am
new file mode 100644
index 0000000..3a09b03
--- /dev/null
+++ b/doc/HTML/Makefile.am
@@ -0,0 +1,30 @@
+htmldir = $(docdir)/html/docbook-utils-@VERSION@
+html_DATA = api.html \
+ backend-spec.html \
+ docbook2man.html \
+ docbook2texi.html \
+ fdl.html \
+ frontend-spec.html \
+ helpers.html \
+ index.html \
+ introduction.html \
+ intro-jw.html \
+ intro-sgmldiff.html \
+ jw.html \
+ sgmldiff.html
+
+CLEANFILES=$(html_DATA)
+
+$(html_DATA): $(top_srcdir)/doc/docbook-utils.sgml \
+ $(top_srcdir)/docbook-utils.dsl ../version \
+ $(top_srcdir)/doc/refentry/jw.sgml \
+ $(top_srcdir)/doc/refentry/backend-spec.sgml \
+ $(top_srcdir)/doc/refentry/docbook2man-spec.pl.sgml \
+ $(top_srcdir)/doc/refentry/docbook2texi-spec.pl.sgml \
+ $(top_srcdir)/doc/refentry/frontend-spec.sgml \
+ $(top_srcdir)/doc/refentry/sgmldiff.sgml
+ SGML_CATALOG_FILES=/etc/sgml/catalog \
+ SGML_SEARCH_PATH=$(top_srcdir):$(top_srcdir)/doc:.. \
+ jade -t sgml -i html -d $(top_srcdir)/docbook-utils.dsl\#html \
+ -V '%use-id-as-filename%' $<
+
diff --git a/doc/HTML/Makefile.in b/doc/HTML/Makefile.in
new file mode 100644
index 0000000..609e641
--- /dev/null
+++ b/doc/HTML/Makefile.in
@@ -0,0 +1,306 @@
+# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = doc/HTML
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(mkdir_p)
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__installdirs = $(DESTDIR)$(htmldir)
+htmlDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(html_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+jade_bindir = @jade_bindir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+perl_bindir = @perl_bindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+htmldir = $(docdir)/html/docbook-utils-@VERSION@
+html_DATA = api.html \
+ backend-spec.html \
+ docbook2man.html \
+ docbook2texi.html \
+ fdl.html \
+ frontend-spec.html \
+ helpers.html \
+ index.html \
+ introduction.html \
+ intro-jw.html \
+ intro-sgmldiff.html \
+ jw.html \
+ sgmldiff.html
+
+CLEANFILES = $(html_DATA)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/HTML/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/HTML/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkdir_p) $(DESTDIR)$(htmldir)
+ @list='$(html_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(htmlDATA_INSTALL) $$d$$p $(DESTDIR)$(htmldir)/$$f"; \
+ $(htmlDATA_INSTALL) $$d$$p $(DESTDIR)$(htmldir)/$$f; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(htmldir)/$$f"; \
+ rm -f $(DESTDIR)$(htmldir)/$$f; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ $(mkdir_p) $(DESTDIR)$(htmldir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-htmlDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-htmlDATA uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-htmlDATA install-info install-info-am \
+ install-man install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+ uninstall-am uninstall-htmlDATA uninstall-info-am
+
+
+$(html_DATA): $(top_srcdir)/doc/docbook-utils.sgml \
+ $(top_srcdir)/docbook-utils.dsl ../version \
+ $(top_srcdir)/doc/refentry/jw.sgml \
+ $(top_srcdir)/doc/refentry/backend-spec.sgml \
+ $(top_srcdir)/doc/refentry/docbook2man-spec.pl.sgml \
+ $(top_srcdir)/doc/refentry/docbook2texi-spec.pl.sgml \
+ $(top_srcdir)/doc/refentry/frontend-spec.sgml \
+ $(top_srcdir)/doc/refentry/sgmldiff.sgml
+ SGML_CATALOG_FILES=/etc/sgml/catalog \
+ SGML_SEARCH_PATH=$(top_srcdir):$(top_srcdir)/doc:.. \
+ jade -t sgml -i html -d $(top_srcdir)/docbook-utils.dsl\#html \
+ -V '%use-id-as-filename%' $<
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..e7ee190
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,14 @@
+SUBDIRS = refentry man HTML
+
+EXTRA_DIST = docbook-utils.sgml
+
+install-data-local:
+ cd $(DESTDIR)/$(mandir)/man1 && ( \
+ ln -sf jw.1 docbook2dvi.1; \
+ ln -sf jw.1 docbook2html.1; \
+ ln -sf jw.1 docbook2man.1; \
+ ln -sf jw.1 docbook2pdf.1; \
+ ln -sf jw.1 docbook2ps.1; \
+ ln -sf jw.1 docbook2rtf.1; \
+ ln -sf jw.1 docbook2tex.1; \
+ ln -sf jw.1 docbook2texi.1)
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..3ed2703
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,409 @@
+# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/version.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(mkdir_p)
+CONFIG_CLEAN_FILES = version
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+jade_bindir = @jade_bindir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+perl_bindir = @perl_bindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = refentry man HTML
+EXTRA_DIST = docbook-utils.sgml
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+version: $(top_builddir)/config.status $(srcdir)/version.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if (etags --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ else \
+ include_option=--include; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || mkdir "$(distdir)/$$subdir" \
+ || exit 1; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="../$(top_distdir)" \
+ distdir="../$(distdir)/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+ clean clean-generic clean-recursive ctags ctags-recursive \
+ distclean distclean-generic distclean-recursive distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-exec install-exec-am install-info install-info-am \
+ install-man install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am
+
+
+install-data-local:
+ cd $(DESTDIR)/$(mandir)/man1 && ( \
+ ln -sf jw.1 docbook2dvi.1; \
+ ln -sf jw.1 docbook2html.1; \
+ ln -sf jw.1 docbook2man.1; \
+ ln -sf jw.1 docbook2pdf.1; \
+ ln -sf jw.1 docbook2ps.1; \
+ ln -sf jw.1 docbook2rtf.1; \
+ ln -sf jw.1 docbook2tex.1; \
+ ln -sf jw.1 docbook2texi.1)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/docbook-utils.sgml b/doc/docbook-utils.sgml
new file mode 100644
index 0000000..5d97d6d
--- /dev/null
+++ b/doc/docbook-utils.sgml
@@ -0,0 +1,605 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
+ <!ENTITY jw SYSTEM "refentry/jw.sgml">
+ <!ENTITY docbook2man SYSTEM "refentry/docbook2man-spec.pl.sgml">
+ <!ENTITY docbook2texi SYSTEM "refentry/docbook2texi-spec.pl.sgml">
+ <!ENTITY backend-spec SYSTEM "refentry/backend-spec.sgml">
+ <!ENTITY frontend-spec SYSTEM "refentry/frontend-spec.sgml">
+ <!ENTITY sgmldiff SYSTEM "refentry/sgmldiff.sgml">
+ <!ENTITY version SYSTEM "version">
+]>
+
+<book lang="en" id="docbook-utils">
+ <bookinfo>
+ <title>DocBook Utils</title>
+ <pubdate>18 June 2000</pubdate>
+
+ <legalnotice>
+ <para>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.1 or any later version published by the Free Software
+ Foundation. A copy of the license is included in the section
+ entitled "GNU Free Documentation License".</para>
+ </legalnotice>
+
+ <abstract>
+ <para>This documentation describes the DocBook-utils version
+ 0.2.</para>
+
+ <para>The DocBook-utils are a collection of various utilites to
+ convert and analyse SGML documents in general and DocBook files
+ in particular. They are developped by many authors and released
+ under GPL licence.</para>
+ </abstract>
+
+ <authorgroup>
+ <author>
+ <firstname>Eric</firstname> <surname>Bischoff</surname>
+ <affiliation>
+ <address><email>ebisch@cybercable.tm.fr</email></address>
+ </affiliation>
+ </author>
+ <author>
+ <firstname>Jochem</firstname> <surname>Huhmann</surname>
+ <affiliation>
+ <address><email>joh@revier.com</email></address>
+ </affiliation>
+ </author>
+ <author>
+ <firstname>Steve</firstname> <surname>Cheng</surname>
+ <affiliation>
+ <address><email>steve@ggi-project.org</email></address>
+ </affiliation>
+ </author>
+ <author>
+ <firstname>Frederik</firstname> <surname>Fouvry</surname>
+ <affiliation>
+ <address><email>fouvry@sfs.nphil.uni-tuebingen.de</email></address>
+ </affiliation>
+ </author>
+ </authorgroup>
+
+ </bookinfo>
+
+ <chapter id="introduction">
+ <docinfo>
+ <author>
+ <firstname>Eric</firstname> <surname>Bischoff</surname>
+ </author>
+ </docinfo>
+ <title>Introduction</title>
+
+ <para>The DocBook-utils are a collection of various utilites to
+ convert and analyse SGML documents in general and DocBook files
+ in particular. They are developped by many authors and released
+ under GPL licence.</para>
+
+ <para><ulink url="http://www.oasis-open.org/docbook/">DocBook</ulink>
+ is a SGML-based or XML-based standard for writing technical
+ documentation defined by the DocBook Technical Committee of the
+ OASIS consortium.</para>
+
+ <para>The DocBook-utils try to be as general as possible, and
+ therefore it is possible to use them with other SGML formats
+ than DocBook, like TEI or HTML. But each time there was an
+ opportunity to make them biased to DocBook to ease the life of
+ DocBook users, this opportunity has been given a higher priority
+ than generality considerations. This is why this package is not
+ called "SGML-utils".</para>
+
+ <para>The DocBook-utils are independant of any existing distribution
+ of SGML parsers and of DocBook resources. However, they conform
+ with the new draft on SGML and DocBook standardization being
+ discussed at Linux Standard Base project.</para>
+
+ <para>So far, the DocBook-utils only consist of:
+ <itemizedlist>
+ <listitem>
+ <para><application>jw</application>, a script used to convert
+ from DocBook or other SGML formats into "classical" file
+ formats like HTML, man, info, RTF...</para>
+ </listitem>
+ <listitem>
+ <para><application>sgmldiff</application>, a script used to
+ compare the markup of a SGML file with its translation into
+ another language.</para>
+ </listitem>
+ </itemizedlist>
+ but we would like to see them accomplish other tasks in the future:
+ <itemizedlist>
+ <listitem>
+ <para>Conversion from "legacy" formats like LinuxDoc, man,
+ info, HTML or PDF into DocBook.</para>
+ </listitem>
+ <listitem>
+ <para>Refined analysis of DocBook files like a "sgmlgrep"
+ program that would allow context-sensitive searchs.</para>
+ </listitem>
+ <listitem>
+ <para>Support for XML.</para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>If you want to help or keep informed of the latest developments,
+ please subscribe to the "docbook-utils@bazar.conectiva.com.br"
+ mailing list. This list has been set up to allow collaborative
+ development of these
+ tools.</para>
+
+ <note>
+ <simpara>To subscribe: Send a message to
+ <email>docbook-utils-subscribe@bazar.conectiva.com.br</email>
+ - you will get a confirmation message, just reply to it.</simpara>
+
+ <simpara>To unsubscribe: Send a message to
+ <email>docbook-utils-unsubscribe@bazar.conectiva.com.br</email>
+ and reply to the confirmation message</simpara>
+
+ <simpara>For any additional information, write to <ulink
+ url="mailto:godoy@conectiva.com.br">Jorge Godoy</ulink> who is
+ the maintainer of this list.</simpara>
+ </note>
+
+ </chapter>
+
+ <chapter id="intro-jw">
+ <docinfo>
+ <author>
+ <firstname>Jochem</firstname> <surname>Huhmann</surname>
+ </author>
+ </docinfo>
+ <title>jw</title>
+
+<sect1>
+<title>Command reference</title>
+
+ <para><citerefentry> <refentrytitle>jw</refentrytitle>
+ <manvolnum>1</manvolnum> </citerefentry> converts DocBook or other
+ SGML-based formats into "classical" file formats.</para>
+
+ <para>The modular architecture used by
+ <application>jw</application> allows to write plug-in
+ programs (we call them <firstterm>backends</firstterm> and
+ <firstterm>frontends</firstterm>). The backends are specific to
+ output formats while the frontends are specific to input formats. We
+ would like to encourage you to write such programs and to submit
+ them to the docbook-utils project.</para>
+
+ <para>While most backends are based on Jame's Clark Jade, or its
+ OpenJade alternative, some of the backends make use of the programs
+ from the <firstterm>docbook2X</firstterm> project. We call these
+ <firstterm>helper</firstterm> programs.</para>
+
+&jw;
+
+</sect1>
+
+ <sect1 id="helpers">
+ <sect1info>
+ <author>
+ <firstName>Steve</firstname> <surname>Cheng</surname>
+ </author>
+ </sect1info>
+ <title>Helper programs</title>
+
+ <para><firstterm>docbook2X</firstterm> is the collective name for a
+ bunch of tools for converting DocBook documents into the traditional
+ Unix documentation formats: <application>roff -man</application>
+ pages and <application>Texinfo</application>. Currently the formaters
+ are implemented as Perl SGMLSpm spec files.</para>
+
+ <para>The <ulink URL="docbook2X.tar.gz">latest version of
+ docbook2X</ulink> is available as a tarball. It also includes example
+ SGML documents for testing. For other examples, please see the
+ <ulink URL="ftp://ftp.ggi-project.org/pub/ggi/doc/"> documentation
+ at the GGI Project</ulink>.</para>
+
+&docbook2man;
+
+&docbook2texi;
+
+ </sect1>
+
+ <sect1 id="api">
+ <title>Application programming interface</title>
+
+ <para>The backends and the frontends use an application
+ programming interface (<acronym>API</acronym>) that is described
+ in <citerefentry> <refentrytitle>backend-spec</refentrytitle>
+ <manvolnum>7</manvolnum> </citerefentry> and in
+ <citerefentry> <refentrytitle>frontend-spec</refentrytitle>
+ <manvolnum>7</manvolnum> </citerefentry>. Be aware that, since
+ these specifications should be treated as first drafts, they might
+ change anytime.</para>
+
+&backend-spec;
+
+&frontend-spec;
+
+ </sect1>
+ </chapter>
+
+ <chapter id="intro-sgmldiff">
+ <docinfo>
+ <author>
+ <firstname>Frederik</firstname> <surname>Fouvry</surname>
+ </author>
+ </docinfo>
+ <title>sgmldiff</title>
+
+ <para><citerefentry> <refentrytitle>sgmldiff</refentrytitle>
+ <manvolnum>1</manvolnum> </citerefentry> compares two SGML files
+ taking only the markup into account, thus allowing to see if the
+ translation of an SGML file has been left unchanged during its
+ translation.</para>
+
+&sgmldiff;
+
+ </chapter>
+
+ <chapter id="fdl">
+ <title>GNU Free Documentation License</title>
+
+ <para>
+ <literallayout>
+ GNU Free Documentation License
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http:///www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+ </literallayout>
+ </para>
+ </chapter>
+</book>
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
new file mode 100644
index 0000000..6ae3373
--- /dev/null
+++ b/doc/man/Makefile.am
@@ -0,0 +1,16 @@
+man1dir = $(mandir)/man1
+man1_MANS = jw.1 docbook2man-spec.pl.1 docbook2texi-spec.pl.1 sgmldiff.1
+
+man7dir = $(mandir)/man7
+man7_MANS = backend-spec.7 frontend-spec.7
+
+EXTRA_DIST=$(man1_MANS) $(man7_MANS)
+
+CLEANFILES=$(man1_MANS) $(man7_MANS) manpage.*
+
+$(man1_MANS) $(man7_MANS): $(top_srcdir)/doc/docbook-utils.sgml \
+ $(top_srcdir)/helpers/docbook2man-spec.pl
+ SGML_CATALOG_FILES=/etc/sgml/catalog \
+ SGML_SEARCH_PATH=$(top_srcdir)/doc:.. \
+ nsgmls $< | \
+ sgmlspl $(top_srcdir)/helpers/docbook2man-spec.pl
diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in
new file mode 100644
index 0000000..b408285
--- /dev/null
+++ b/doc/man/Makefile.in
@@ -0,0 +1,365 @@
+# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = doc/man
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(mkdir_p)
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__installdirs = $(DESTDIR)$(man1dir) $(DESTDIR)$(man7dir)
+NROFF = nroff
+MANS = $(man1_MANS) $(man7_MANS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+jade_bindir = @jade_bindir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+perl_bindir = @perl_bindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+man1dir = $(mandir)/man1
+man1_MANS = jw.1 docbook2man-spec.pl.1 docbook2texi-spec.pl.1 sgmldiff.1
+man7dir = $(mandir)/man7
+man7_MANS = backend-spec.7 frontend-spec.7
+EXTRA_DIST = $(man1_MANS) $(man7_MANS)
+CLEANFILES = $(man1_MANS) $(man7_MANS) manpage.*
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/man/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/man/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ $(mkdir_p) $(DESTDIR)$(man1dir)
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ done
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ done
+install-man7: $(man7_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ $(mkdir_p) $(DESTDIR)$(man7dir)
+ @list='$(man7_MANS) $(dist_man7_MANS) $(nodist_man7_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.7*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 7*) ;; \
+ *) ext='7' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man7dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man7dir)/$$inst; \
+ done
+uninstall-man7:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man7_MANS) $(dist_man7_MANS) $(nodist_man7_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.7*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 7*) ;; \
+ *) ext='7' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man7dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man7dir)/$$inst; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(MANS)
+installdirs:
+ $(mkdir_p) $(DESTDIR)$(man1dir) $(DESTDIR)$(man7dir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man: install-man1 install-man7
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-man
+
+uninstall-man: uninstall-man1 uninstall-man7
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-man1 install-man7 install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
+ uninstall-man uninstall-man1 uninstall-man7
+
+
+$(man1_MANS) $(man7_MANS): $(top_srcdir)/doc/docbook-utils.sgml \
+ $(top_srcdir)/helpers/docbook2man-spec.pl
+ SGML_CATALOG_FILES=/etc/sgml/catalog \
+ SGML_SEARCH_PATH=$(top_srcdir)/doc:.. \
+ nsgmls $< | \
+ sgmlspl $(top_srcdir)/helpers/docbook2man-spec.pl
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/man/backend-spec.7 b/doc/man/backend-spec.7
new file mode 100644
index 0000000..c32b056
--- /dev/null
+++ b/doc/man/backend-spec.7
@@ -0,0 +1,64 @@
+.\" This manpage has been automatically generated by docbook2man
+.\" from a DocBook document. This tool can be found at:
+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
+.\" Please send any bug reports, improvements, comments, patches,
+.\" etc. to Steve Cheng <steve@ggi-project.org>.
+.TH "BACKEND-SPEC" "7" "11 February 2004" "" ""
+
+.SH NAME
+backend-spec \- interface between jw and its backends
+.SH "DESCRIPTION"
+.PP
+\fBjw\fR(1) calls backends like
+\fIbackends/html\fR to do the "real" conversion
+work. The backend gets all necessary data delivered
+via environment variables ready to use.
+.PP
+This documentation describes those environment variables.
+.PP
+The backend is run in the directory where the output
+files are to be created. It should return 0 if there weren't any problem,
+and return a positive value otherwise.
+.SH "VARIABLES"
+.TP
+\fB SGML_FILE_NAME \fR
+The bare name of the source file
+.PP
+.TP
+\fB SGML_FILE \fR
+The full name and path of the source file
+.PP
+.TP
+\fB SGML_JADE \fR
+The name of the parser (usually
+\fBJade\fR or
+\fBOpenJade\fR)
+.PP
+.TP
+\fB SGML_ARGUMENTS \fR
+The full argument-string for
+\fBJade\fR or
+\fBOpenJade\fR
+.PP
+.TP
+\fB SGML_CATALOG_FILES \fR
+The list of catalog files needed by
+\fBJade\fR or
+\fBOpenJade\fR
+.PP
+.TP
+\fB SGML_STYLESHEET \fR
+The style sheet to use
+.PP
+.TP
+\fB SGML_BASE_DIR \fR
+The base directory of the SGML system (default is
+\fI/usr/share/sgml\fR)
+.SH "FILES"
+.PP
+.SH "SEE ALSO"
+.PP
+\fBfrontend-spec\fR(7)
+.SH "AUTHORS"
+.PP
+Jochem Huhmann <joh@revier.com>
diff --git a/doc/man/docbook2man-spec.pl.1 b/doc/man/docbook2man-spec.pl.1
new file mode 100644
index 0000000..014c942
--- /dev/null
+++ b/doc/man/docbook2man-spec.pl.1
@@ -0,0 +1,100 @@
+.\" This manpage has been automatically generated by docbook2man
+.\" from a DocBook document. This tool can be found at:
+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
+.\" Please send any bug reports, improvements, comments, patches,
+.\" etc. to Steve Cheng <steve@ggi-project.org>.
+.TH "DOCBOOK2MAN-SPEC.PL" "1" "11 February 2004" "" ""
+
+.SH NAME
+docbook2man-spec.pl \- convert DocBook RefEntries to man pages
+.SH SYNOPSIS
+
+\fBsgmlspl\fR \fBdocbook2man-spec.pl\fR
+
+
+\fBnsgmls\fR [ \fB\fIsgml document\fB\fR ]\fB| sgmlspl\fR \fBdocbook2man-spec.pl\fR
+
+.SH "DESCRIPTION"
+.PP
+\fBdocbook2man\fR is a sgmlspl spec file that produced man
+pages (using the -man macros) from DocBook RefEntry markup.
+.PP
+The program reads ESIS produced by nsgmls (or other SGML parsers) from
+standard input. Markup not found in RefEntry is discarded.
+.PP
+Its output, the converted man pages, are written to the current directory. If
+RefMeta information is not specified in a
+RefEntry, then the man page will be written to standard
+output.
+.PP
+The file \fImanpage.links\fR will also be created, which contains
+any aliases of the manpages generated. This file is in the format:
+
+.nf
+\fI<man page>\fR \fI<alias
+manpage>\fR
+.fi
+.PP
+The \fImanpage.refs\fR file keeps track of
+XRef references. Note that if the input document has any
+forward references, then \fBdocbook2man\fR may have to be
+invoked twice (the first time updating \fImanpage.refs\fR) to
+resolve them.
+.SH "REQUIREMENTS"
+
+The SGMLSpm package from CPAN. This package includes the sgmlspl script
+that is also needed.
+.SH "LIMITATIONS"
+.PP
+Trying \fBdocbook2man\fR on non-DocBook or non-conformant
+SGML results in undefined behavior. :-)
+.PP
+This program is a slow, dodgy Perl script.
+.PP
+This program does not come close to supporting all the possible markup
+in DocBook, and may produce wrong output in some cases with supported
+markup.
+.SH "TO DO"
+.PP
+Obvious stuff:
+.TP 0.2i
+\(bu
+Fix \fBdocbook2man\fR breakages found in
+the test documents, especially
+\fIweird.sgml\fR\&.
+.TP 0.2i
+\(bu
+Add new element handling and fix existing handling.
+Be robust.
+.TP 0.2i
+\(bu
+Produce cleanest, readable man output as possible (unlike some
+other converters). Follow Linux
+\fBman\fR(7)
+convention. As conversion to man pages is usually not done very often, it is
+better to be slower/more complicated than to produce wrong output. Also if
+someone wants to give up using DocBook for whatever reason, the last-converted
+man pages can then be maintained manually.
+.TP 0.2i
+\(bu
+Make it faster. I think most of the speed problems so far is with parsing
+ESIS. Rewrite \fISGMLS.pm\fR with C and/or get input directly
+from \fBSP\fR\&.
+.TP 0.2i
+\(bu
+Support other (human) languages. But what to do with non-ASCII charsets?
+SGMLSpm doesn't report them and \fBroff\fR does not grok them.
+[Comment: text after enclosed lists (and SS blocks) will break docbook2man]
+If we do this, more people can use DocBook.
+.SH "COPYRIGHT"
+.PP
+Copyright (C) 1998-1999 Steve Cheng <steve@ggi-project.org>
+.PP
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+.PP
+You should have received a copy of the GNU General Public License along with
+this program; see the file \fICOPYING\fR\&. If not, please write
+to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/doc/man/docbook2texi-spec.pl.1 b/doc/man/docbook2texi-spec.pl.1
new file mode 100644
index 0000000..9661ab5
--- /dev/null
+++ b/doc/man/docbook2texi-spec.pl.1
@@ -0,0 +1,91 @@
+.\" This manpage has been automatically generated by docbook2man
+.\" from a DocBook document. This tool can be found at:
+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
+.\" Please send any bug reports, improvements, comments, patches,
+.\" etc. to Steve Cheng <steve@ggi-project.org>.
+.TH "DOCBOOK2TEXI-SPEC.PL" "1" "11 February 2004" "" ""
+
+.SH NAME
+docbook2texi-spec.pl \- convert DocBook Booksto Texinfo documents
+.SH SYNOPSIS
+
+\fBsgmlspl\fR \fBdocbook2man-spec.pl\fR
+
+
+\fBnsgmls\fR [ \fB\fIsgml document\fB\fR ]\fB| sgmlspl\fR \fBdocbook2texi-spec.pl\fR [ \fB\fIbasename\fB\fR ]
+
+.SH "DESCRIPTION"
+.PP
+\fBdocbook2texi\fR is a sgmlspl spec file that produces
+GNU Texinfo documents from DocBook documents.
+.PP
+The program reads ESIS produced by nsgmls (or other SGML parsers) from
+standard input. Currently the document element must be Book,
+otherwise the results are undefined.
+.PP
+Its output, the converted Texinfo document, is written to standard
+output.
+.PP
+The file \fIbasename.refs\fR will also
+be created, which contains all the nodes in the document and their immediate
+\&'child' nodes. As node processing always require forward references,
+\fBdocbook2texi\fR must be run twice for each document: the
+first time to build the references, and the second to actually generate a valid
+document.
+.SH "REQUIREMENTS"
+
+The SGMLSpm package from CPAN. This package includes the sgmlspl script
+that is also needed.
+.SH "LIMITATIONS"
+.PP
+Trying \fBdocbook2man\fR on non-DocBook or non-conformant
+SGML results in undefined behavior. :-)
+.PP
+This program is a slow, dodgy Perl script.
+.PP
+This program does not come close to supporting all the possible markup
+in DocBook, and may produce wrong output in some cases with supported
+markup.
+.SH "TO DO"
+.TP 0.2i
+\(bu
+How the hell do you represent a backslash (\\) in Texinfo!!@?
+I've tried \\\\ but TeX complains about it.
+.TP 0.2i
+\(bu
+Fix breakages found in the test documents.
+.TP 0.2i
+\(bu
+Add new element handling and fix existing handling.
+Be robust.
+.TP 0.2i
+\(bu
+Make it faster. I think most of the speed problems so far is with parsing
+ESIS. Rewrite \fISGMLS.pm\fR with C and/or get input directly
+from \fBSP\fR\&.
+.TP 0.2i
+\(bu
+There are some dependencies on elements occurring when they are actually
+optional (according to the DTD). We need to fix that (preferably) or
+prominently state the requirements.
+.TP 0.2i
+\(bu
+Allow other more common document elements.
+.TP 0.2i
+\(bu
+Separate out node referencing to a separate script. Not only would it
+make it faster/easier to maintain because it's separate from the main
+code, but also I would like it to evolve into an automatic DocBook
+ToC generator.
+.SH "COPYRIGHT"
+.PP
+Copyright (C) 1998-1999 Steve Cheng <steve@ggi-project.org>
+.PP
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+.PP
+You should have received a copy of the GNU General Public License along with
+this program; see the file \fICOPYING\fR\&. If not, please write
+to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/doc/man/frontend-spec.7 b/doc/man/frontend-spec.7
new file mode 100644
index 0000000..1f30551
--- /dev/null
+++ b/doc/man/frontend-spec.7
@@ -0,0 +1,103 @@
+.\" This manpage has been automatically generated by docbook2man
+.\" from a DocBook document. This tool can be found at:
+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
+.\" Please send any bug reports, improvements, comments, patches,
+.\" etc. to Steve Cheng <steve@ggi-project.org>.
+.TH "FRONTEND-SPEC" "7" "11 February 2004" "" ""
+
+.SH NAME
+frontend-spec \- interface between jw and its frontends
+.SH "DESCRIPTION"
+.PP
+\fBjw\fR(1) calls frontends like
+\fIfrontends/docbook\fR to get the informations
+specific to a given input format. The frontend knows which information
+to return from the first command line parameter. It gets all necessary
+data via environment variables ready to use.
+.PP
+This document describes that command line parameter and those
+environment variables.
+.PP
+The frontend should return 0 if there weren't any problem,
+and return a positive value otherwise.
+.SH "VARIABLES"
+.TP
+\fB $1 \fR
+The command line parameter, specifying which information
+to return. It can take the following values:
+.RS
+.TP
+\fBcentralized-catalog\fR
+The frontend must return the DTD-specific
+centralized catalog name. Centralized catalogs normally
+reside in \fI/etc/sgml\fR and provide the
+location of all the catalog files useful for handling
+this input type (the catalog for the DTD, the catalog
+for the stylesheets, the catalog for the entities,
+...)
+.TP
+\fBstyle-sheet\fR
+The frontend must return the filename
+of the style sheet to be used for this document type and
+with the chosen backend.
+.RE
+.PP
+.TP
+\fB SGML_CATALOGS_DIR \fR
+The directory where the centralized catalogs reside. It is normally
+\fI/etc/sgml\fR\&.
+
+(This variable is valid only while determining
+the centralized catalog to use.)
+.PP
+.TP
+\fB SGML_BASE_DIR \fR
+The base directory of the SGML system. It is normally
+\fI/usr/share/sgml\fR\&.
+
+(This variable is valid only while determining
+the style sheet to use.)
+.PP
+.TP
+\fB SGML_FILE \fR
+The name of the file to convert.
+
+(This variable is valid only while determining
+the centralized catalog to use.)
+.PP
+.TP
+\fB SGML_TYPE \fR
+The type of the backend to use, whether it produces output
+files to be displayed online or to be printed out.
+It can take the value html or
+print\&.
+
+(This variable is valid only while determining
+the style sheet to use).
+.PP
+.TP
+\fB SGML_STYLESHEETS \fR
+The desired custom stylesheet type, either none
+or default\&.
+If none, the frontend must return the file name of
+the style sheet provided by the system beneath the docbook-utils.
+If default, the frontend must return the custom
+stylesheet provided by the docbook-utils.
+
+(This variable is valid only while determining
+the style sheet to use).
+.TP
+\fB SGML_XML \fR
+The metalanguage of the file to convert, either sgml
+or xml\&.
+
+(This variable is valid only while determining
+the centralized catalog to use).
+.SH "FILES"
+.PP
+.SH "SEE ALSO"
+.PP
+\fBbackend-spec\fR(7)
+.SH "AUTHORS"
+.PP
+Jochem Huhmann <joh@revier.com>
diff --git a/doc/man/jw.1 b/doc/man/jw.1
new file mode 100644
index 0000000..415fa5d
--- /dev/null
+++ b/doc/man/jw.1
@@ -0,0 +1,377 @@
+.\" This manpage has been automatically generated by docbook2man
+.\" from a DocBook document. This tool can be found at:
+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
+.\" Please send any bug reports, improvements, comments, patches,
+.\" etc. to Steve Cheng <steve@ggi-project.org>.
+.TH "JW" "1" "11 February 2004" "" ""
+
+.SH NAME
+jw, docbook2dvi, docbook2html, docbook2man, docbook2pdf, docbook2ps, docbook2rtf, docbook2tex, docbook2texi, docbook2txt \- (Jade Wrapper) converts SGML files to other formats
+.SH SYNOPSIS
+
+\fBjw\fR [ \fB-f
+\fIfrontend\fB\fR | \fB--frontend
+\fIfrontend\fB\fR ]
+ [ \fB-b
+\fIbackend\fB\fR | \fB--backend \fIbackend\fB\fR ]
+ [ \fB-c \fIfile\fB\fR | \fB--cat \fIfile\fB\fR ]
+ [ \fB-n\fR | \fB--nostd\fR ]
+ [ \fB-d
+\fIfile\fB|default|none\fR | \fB--dsl
+\fIfile\fB|default|none\fR ]
+ [ \fB-l \fIfile\fB\fR | \fB--dcl \fIfile\fB\fR ]
+ [ \fB-s \fIpath\fB\fR | \fB--sgmlbase \fIpath\fB\fR ]
+ [ \fB-p \fIprogram\fB\fR | \fB--parser \fIprogram\fB\fR ]
+ [ \fB-o \fIdirectory\fB\fR | \fB--output \fIdirectory\fB\fR ]
+ [ \fB-V
+\fIvariable\fB[=\fIvalue\fB]\fR ]
+ [ \fB-u\fR | \fB--nochunks\fR ] [ \fB-i \fIsection\fB\fR | \fB--include \fIsection\fB\fR ]
+ [ \fB-w \fItype\fB|list\fR | \fB--warning \fItype\fB|list\fR ]
+ [ \fB-e \fItype\fB|list\fR | \fB--error \fItype\fB|list\fR ]
+ [ \fB-h\fR | \fB--help\fR ] [ \fB-v\fR | \fB--version\fR ]
+ \fB\fISGML-file\fB\fR
+
+
+\fBdocbook2dvi\fR \fB\fISGML-file\fB\fR
+
+
+\fBdocbook2html\fR \fB\fISGML-file\fB\fR
+
+
+\fBdocbook2man\fR \fB\fISGML-file\fB\fR
+
+
+\fBdocbook2pdf\fR \fB\fISGML-file\fB\fR
+
+
+\fBdocbook2ps\fR \fB\fISGML-file\fB\fR
+
+
+\fBdocbook2rtf\fR \fB\fISGML-file\fB\fR
+
+
+\fBdocbook2tex\fR \fB\fISGML-file\fB\fR
+
+
+\fBdocbook2texi\fR \fB\fISGML-file\fB\fR
+
+
+\fBdocbook2txt\fR \fB\fISGML-file\fB\fR
+
+.SH "DESCRIPTION"
+.PP
+The \fBjw\fR shell script allows to
+convert a DocBook file (or some other SGML-based format) to
+other formats (including HTML, RTF, PS and PDF) with
+an easy-to-understand syntax. It hides most of Jade's
+or OpenJade complexity and adds comfortable features.
+.PP
+Other scripts like \fBdocbook2html\fR,
+\fBdocbook2rtf\fR or
+\fBdocbook2ps\fR provide different ways of
+calling \fBjw\fR that might be easier to
+remember.
+.PP
+For the moment, jw does not handle XML, but only SGML.
+.PP
+This utility assumes that several other components are
+installed. The list includes:
+.TP 0.2i
+\(bu
+the ISO character entities for SGML
+.TP 0.2i
+\(bu
+James Clark's DSSSL engine, jade, or an equivalent parser
+like OpenJade
+.TP 0.2i
+\(bu
+the DocBook DTD from the OASIS consortium
+.TP 0.2i
+\(bu
+Norman Walsh's DocBook modular style sheets (or some other
+set of DSSSL style sheets)
+.TP 0.2i
+\(bu
+Sebastian Rahtz's jadetex set of TeX macros for jade
+(for backends intended to "printing" formats like PDF, RTF or
+PostScript)
+.TP 0.2i
+\(bu
+A perl interpreter (for backends that use perl)
+.TP 0.2i
+\(bu
+SGMLSpm from CPAN (for backends that use sgmls)
+.TP 0.2i
+\(bu
+Lynx HTML browser (for the \fItxt\fR
+backend)
+.PP
+The jw script is basically called like this:
+
+.nf
+jw mydoc.sgml
+.fi
+.PP
+where \fImydoc.sgml\fR is a SGML file.
+.PP
+The command line above uses default options: it converts
+from DocBook (the default frontend) to HTML (the default backend),
+does not put the result in a subdirectory (unless specified
+otherwise in the style sheets), etc.
+.PP
+In this example, the "mydoc" file name as well as the ".sgml"
+extension can be replaced by anything else. Current extensions
+for SGML DocBook files include ".sgml", ".sgm", ".docbook", and
+".db". The processed file \fImydoc.sgml\fR can
+be in any other directory than the current one.
+.PP
+Here we have chosen to generate HTML output. In fact we can
+use any of the backends stored in the \fIbackends/\fR
+subdirectory of the DocBook-utils distribution directory (usually
+\fI/usr/share/sgml/docbook/utils-0.6.14\fR).
+Similarly, you can use any frontend defined in the
+\fIfrontends/\fR subdirectory to convert from another
+input format.
+.PP
+This sample command creates one or many HTML files with
+arbitrary file names in the current directory. This default behavior
+can be changed through command line options and/or customization
+style sheets.
+.SH "OPTIONS"
+.PP
+The following options apply to the conversion script:
+.TP
+\fB -f \fIfrontend\fB | --frontend \fIfrontend\fB \fR
+Allows to specify another frontend than default \fIdocbook\fR\&.
+The list of currently available frontends is:
+.RS
+.TP
+\fB\fIdocbook\fB\fR
+Converts docbook with Norman Walsh's
+style sheets. This frontend searches in the
+subdirectories of the base SGML directory for a
+file named \fIhtml/docbook.dsl\fR or
+\fIprint/docbook.dsl\fR (depending on the
+backend's type: html or print).
+.RE
+.TP
+\fB -b \fIbackend\fB | --backend \fIbackend\fB \fR
+Allows to specify another backend than default
+\fIHTML\fR\&. The list of currently available
+backends is:
+.RS
+.TP
+\fB\fIdvi\fB\fR
+Converts to DVI (DeVice Independant
+files) by calling \fBJade\fR or
+\fBOpenJade\fR\&.
+.TP
+\fB\fIhtml\fB\fR
+Converts to HTML (HyperText Markup
+Language) by calling \fBJade\fR
+or \fBOpenJade\fR\&.
+.TP
+\fB\fIman\fB\fR
+Converts a refentry to a Unix manual page
+by calling docbook2man. Does not work with other SGML
+document types than DocBook.
+.TP
+\fB\fIpdf\fB\fR
+Converts to PDF (Portable Document
+Format) by calling \fBJade\fR or
+\fBOpenJade\fR\&.
+.TP
+\fB\fIps\fB\fR
+Converts to PostScript by
+calling \fBJade\fR or
+\fBOpenJade\fR\&.
+.TP
+\fB\fIrtf\fB\fR
+Converts to RTF (Rich Text Format)
+by calling \fBJade\fR or
+\fBOpenJade\fR\&. The resulting file can
+then be inported into \fBMS Word\fR
+or one of its Linux replacement programs.
+.TP
+\fB\fItex\fB\fR
+Converts to TeX by calling \fBJade\fR or
+\fBOpenJade\fR\&.
+.TP
+\fB\fItexi\fB\fR
+Converts to GNU TeXinfo pages by calling
+docbook2texi. Does not work with other SGML document types
+than DocBook.
+.TP
+\fB\fItxt\fB\fR
+Converts to a bare text file
+by calling \fBJade\fR
+or \fBOpenJade\fR, then
+\fBLynx\fR\&.
+.RE
+.TP
+\fB -c \fIfile\fB | --cat \fIfile\fB \fR
+Allows to use an extra SGML Open Catalog that will list
+other files like customization style sheets, adaptations to the
+DocBook Document Type Definition, special character entities,
+etc. This catalog is added to the list of catalogs determined
+by the script (see option \fB--nostd\fR below)
+.TP
+\fB -n | --nostd \fR
+Do not use the standard SGML Open Catalogs. Normally,
+the standard catalogs list is determined like this:
+.RS
+.TP 0.2i
+\(bu
+if the centralized catalog exists, then
+use it. The centralized catalog is a list of all
+catalogs that might be necessary that usually
+resides in \fI/etc/sgml\fR\&. Its
+name is provided by the frontend, for example
+the \fIdocbook\fR frontend returns
+\fI/etc/sgml/sgml-docbook.cat\fR\&.
+.TP 0.2i
+\(bu
+Otherwise, take all the files
+named \fIcatalog\fR from the
+subdirectories of the SGML base directory (usually
+\fI/usr/share/sgml\fR).
+.RE
+This option is useful in conjunction with the
+\fB--cat\fR option to use only the catalogs that
+are specified on the command line.
+.TP
+\fB -d \fIfile\fB|default|none | --dsl \fIfile\fB|default|none \fR
+Allows to use a customized style sheet instead
+of the default one.
+
+A "target" starting with a hash mark "#" can be appended
+to the file name. As a result, only the corresponding part
+of the style sheet is executed (the "style specification" whose
+"identificator" is equal to the target's name). A common use of this
+mechanism is to define "#html" and "#print" targets to trigger
+the corresponding part of a replacement style sheet which is
+common for both HTML and printout conversion.
+
+By replacing the file name with "default", the default
+style sheet provided with the frontend is used. For example, the
+\fIdocbook\fR frontend returns
+\fI\&./docbook.dsl#html\fR (or
+\fI\&./docbook.dsl#print\fR) in the SGML base
+directory.
+
+By replacing the file name with "none", no replacement
+style sheet is used, not even the default style sheet. The style
+sheet which is used is also determined by the frontend. For
+example, the \fIdocbook\fR frontend returns
+Norman Walsh's \fIhtml/docbook.dsl\fR (or
+\fIprint/docbook.dsl\fR) found somewhere below
+the SGML base directory.
+
+If no --dsl option is specified, then "--dsl default" is
+used.
+.TP
+\fB -l \fIfile\fB | --dcl \fIfile\fB \fR
+Allows to use a customized SGML declaration instead
+of the default one. The file name of the default SGML
+declaration is not set for SGML files, and is set to
+\fIxml.dcl\fR in the SGML base directory
+for XML files.
+.TP
+\fB -s \fIpath\fB | --sgmlbase \fIpath\fB \fR
+Allows to use another location for the SGML base
+directory. This is the directory below which all SGML DTDs,
+style sheets, entities, etc are installed. The default value
+is \fI/usr/share/sgml\fR\&.
+.TP
+\fB -p \fIprogram\fB | --parser \fIprogram\fB \fR
+Specify the parser to use (\fBJade\fR
+or \fBOpenJade\fR) if several
+are installed. If this option is not specified,
+the script first tries to use Jade, then it tries
+\fBOpenJade\fR\&.
+.TP
+\fB -o \fIdirectory\fB | --output \fIdirectory\fB \fR
+Set output directory where all the resulting files will
+be stored. If the style sheets define a subdirectory where to
+store the resulting files too, the subdirectory defined by the
+style sheets will be placed below the subdirectory defined by
+this option.
+.TP
+\fB -V \fIvariable\fB=[\fIvalue\fB] \fR
+Set a variable (to a value, if one is specified).
+.TP
+\fB -u | --nochunks \fR
+Output only one big file. This option is useful only
+when generating HTML, because the output can be split into
+several files. This option overrides the setting that may be
+done in the style sheets.
+.TP
+\fB -i \fIsection\fB | --include \fIsection\fB \fR
+Declare a SGML marked section as "include". A SGML marked
+section is a kind of conditional part of a document. If it is
+declared "ignore", it will be left ignored, otherwise it will
+be processed. An example of such a marked section would be:
+.PP
+.PP
+
+.nf
+ <DOCTYPE mydoc [
+ <!ENTITY % confidential "ignore">
+ ]>
+ <mydoc>
+ ...
+ <![ %confidential [ Some confidential text... ]]>
+ ...
+ </mydoc>
+
+.fi
+.TP
+\fB -w \fItype\fB|list | --warning \fItype\fB|list \fR
+Enables or disables the display of given types of warnings.
+Several -w options might be entered on the command line.
+Warning types that start with "no-" disable the corresponding
+warnings, the other types enable them.
+
+If the warning type is replaced with "list", then
+a list of allowed warning types is displayed.
+.TP
+\fB -e \fItype\fB|list | --error \fItype\fB|list \fR
+Disables given types of errors.
+Several -e options might be entered on the command line.
+All error types start with "no-".
+
+If the error type is replaced with "list", then
+a list of allowed error types is displayed.
+.TP
+\fB -h | --help \fR
+Print a short help message and exit
+.TP
+\fB -v | --version \fR
+Print the version identifier and exit
+.SH "FILES"
+.TP
+\fB\fI/etc/sgml/sgml-docbook.cat\fB\fR
+Centralized SGML open catalog. This file name might
+vary if another frontend than \fIdocbook\fR
+is used.
+.TP
+\fB\fI/usr/share/sgml/docbook/utils-0.6.14/backends\fB\fR
+The various backends
+.TP
+\fB\fI/usr/share/sgml/docbook/utils-0.6.14/frontends\fB\fR
+The various frontends
+.TP
+\fB\fI/usr/share/sgml/docbook/utils-0.6.14/helpers\fB\fR
+The various helper scripts like docbook2man or docbook2texi
+.SH "AUTHORS"
+.PP
+Eric Bischoff (jw shell script and a few backends),
+Jochem Huhmann (the \fIman\fR and
+\fItexi\fR backends)
+.SH "SEE ALSO"
+.PP
+\fBdocbook2man-spec.pl\fR(1),
+\fBdocbook2texi-spec.pl\fR(1),
+\fBinstall-catalog\fR(8),
+\fBnsgmls\fR(1), docbook-utils
+homepage <URL:http://sources.redhat.com/docbook-tools/>\&.
diff --git a/doc/man/sgmldiff.1 b/doc/man/sgmldiff.1
new file mode 100644
index 0000000..213f1af
--- /dev/null
+++ b/doc/man/sgmldiff.1
@@ -0,0 +1,123 @@
+.\" This manpage has been automatically generated by docbook2man
+.\" from a DocBook document. This tool can be found at:
+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
+.\" Please send any bug reports, improvements, comments, patches,
+.\" etc. to Steve Cheng <steve@ggi-project.org>.
+.TH "SGMLDIFF" "1" "11 February 2004" "" ""
+
+.SH NAME
+sgmldiff \- Find differences in the markup of two SGML files
+.SH SYNOPSIS
+
+\fBsgmldiff\fR [ \fBoptions \fR\fI ...\fR ] \fB\fIfile1\fB\fR \fB\fIfile2\fB\fR [ \fB-a\fR | \fB--attributes\fR
+ | \fB-c [ attributes | nesting | textpos ]\fR | \fB--context [ attributes | nesting | textpos ]\fR
+ | \fB-s\fR | \fB--statistics\fR
+ | \fB-h\fR | \fB--help\fR
+ | \fB-v\fR | \fB--version\fR ]
+
+.SH "DESCRIPTION"
+.PP
+This perl script allows to determine the structural differences
+between two SGML files. It compares the files, regardless of what
+is in between the tags, to only focus on the markup. Its output
+is similar to \fBdiff\fR(1)\&.
+.PP
+The typical use of \fBsgmldiff\fR is to
+compare an SGML file with its translation into another language. If
+the translation was done cleanly, \fBsgmldiff\fR
+returns without finding any difference in the markup.
+.PP
+An example of a typical call to sgmldiff is:
+
+.nf
+ sgmldiff english.sgml italiano.sgml
+
+.fi
+.PP
+If there are differences in markup between both files,
+\fBsgmldiff\fR will output a series of differences
+reports summarized with lines of the form:
+.TP
+\fB169a164\fR
+At line 169 of the first file, line 164 of the
+second file has been added.
+.TP
+\fB8a12,15\fR
+At line 8 of the first file, lines 12 to 15
+of the second file have been added.
+.TP
+\fB41d28\fR
+Line 41 of the first file has been destroyed, to
+obtain line 28 of the second file.
+.TP
+\fB63,66d61\fR
+Lines 63 to 66 of the first file have been
+destroyed. to obtain line 61 of the second file.
+.TP
+\fB52c51\fR
+Line 52 of the first file has been changed into
+line 51 of the second file.
+.TP
+\fB5,7c8,10\fR
+Lines 5 to 7 of the first file have been changed
+into lines 8 to 10 of the second line.
+In addition to those summaries, the lines of the first file are
+shown preceeded by '<' and the lines of the second file are
+shown preceeded by '>".
+.SH "OPTIONS"
+.PP
+Here is the list of actions that can be requested to
+sgmldiff:
+.TP
+\fB [ -a | --attributes ] \fR
+Include the attribute values in the difference tests.
+Don't set this value if the attributes are likely to be
+translated. Set this value if the attributes value shouldn't
+change between both files. Default is to don't include the
+attributes in the difference tests.
+.TP
+\fB [ -c [ attributes | nesting | textpos ] | --context [ attributes | nesting | textpos ] ] \fR
+Add more context to the difference. Since every test between the tags is removed before testing the differences, \fBsgmldiff\fR is likely to resynchronize itself at the wrong place, by thinking the location in both files correspond, while it's not true. By adding more context to the compared area, such risk is disminished.
+
+The allowed values for the \fB--context\fR option are:
+.RS
+.TP
+\fBattributes\fR
+Take into account the attribute
+\fBnames\fR\&. The attribute
+\fBvalues\fR are controlled by the
+\fBattributes\fR option.
+.TP
+\fBnesting\fR
+Take into account the nesting level of all the compared tags.
+.TP
+\fBtextpos\fR
+Take into account the position in the text.
+.RE
+.TP
+\fB [ -s | --statistics ] \fR
+Print some SGML information at the end.
+.TP
+\fB [ -h | --help ] \fR
+Print a short help message and exit
+.TP
+\fB [ -v | --version ] \fR
+Print the version identifier and exit
+.SH "FILES"
+.PP
+.SH "AUTHORS"
+.TP
+\fB Frederik Fouvry \fR
+Developer of \fBsgmldiff\fR\&.
+.SH "SEE ALSO"
+.TP
+\fB jw(1) \fR
+conversion from a SGML file to other file formats
+.TP
+\fB nsgmls(1) \fR
+a base component of \fBJade\fR DSSSL engine
+.TP
+\fB http://sources.redhat.com/docbook-tools/ <URL:http://sources.redhat.com/docbook-tools/> \fR
+the home page of the DocBook tools, a compendium of
+all tools necessary to process DocBook files, including
+the DocBook-utils
diff --git a/doc/refentry/Makefile.am b/doc/refentry/Makefile.am
new file mode 100644
index 0000000..d71ef38
--- /dev/null
+++ b/doc/refentry/Makefile.am
@@ -0,0 +1,2 @@
+EXTRA_DIST = backend-spec.sgml docbook2man-spec.pl.sgml docbook2texi-spec.pl.sgml \
+ frontend-spec.sgml jw.sgml sgmldiff.sgml
diff --git a/doc/refentry/Makefile.in b/doc/refentry/Makefile.in
new file mode 100644
index 0000000..9efa57e
--- /dev/null
+++ b/doc/refentry/Makefile.in
@@ -0,0 +1,257 @@
+# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = doc/refentry
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(mkdir_p)
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+jade_bindir = @jade_bindir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+perl_bindir = @perl_bindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+EXTRA_DIST = backend-spec.sgml docbook2man-spec.pl.sgml docbook2texi-spec.pl.sgml \
+ frontend-spec.sgml jw.sgml sgmldiff.sgml
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/refentry/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/refentry/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/refentry/backend-spec.sgml b/doc/refentry/backend-spec.sgml
new file mode 100644
index 0000000..4ca8976
--- /dev/null
+++ b/doc/refentry/backend-spec.sgml
@@ -0,0 +1,162 @@
+<refentry id="backend-spec">
+ <docinfo>
+ <author>
+ <firstname>Jochem</firstname> <surname>Huhmann</surname>
+ <affiliation>
+ <address><email>joh@revier.com</email></address>
+ </affiliation>
+ </author>
+ </docinfo>
+ <refmeta>
+ <refentrytitle>backend-spec</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>backend-spec</refname>
+ <refpurpose>interface between jw and its backends</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><citerefentry> <refentrytitle>jw</refentrytitle>
+ <manvolnum>1</manvolnum> </citerefentry> calls backends like
+ <filename>backends/html</filename> to do the "real" conversion
+ work. The backend gets all necessary data delivered
+ via environment variables ready to use.</para>
+
+ <para>This documentation describes those environment variables.</para>
+
+ <para>The backend is run in the directory where the output
+ files are to be created. It should return 0 if there weren't any problem,
+ and return a positive value otherwise.</para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Variables</title>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_FILE_NAME</envar>
+ </glossterm>
+ <glossdef>
+ <para>The bare name of the source file</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_FILE</envar>
+ </glossterm>
+ <glossdef>
+ <para>The full name and path of the source file</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_JADE</envar>
+ </glossterm>
+ <glossdef>
+ <para>The name of the parser (usually
+ <application>Jade</application> or
+ <application>OpenJade</application>)</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_ARGUMENTS</envar>
+ </glossterm>
+ <glossdef>
+ <para>The full argument-string for
+ <application>Jade</application> or
+ <application>OpenJade</application></para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_CATALOG_FILES</envar>
+ </glossterm>
+ <glossdef>
+ <para>The list of catalog files needed by
+ <application>Jade</application> or
+ <application>OpenJade</application></para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_STYLESHEET</envar>
+ </glossterm>
+ <glossdef>
+ <para>The style sheet to use</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_BASE_DIR</envar>
+ </glossterm>
+ <glossdef>
+ <para>The base directory of the SGML system (default is
+ <filename>/usr/share/sgml</filename>)</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Files</title>
+
+ <para></para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>See also</title>
+
+ <para><citerefentry> <refentrytitle>frontend-spec</refentrytitle>
+ <manvolnum>7</manvolnum> </citerefentry></para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Authors</title>
+
+ <para>Jochem Huhmann <email>joh@revier.com</email></para>
+
+ </refsect1>
+
+
+</refentry>
+
diff --git a/doc/refentry/docbook2man-spec.pl.sgml b/doc/refentry/docbook2man-spec.pl.sgml
new file mode 100644
index 0000000..c1af972
--- /dev/null
+++ b/doc/refentry/docbook2man-spec.pl.sgml
@@ -0,0 +1,169 @@
+<RefEntry id="docbook2man">
+
+<RefMeta>
+<RefEntryTitle>docbook2man-spec.pl</RefEntryTitle>
+<ManVolNum>1</ManVolNum>
+</RefMeta>
+
+<RefNameDiv>
+<RefName>docbook2man-spec.pl</RefName>
+<RefPurpose>convert DocBook RefEntries to man pages</RefPurpose>
+</RefNameDiv>
+
+<RefSynopsisDiv>
+<CmdSynopsis>
+<Command>sgmlspl</command>
+<Arg choice=req>docbook2man-spec.pl</arg>
+</CmdSynopsis>
+
+<!-- docbook2man-spec.pl BREAKAGE HERE! -->
+
+<CmdSynopsis>
+<Command>nsgmls</command>
+<Arg><Replaceable>sgml document</replaceable></Arg>
+<Command>| sgmlspl</command>
+<Arg choice=req>docbook2man-spec.pl</arg>
+</CmdSynopsis>
+</RefSynopsisDiv>
+
+<RefSect1>
+<Title>Description</Title>
+
+<Para>
+<Application>docbook2man</application> is a sgmlspl spec file that produced man
+pages (using the -man macros) from DocBook RefEntry markup.
+</Para>
+
+<Para>
+The program reads ESIS produced by nsgmls (or other SGML parsers) from
+standard input. Markup not found in RefEntry is discarded.
+</Para>
+
+<Para>
+Its output, the converted man pages, are written to the current directory. If
+<SGMLTag>RefMeta</sgmltag> information is not specified in a
+<SGMLTag>RefEntry</sgmltag>, then the man page will be written to standard
+output.
+</Para>
+
+<Para>
+The file <Filename>manpage.links</filename> will also be created, which contains
+any aliases of the manpages generated. This file is in the format:
+
+<Synopsis>
+<Token><Replaceable>man page</replaceable></Token> <Token><Replaceable>alias
+manpage</replaceable></Token>
+</Synopsis>
+</Para>
+
+<Para>
+The <Filename>manpage.refs</filename> file keeps track of
+<SGMLTag>XRef</sgmltag> references. Note that if the input document has any
+forward references, then <Application>docbook2man</application> may have to be
+invoked twice (the first time updating <Filename>manpage.refs</filename>) to
+resolve them.
+</Para>
+
+</RefSect1>
+
+<RefSect1>
+<Title>Requirements</Title>
+
+<SimpleList>
+<Member>
+The SGMLSpm package from CPAN. This package includes the sgmlspl script
+that is also needed.
+</Member>
+</SimpleList>
+
+</RefSect1>
+
+
+<RefSect1>
+<Title>Limitations</Title>
+
+<Para>
+Trying <Application>docbook2man</application> on non-DocBook or non-conformant
+SGML results in undefined behavior. :-)
+</Para>
+
+<Para>
+This program is a slow, dodgy Perl script.
+</Para>
+
+<Para>
+This program does not come close to supporting all the possible markup
+in DocBook, and may produce wrong output in some cases with supported
+markup.
+</Para>
+
+</RefSect1>
+
+<RefSect1>
+<Title>To do</Title>
+
+<Para>
+Obvious stuff:
+
+<ItemizedList>
+
+<ListItem><Para> Fix <Application>docbook2man</application> breakages found in
+the test documents, especially
+<Filename>weird.sgml</filename>.</Para></ListItem>
+
+<ListItem><Para>
+Add new element handling and fix existing handling.
+Be robust.
+</Para></ListItem>
+
+<ListItem><Para> Produce cleanest, readable man output as possible (unlike some
+other converters). Follow Linux
+<CiteRefEntry><RefEntryTitle>man</refentrytitle><ManVolNum>7</manvolnum></CiteRefEntry>
+convention. As conversion to man pages is usually not done very often, it is
+better to be slower/more complicated than to produce wrong output. Also if
+someone wants to give up using DocBook for whatever reason, the last-converted
+man pages can then be maintained manually. </Para></ListItem>
+
+<ListItem>
+<Para>Make it faster. I think most of the speed problems so far is with parsing
+ESIS. Rewrite <Filename>SGMLS.pm</filename> with C and/or get input directly
+from <Application>SP</application>.
+</Para>
+</ListItem>
+
+<ListItem>
+<Para>Support other (human) languages. But what to do with non-ASCII charsets?
+SGMLSpm doesn't report them and <Application>roff</application> does not grok them.
+</Para></ListItem>
+
+</ItemizedList>
+
+<Comment>text after enclosed lists (and SS blocks) will break docbook2man</Comment>
+If we do this, more people can use DocBook.
+</Para>
+
+</RefSect1>
+
+<RefSect1>
+<Title>Copyright</Title>
+
+<Para>
+Copyright (C) 1998-1999 Steve Cheng <Email>steve@ggi-project.org</email>
+</Para>
+
+<Para>
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+</Para>
+
+<Para>
+You should have received a copy of the GNU General Public License along with
+this program; see the file <Filename>COPYING</filename>. If not, please write
+to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+</Para>
+
+</RefSect1>
+</RefEntry>
+
diff --git a/doc/refentry/docbook2texi-spec.pl.sgml b/doc/refentry/docbook2texi-spec.pl.sgml
new file mode 100644
index 0000000..e79d8df
--- /dev/null
+++ b/doc/refentry/docbook2texi-spec.pl.sgml
@@ -0,0 +1,171 @@
+<RefEntry id="docbook2texi">
+
+<RefMeta>
+<RefEntryTitle>docbook2texi-spec.pl</RefEntryTitle>
+<ManVolNum>1</ManVolNum>
+</RefMeta>
+
+<RefNameDiv>
+<RefName>docbook2texi-spec.pl</RefName>
+<RefPurpose>convert DocBook <SGMLTag>Book</sgmltag>s
+to <Application>Texinfo</application> documents</RefPurpose>
+</RefNameDiv>
+
+<RefSynopsisDiv>
+<CmdSynopsis>
+<Command>sgmlspl</command>
+<Arg choice=req>docbook2man-spec.pl</arg>
+</CmdSynopsis>
+
+<!-- docbook2man-spec.pl BREAKAGE HERE! -->
+
+<CmdSynopsis>
+<Command>nsgmls</command>
+<Arg><Replaceable>sgml document</replaceable></Arg>
+<Command>| sgmlspl</command>
+<Arg choice=req>docbook2texi-spec.pl</arg>
+<Arg><Replaceable>basename</replaceable></Arg>
+</CmdSynopsis>
+</RefSynopsisDiv>
+
+<RefSect1>
+<Title>Description</Title>
+
+<Para>
+<Application>docbook2texi</application> is a sgmlspl spec file that produces
+GNU Texinfo documents from DocBook documents.
+</Para>
+
+<Para>
+The program reads ESIS produced by nsgmls (or other SGML parsers) from
+standard input. Currently the document element must be <SGMLTag>Book</sgmltag>,
+otherwise the results are undefined.
+</Para>
+
+<Para>
+Its output, the converted Texinfo document, is written to standard
+output.
+</Para>
+
+<Para>
+The file <Filename><Replaceable>basename.refs</replaceable></Filename> will also
+be created, which contains all the nodes in the document and their immediate
+'child' nodes. As node processing always require forward references,
+<Application>docbook2texi</application> must be run twice for each document: the
+first time to build the references, and the second to actually generate a valid
+document.
+</Para>
+
+</RefSect1>
+
+<RefSect1>
+<Title>Requirements</Title>
+
+<SimpleList>
+<Member>
+The SGMLSpm package from CPAN. This package includes the sgmlspl script
+that is also needed.
+</Member>
+</SimpleList>
+
+</RefSect1>
+
+
+<RefSect1>
+<Title>Limitations</Title>
+
+<Para>
+Trying <Application>docbook2man</application> on non-DocBook or non-conformant
+SGML results in undefined behavior. :-)
+</Para>
+
+<Para>
+This program is a slow, dodgy Perl script.
+</Para>
+
+<Para>
+This program does not come close to supporting all the possible markup
+in DocBook, and may produce wrong output in some cases with supported
+markup.
+</Para>
+
+</RefSect1>
+
+<RefSect1>
+<Title>To do</Title>
+
+<ItemizedList>
+
+<ListItem><Para>
+How the hell do you represent a backslash (<Literal>\</literal>) in Texinfo!!@?
+I've tried <Literal>\\</literal> but TeX complains about it.
+</Para>
+</ListItem>
+
+<ListItem><Para>
+Fix breakages found in the test documents.
+</Para>
+</ListItem>
+
+<ListItem><Para>
+Add new element handling and fix existing handling.
+Be robust.
+</Para></ListItem>
+
+<ListItem>
+<Para>Make it faster. I think most of the speed problems so far is with parsing
+ESIS. Rewrite <Filename>SGMLS.pm</filename> with C and/or get input directly
+from <Application>SP</application>.
+</Para>
+</ListItem>
+
+<ListItem>
+<Para>
+There are some dependencies on elements occurring when they are actually
+optional (according to the DTD). We need to fix that (preferably) or
+prominently state the requirements.
+</Para>
+</ListItem>
+
+<ListItem>
+<Para>
+Allow other more common document elements.
+</Para>
+</ListItem>
+
+<ListItem>
+<Para>
+Separate out node referencing to a separate script. Not only would it
+make it faster/easier to maintain because it's separate from the main
+code, but also I would like it to evolve into an automatic DocBook
+<SGMLTag>ToC</sgmltag> generator.
+</Para>
+</ListItem>
+
+</ItemizedList>
+</RefSect1>
+
+<RefSect1>
+<Title>Copyright</Title>
+
+<Para>
+Copyright (C) 1998-1999 Steve Cheng <Email>steve@ggi-project.org</email>
+</Para>
+
+<Para>
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+</Para>
+
+<Para>
+You should have received a copy of the GNU General Public License along with
+this program; see the file <Filename>COPYING</filename>. If not, please write
+to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+</Para>
+
+</RefSect1>
+
+</RefEntry>
+
diff --git a/doc/refentry/frontend-spec.sgml b/doc/refentry/frontend-spec.sgml
new file mode 100644
index 0000000..9ba16bb
--- /dev/null
+++ b/doc/refentry/frontend-spec.sgml
@@ -0,0 +1,196 @@
+<refentry id="frontend-spec">
+ <docinfo>
+ <author>
+ <firstname>Eric</firstname> <surname>Bischoff</surname>
+ <affiliation>
+ <address><email>ebisch@cybercable.tm.fr</email></address>
+ </affiliation>
+ </author>
+ </docinfo>
+ <refmeta>
+ <refentrytitle>frontend-spec</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>frontend-spec</refname>
+ <refpurpose>interface between jw and its frontends</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><citerefentry> <refentrytitle>jw</refentrytitle>
+ <manvolnum>1</manvolnum> </citerefentry> calls frontends like
+ <filename>frontends/docbook</filename> to get the informations
+ specific to a given input format. The frontend knows which information
+ to return from the first command line parameter. It gets all necessary
+ data via environment variables ready to use.</para>
+
+ <para>This document describes that command line parameter and those
+ environment variables.</para>
+
+ <para>The frontend should return 0 if there weren't any problem,
+ and return a positive value otherwise.</para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Variables</title>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>$1</envar>
+ </glossterm>
+ <glossdef>
+ <para>The command line parameter, specifying which information
+ to return. It can take the following values:
+ <variablelist>
+ <varlistentry>
+ <term>centralized-catalog</term>
+ <listitem><para>The frontend must return the DTD-specific
+ centralized catalog name. Centralized catalogs normally
+ reside in <filename>/etc/sgml</filename> and provide the
+ location of all the catalog files useful for handling
+ this input type (the catalog for the DTD, the catalog
+ for the stylesheets, the catalog for the entities,
+ ...)</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>style-sheet</term>
+ <listitem><para>The frontend must return the filename
+ of the style sheet to be used for this document type and
+ with the chosen backend.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_CATALOGS_DIR</envar>
+ </glossterm>
+ <glossdef>
+ <para>The directory where the centralized catalogs reside. It is normally
+ <filename>/etc/sgml</filename>.</para>
+ <para>(This variable is valid only while determining
+ the centralized catalog to use.)</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_BASE_DIR</envar>
+ </glossterm>
+ <glossdef>
+ <para>The base directory of the SGML system. It is normally
+ <filename>/usr/share/sgml</filename>.</para>
+ <para>(This variable is valid only while determining
+ the style sheet to use.)</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_FILE</envar>
+ </glossterm>
+ <glossdef>
+ <para>The name of the file to convert.</para>
+ <para>(This variable is valid only while determining
+ the centralized catalog to use.)</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_TYPE</envar>
+ </glossterm>
+ <glossdef>
+ <para>The type of the backend to use, whether it produces output
+ files to be displayed online or to be printed out.
+ It can take the value <constant>html</constant> or
+ <constant>print</constant>.</para>
+ <para>(This variable is valid only while determining
+ the style sheet to use).</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para></para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_STYLESHEETS</envar>
+ </glossterm>
+ <glossdef>
+ <para>The desired custom stylesheet type, either <constant>none</constant>
+ or <constant>default</constant>.
+ If <constant>none</constant>, the frontend must return the file name of
+ the style sheet provided by the system beneath the docbook-utils.
+ If <constant>default</constant>, the frontend must return the custom
+ stylesheet provided by the docbook-utils.</para>
+ <para>(This variable is valid only while determining
+ the style sheet to use).</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <envar>SGML_XML</envar>
+ </glossterm>
+ <glossdef>
+ <para>The metalanguage of the file to convert, either <constant>sgml</constant>
+ or <constant>xml</constant>.</para>
+ <para>(This variable is valid only while determining
+ the centralized catalog to use).</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Files</title>
+
+ <para></para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>See also</title>
+
+ <para><citerefentry>
+ <refentrytitle>backend-spec</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry></para>
+ </refsect1>
+
+ <refsect1>
+ <title>Authors</title>
+
+ <para>Jochem Huhmann <email>joh@revier.com</email></para>
+
+ </refsect1>
+
+</refentry>
diff --git a/doc/refentry/jw.sgml b/doc/refentry/jw.sgml
new file mode 100644
index 0000000..d8d7de7
--- /dev/null
+++ b/doc/refentry/jw.sgml
@@ -0,0 +1,643 @@
+<refentry id="jw">
+ <docinfo>
+ <author>
+ <firstname>Eric</firstname> <surname>Bischoff</surname>
+ <affiliation>
+ <address><email>ebisch@cybercable.tm.fr</email></address>
+ </affiliation>
+ </author>
+ </docinfo>
+ <refmeta>
+ <refentrytitle>jw</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>jw</refname>
+ <refname>docbook2dvi</refname>
+ <refname>docbook2html</refname>
+ <refname>docbook2man</refname>
+ <refname>docbook2pdf</refname>
+ <refname>docbook2ps</refname>
+ <refname>docbook2rtf</refname>
+ <refname>docbook2tex</refname>
+ <refname>docbook2texi</refname>
+ <refname>docbook2txt</refname>
+ <refpurpose>(Jade Wrapper) converts SGML files to other formats</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>jw</command>
+ <group choice="opt"><arg><option>-f</option>
+ <replaceable>frontend</replaceable></arg>
+ <arg><option>--frontend</option>
+ <replaceable>frontend</replaceable></arg>
+ </group><sbr>
+
+ <group choice="opt"><arg><option>-b</option>
+ <replaceable>backend</replaceable></arg>
+ <arg><option>--backend</option> <replaceable>backend</replaceable></arg>
+ </group><sbr>
+
+ <group choice="opt"><arg><option>-c</option> <replaceable>file</replaceable></arg>
+ <arg><option>--cat</option> <replaceable>file</replaceable></arg>
+ </group><sbr>
+
+ <group choice="opt"><arg><option>-n</option></arg>
+ <arg><option>--nostd</option></arg>
+ </group><sbr>
+
+ <group choice="opt">
+ <arg><option>-d</option>
+ <replaceable>file</replaceable>|default|none</arg>
+ <arg><option>--dsl</option>
+ <replaceable>file</replaceable>|default|none</arg>
+ </group><sbr>
+
+ <group choice="opt">
+ <arg><option>-l</option> <replaceable>file</replaceable></arg>
+ <arg><option>--dcl</option> <replaceable>file</replaceable></arg>
+ </group><sbr>
+
+ <group choice="opt">
+ <arg><option>-s</option> <replaceable>path</replaceable></arg>
+ <arg><option>--sgmlbase</option> <replaceable>path</replaceable></arg>
+ </group><sbr>
+
+ <group choice="opt">
+ <arg><option>-p</option> <replaceable>program</replaceable></arg>
+ <arg><option>--parser</option> <replaceable>program</replaceable></arg>
+ </group><sbr>
+
+ <group choice="opt">
+ <arg><option>-o</option> <replaceable>directory</replaceable></arg>
+ <arg><option>--output</option> <replaceable>directory</replaceable></arg>
+ </group><sbr>
+
+ <arg choice="opt"><option>-V</option>
+ <replaceable>variable</replaceable>[=<replaceable>value</replaceable>]</arg><sbr>
+
+ <group choice="opt">
+ <arg><option>-u</option></arg>
+ <arg><option>--nochunks</option></arg>
+ </group>
+
+ <group choice="opt">
+ <arg><option>-i</option> <replaceable>section</replaceable></arg>
+ <arg><option>--include</option> <replaceable>section</replaceable></arg>
+ </group><sbr>
+
+ <group choice="opt">
+ <arg><option>-w</option> <replaceable>type</replaceable>|list</arg>
+ <arg><option>--warning</option> <replaceable>type</replaceable>|list</arg>
+ </group><sbr>
+
+ <group choice="opt">
+ <arg><option>-e</option> <replaceable>type</replaceable>|list</arg>
+ <arg><option>--error</option> <replaceable>type</replaceable>|list</arg>
+ </group><sbr>
+
+ <group choice="opt">
+ <arg><option>-h</option></arg>
+ <arg><option>--help</option></arg>
+ </group>
+
+ <group choice="opt">
+ <arg><option>-v</option></arg>
+ <arg><option>--version</option></arg>
+ </group><sbr>
+
+ <arg choice="req"><replaceable>SGML-file</replaceable></arg>
+
+ </cmdsynopsis>
+
+ <cmdsynopsis>
+ <command>docbook2dvi</command>
+ <arg choice="req"><replaceable>SGML-file</replaceable></arg>
+ </cmdsynopsis>
+
+ <cmdsynopsis>
+ <command>docbook2html</command>
+ <arg choice="req"><replaceable>SGML-file</replaceable></arg>
+ </cmdsynopsis>
+
+ <cmdsynopsis>
+ <command>docbook2man</command>
+ <arg choice="req"><replaceable>SGML-file</replaceable></arg>
+ </cmdsynopsis>
+
+ <cmdsynopsis>
+ <command>docbook2pdf</command>
+ <arg choice="req"><replaceable>SGML-file</replaceable></arg>
+ </cmdsynopsis>
+
+ <cmdsynopsis>
+ <command>docbook2ps</command>
+ <arg choice="req"><replaceable>SGML-file</replaceable></arg>
+ </cmdsynopsis>
+
+ <cmdsynopsis>
+ <command>docbook2rtf</command>
+ <arg choice="req"><replaceable>SGML-file</replaceable></arg>
+ </cmdsynopsis>
+
+ <cmdsynopsis>
+ <command>docbook2tex</command>
+ <arg choice="req"><replaceable>SGML-file</replaceable></arg>
+ </cmdsynopsis>
+
+ <cmdsynopsis>
+ <command>docbook2texi</command>
+ <arg choice="req"><replaceable>SGML-file</replaceable></arg>
+ </cmdsynopsis>
+
+ <cmdsynopsis>
+ <command>docbook2txt</command>
+ <arg choice="req"><replaceable>SGML-file</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>The <application>jw</application> shell script allows to
+ convert a DocBook file (or some other SGML-based format) to
+ other formats (including HTML, RTF, PS and PDF) with
+ an easy-to-understand syntax. It hides most of Jade's
+ or OpenJade complexity and adds comfortable features.</para>
+
+ <para>Other scripts like <application>docbook2html</application>,
+ <application>docbook2rtf</application> or
+ <application>docbook2ps</application> provide different ways of
+ calling <application>jw</application> that might be easier to
+ remember.</para>
+
+ <para>For the moment, jw does not handle XML, but only SGML.</para>
+
+ <para>This utility assumes that several other components are
+ installed. The list includes:
+ <itemizedlist>
+ <listitem>
+ <para>the ISO character entities for SGML</para>
+ </listitem>
+ <listitem>
+ <para>James Clark's DSSSL engine, jade, or an equivalent parser
+ like OpenJade</para>
+ </listitem>
+ <listitem>
+ <para>the DocBook DTD from the OASIS consortium</para>
+ </listitem>
+ <listitem>
+ <para>Norman Walsh's DocBook modular style sheets (or some other
+ set of DSSSL style sheets)</para>
+ </listitem>
+ <listitem>
+ <para>Sebastian Rahtz's jadetex set of TeX macros for jade
+ (for backends intended to "printing" formats like PDF, RTF or
+ PostScript)</para>
+ </listitem>
+ <listitem>
+ <para>A perl interpreter (for backends that use perl)</para>
+ </listitem>
+ <listitem>
+ <para>SGMLSpm from CPAN (for backends that use sgmls)</para>
+ </listitem>
+ <listitem>
+ <para>Lynx HTML browser (for the <filename>txt</filename>
+ backend)</para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>The jw script is basically called like this:</para>
+
+ <screen>jw mydoc.sgml</screen>
+
+ <para>where <filename>mydoc.sgml</filename> is a SGML file.</para>
+
+ <para>The command line above uses default options: it converts
+ from DocBook (the default frontend) to HTML (the default backend),
+ does not put the result in a subdirectory (unless specified
+ otherwise in the style sheets), etc.</para>
+
+ <para>In this example, the "mydoc" file name as well as the ".sgml"
+ extension can be replaced by anything else. Current extensions
+ for SGML DocBook files include ".sgml", ".sgm", ".docbook", and
+ ".db". The processed file <filename>mydoc.sgml</filename> can
+ be in any other directory than the current one.</para>
+
+ <para>Here we have chosen to generate HTML output. In fact we can
+ use any of the backends stored in the <filename>backends/</filename>
+ subdirectory of the DocBook-utils distribution directory (usually
+ <filename>/usr/share/sgml/docbook/utils-&version;</filename>).
+ Similarly, you can use any frontend defined in the
+ <filename>frontends/</filename> subdirectory to convert from another
+ input format.</para>
+
+ <para>This sample command creates one or many HTML files with
+ arbitrary file names in the current directory. This default behavior
+ can be changed through command line options and/or customization
+ style sheets.</para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+
+ <para>The following options apply to the conversion script:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><cmdsynopsis><group><arg><option>-f</option>
+ <replaceable>frontend</replaceable></arg>
+ <arg><option>--frontend</option>
+ <replaceable>frontend</replaceable></arg></group></cmdsynopsis>
+ </term>
+ <listitem>
+ <para>Allows to specify another frontend than default <filename>docbook</filename>.
+ The list of currently available frontends is:
+ <variablelist>
+ <varlistentry>
+ <term><filename>docbook</filename></term>
+ <listitem><para>Converts docbook with Norman Walsh's
+ style sheets. This frontend searches in the
+ subdirectories of the base SGML directory for a
+ file named <filename>html/docbook.dsl</filename> or
+ <filename>print/docbook.dsl</filename> (depending on the
+ backend's type: html or print).</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group><arg><option>-b</option>
+ <replaceable>backend</replaceable></arg>
+ <arg><option>--backend</option>
+ <replaceable>backend</replaceable></arg></group></cmdsynopsis>
+ </term>
+ <listitem>
+ <para>Allows to specify another backend than default
+ <filename>HTML</filename>. The list of currently available
+ backends is:
+ <variablelist>
+ <varlistentry>
+ <term><filename>dvi</filename></term>
+ <listitem><para>Converts to DVI (DeVice Independant
+ files) by calling <application>Jade</application> or
+ <application>OpenJade</application>.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>html</filename></term>
+ <listitem><para>Converts to HTML (HyperText Markup
+ Language) by calling <application>Jade</application>
+ or <application>OpenJade</application>.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>man</filename></term>
+ <listitem><para>Converts a refentry to a Unix manual page
+ by calling docbook2man. Does not work with other SGML
+ document types than DocBook.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>pdf</filename></term>
+ <listitem><para>Converts to PDF (Portable Document
+ Format) by calling <application>Jade</application> or
+ <application>OpenJade</application>.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>ps</filename></term>
+ <listitem><para>Converts to PostScript by
+ calling <application>Jade</application> or
+ <application>OpenJade</application>.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>rtf</filename></term>
+ <listitem><para>Converts to RTF (Rich Text Format)
+ by calling <application>Jade</application> or
+ <application>OpenJade</application>. The resulting file can
+ then be inported into <application>MS Word</application>
+ or one of its Linux replacement programs.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>tex</filename></term>
+ <listitem><para>Converts to TeX by calling <application>Jade</application> or
+ <application>OpenJade</application>.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>texi</filename></term>
+ <listitem><para>Converts to GNU TeXinfo pages by calling
+ docbook2texi. Does not work with other SGML document types
+ than DocBook.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>txt</filename></term>
+ <listitem><para>Converts to a bare text file
+ by calling <application>Jade</application>
+ or <application>OpenJade</application>, then
+ <application>Lynx</application>.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-c</option> <replaceable>file</replaceable></arg>
+ <arg><option>--cat</option> <replaceable>file</replaceable></arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Allows to use an extra SGML Open Catalog that will list
+ other files like customization style sheets, adaptations to the
+ DocBook Document Type Definition, special character entities,
+ etc. This catalog is added to the list of catalogs determined
+ by the script (see option <option>--nostd</option> below)</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-n</option></arg>
+ <arg><option>--nostd</option></arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Do not use the standard SGML Open Catalogs. Normally,
+ the standard catalogs list is determined like this:
+ <itemizedlist>
+ <listitem>
+ <para>if the centralized catalog exists, then
+ use it. The centralized catalog is a list of all
+ catalogs that might be necessary that usually
+ resides in <filename>/etc/sgml</filename>. Its
+ name is provided by the frontend, for example
+ the <filename>docbook</filename> frontend returns
+ <filename>/etc/sgml/sgml-docbook.cat</filename>.</para>
+ </listitem>
+ <listitem>
+ <para>Otherwise, take all the files
+ named <filename>catalog</filename> from the
+ subdirectories of the SGML base directory (usually
+ <filename>/usr/share/sgml</filename>).</para>
+ </listitem>
+ </itemizedlist>
+ This option is useful in conjunction with the
+ <option>--cat</option> option to use only the catalogs that
+ are specified on the command line.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-d</option>
+ <replaceable>file</replaceable>|default|none</arg>
+ <arg><option>--dsl</option>
+ <replaceable>file</replaceable>|default|none</arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Allows to use a customized style sheet instead
+ of the default one.</para>
+ <para>A "target" starting with a hash mark "#" can be appended
+ to the file name. As a result, only the corresponding part
+ of the style sheet is executed (the "style specification" whose
+ "identificator" is equal to the target's name). A common use of this
+ mechanism is to define "#html" and "#print" targets to trigger
+ the corresponding part of a replacement style sheet which is
+ common for both HTML and printout conversion.</para>
+ <para>By replacing the file name with "default", the default
+ style sheet provided with the frontend is used. For example, the
+ <filename>docbook</filename> frontend returns
+ <filename>./docbook.dsl#html</filename> (or
+ <filename>./docbook.dsl#print</filename>) in the SGML base
+ directory.</para>
+ <para>By replacing the file name with "none", no replacement
+ style sheet is used, not even the default style sheet. The style
+ sheet which is used is also determined by the frontend. For
+ example, the <filename>docbook</filename> frontend returns
+ Norman Walsh's <filename>html/docbook.dsl</filename> (or
+ <filename>print/docbook.dsl</filename>) found somewhere below
+ the SGML base directory.</para>
+ <para>If no --dsl option is specified, then "--dsl default" is
+ used.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-l</option> <replaceable>file</replaceable></arg>
+ <arg><option>--dcl</option> <replaceable>file</replaceable></arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Allows to use a customized SGML declaration instead
+ of the default one. The file name of the default SGML
+ declaration is not set for SGML files, and is set to
+ <filename>xml.dcl</filename> in the SGML base directory
+ for XML files.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-s</option> <replaceable>path</replaceable></arg>
+ <arg><option>--sgmlbase</option> <replaceable>path</replaceable></arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Allows to use another location for the SGML base
+ directory. This is the directory below which all SGML DTDs,
+ style sheets, entities, etc are installed. The default value
+ is <filename>/usr/share/sgml</filename>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-p</option> <replaceable>program</replaceable></arg>
+ <arg><option>--parser</option> <replaceable>program</replaceable></arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Specify the parser to use (<application>Jade</application>
+ or <application>OpenJade</application>) if several
+ are installed. If this option is not specified,
+ the script first tries to use Jade, then it tries
+ <application>OpenJade</application>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-o</option> <replaceable>directory</replaceable></arg>
+ <arg><option>--output</option> <replaceable>directory</replaceable></arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Set output directory where all the resulting files will
+ be stored. If the style sheets define a subdirectory where to
+ store the resulting files too, the subdirectory defined by the
+ style sheets will be placed below the subdirectory defined by
+ this option.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group><arg><option>-V</option>
+ <replaceable>variable</replaceable>=[<replaceable>value</replaceable>]</arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Set a variable (to a value, if one is specified).</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-u</option></arg>
+ <arg><option>--nochunks</option></arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Output only one big file. This option is useful only
+ when generating HTML, because the output can be split into
+ several files. This option overrides the setting that may be
+ done in the style sheets.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-i</option> <replaceable>section</replaceable></arg>
+ <arg><option>--include</option> <replaceable>section</replaceable></arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Declare a SGML marked section as "include". A SGML marked
+ section is a kind of conditional part of a document. If it is
+ declared "ignore", it will be left ignored, otherwise it will
+ be processed. An example of such a marked section would be:
+ <informalexample><para><literallayout>
+ &lt;DOCTYPE mydoc [
+ &lt;!ENTITY % confidential "ignore"&gt;
+ ]&gt;
+ &lt;mydoc&gt;
+ ...
+ &lt;![ %confidential [ Some confidential text... ]]&gt;
+ ...
+ &lt;/mydoc&gt;
+ </literallayout></para></informalexample>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-w</option> <replaceable>type</replaceable>|list</arg>
+ <arg><option>--warning</option> <replaceable>type</replaceable>|list</arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Enables or disables the display of given types of warnings.
+ Several -w options might be entered on the command line.
+ Warning types that start with "no-" disable the corresponding
+ warnings, the other types enable them.</para>
+ <para>If the warning type is replaced with "list", then
+ a list of allowed warning types is displayed.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-e</option> <replaceable>type</replaceable>|list</arg>
+ <arg><option>--error</option> <replaceable>type</replaceable>|list</arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Disables given types of errors.
+ Several -e options might be entered on the command line.
+ All error types start with "no-".</para>
+ <para>If the error type is replaced with "list", then
+ a list of allowed error types is displayed.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-h</option></arg>
+ <arg><option>--help</option></arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Print a short help message and exit</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><cmdsynopsis><group>
+ <arg><option>-v</option></arg>
+ <arg><option>--version</option></arg>
+ </group></cmdsynopsis></term>
+ <listitem>
+ <para>Print the version identifier and exit</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Files</title>
+
+ <variablelist>
+
+ <varlistentry>
+ <term><filename>/etc/sgml/sgml-docbook.cat</filename></term>
+ <listitem>
+ <para>Centralized SGML open catalog. This file name might
+ vary if another frontend than <filename>docbook</filename>
+ is used.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><filename>/usr/share/sgml/docbook/utils-&version;/backends</filename></term>
+ <listitem>
+ <para>The various backends</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><filename>/usr/share/sgml/docbook/utils-&version;/frontends</filename></term>
+ <listitem>
+ <para>The various frontends</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><filename>/usr/share/sgml/docbook/utils-&version;/helpers</filename></term>
+ <listitem>
+ <para>The various helper scripts like docbook2man or docbook2texi</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>Authors</title>
+
+ <para>Eric Bischoff (jw shell script and a few backends),
+ Jochem Huhmann (the <filename>man</filename> and
+ <filename>texi</filename> backends)</para>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+
+ <para><citerefentry><refentrytitle>docbook2man-spec.pl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>docbook2texi-spec.pl</refentrytitle>
+ <manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>install-catalog</refentrytitle>
+ <manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>nsgmls</refentrytitle>
+ <manvolnum>1</manvolnum></citerefentry>, <ulink
+ url="http://sources.redhat.com/docbook-tools/">docbook-utils
+ homepage</ulink>.</para>
+ </refsect1>
+
+</refentry>
+
+<!-- Local Variables: -->
+<!-- sgml-parent-document: "../docbook-utils.sgml" -->
+<!-- End: -->
diff --git a/doc/refentry/sgmldiff.sgml b/doc/refentry/sgmldiff.sgml
new file mode 100644
index 0000000..67ec57b
--- /dev/null
+++ b/doc/refentry/sgmldiff.sgml
@@ -0,0 +1,264 @@
+<refentry id="sgmldiff">
+ <docinfo>
+ <author>
+ <firstname>Frederik</firstname> <surname>Fouvry</surname>
+ <affiliation>
+ <address><email>fouvry@sfs.nphil.uni-tuebingen.de</email></address>
+ </affiliation>
+ </author>
+ </docinfo>
+ <refmeta>
+ <refentrytitle>sgmldiff</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>sgmldiff</refname>
+ <refpurpose>Find differences in the markup of two SGML files</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>sgmldiff</command>
+ <arg rep="repeat" choice="opt">options <synopfragmentref linkend="options-sgmldiff"></synopfragmentref></arg>
+ <arg choice="req"><replaceable>file1</replaceable></arg>
+ <arg choice="req"><replaceable>file2</replaceable></arg>
+
+ <synopfragment id="options-sgmldiff"><group>
+ <arg><option>-a</option></arg>
+ <arg><option>--attributes</option></arg><sbr>
+ <arg><option>-c</option> <group><arg>attributes</arg> <arg>nesting</arg> <arg>textpos</arg></group></arg>
+ <arg><option>--context</option> <group><arg>attributes</arg> <arg>nesting</arg> <arg>textpos</arg></group></arg><sbr>
+ <arg><option>-s</option></arg>
+ <arg><option>--statistics</option></arg><sbr>
+ <arg><option>-h</option></arg>
+ <arg><option>--help</option></arg><sbr>
+ <arg><option>-v</option></arg>
+ <arg><option>--version</option></arg>
+ </group></synopfragment>
+
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>This perl script allows to determine the structural differences
+ between two SGML files. It compares the files, regardless of what
+ is in between the tags, to only focus on the markup. Its output
+ is similar to <citerefentry> <refentrytitle>diff</refentrytitle>
+ <manvolnum>1</manvolnum></citerefentry>.</para>
+
+ <para>The typical use of <application>sgmldiff</application> is to
+ compare an SGML file with its translation into another language. If
+ the translation was done cleanly, <application>sgmldiff</application>
+ returns without finding any difference in the markup.</para>
+
+ <para>An example of a typical call to sgmldiff is:</para>
+
+ <screen>
+ sgmldiff english.sgml italiano.sgml
+ </screen>
+
+ <para>If there are differences in markup between both files,
+ <application>sgmldiff</application> will output a series of differences
+ reports summarized with lines of the form:
+ <variablelist>
+ <varlistentry>
+ <term>169a164</term>
+ <listitem><para>At line 169 of the first file, line 164 of the
+ second file has been added.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>8a12,15</term>
+ <listitem><para>At line 8 of the first file, lines 12 to 15
+ of the second file have been added.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>41d28</term>
+ <listitem><para>Line 41 of the first file has been destroyed, to
+ obtain line 28 of the second file.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>63,66d61</term>
+ <listitem><para>Lines 63 to 66 of the first file have been
+ destroyed. to obtain line 61 of the second file.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>52c51</term>
+ <listitem><para>Line 52 of the first file has been changed into
+ line 51 of the second file.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>5,7c8,10</term>
+ <listitem><para>Lines 5 to 7 of the first file have been changed
+ into lines 8 to 10 of the second line.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ In addition to those summaries, the lines of the first file are
+ shown preceeded by '<' and the lines of the second file are
+ shown preceeded by '>".</para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+
+ <para>Here is the list of actions that can be requested to
+ sgmldiff:</para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm>
+ <cmdsynopsis><group>
+ <arg><option>-a</option></arg>
+ <arg><option>--attributes</option></arg>
+ </group></cmdsynopsis>
+ </glossterm>
+ <glossdef>
+ <para>Include the attribute values in the difference tests.
+ Don't set this value if the attributes are likely to be
+ translated. Set this value if the attributes value shouldn't
+ change between both files. Default is to don't include the
+ attributes in the difference tests.</para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry>
+ <glossterm>
+ <cmdsynopsis><group>
+ <arg><option>-c</option> <group><arg>attributes</arg> <arg>nesting</arg> <arg>textpos</arg></group></arg>
+ <arg><option>--context</option> <group><arg>attributes</arg> <arg>nesting</arg> <arg>textpos</arg></group></arg>
+ </group></cmdsynopsis>
+ </glossterm>
+ <glossdef>
+ <para>Add more context to the difference. Since every test between the tags is removed before testing the differences, <application>sgmldiff</application> is likely to resynchronize itself at the wrong place, by thinking the location in both files correspond, while it's not true. By adding more context to the compared area, such risk is disminished.</para>
+ <para>The allowed values for the <option>--context</option> option are:
+ <variablelist>
+ <varlistentry>
+ <term>attributes</term>
+ <listitem><para>Take into account the attribute
+ <emphasis>names</emphasis>. The attribute
+ <emphasis>values</emphasis> are controlled by the
+ <option>attributes</option> option.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>nesting</term>
+ <listitem><para>Take into account the nesting level of all the compared tags.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>textpos</term>
+ <listitem><para>Take into account the position in the text.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry>
+ <glossterm>
+ <cmdsynopsis><group>
+ <arg><option>-s</option></arg>
+ <arg><option>--statistics</option></arg>
+ </group></cmdsynopsis>
+ </glossterm>
+ <glossdef>
+ <para>Print some SGML information at the end.</para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry>
+ <glossterm>
+ <cmdsynopsis><group>
+ <arg><option>-h</option></arg>
+ <arg><option>--help</option></arg>
+ </group></cmdsynopsis>
+ </glossterm>
+ <glossdef>
+ <para>Print a short help message and exit</para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry>
+ <glossterm>
+ <cmdsynopsis><group>
+ <arg><option>-v</option></arg>
+ <arg><option>--version</option></arg>
+ </group></cmdsynopsis>
+ </glossterm>
+ <glossdef>
+ <para>Print the version identifier and exit</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+
+ </refsect1>
+
+ <refsect1>
+ <title>Files</title>
+
+ <para></para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Authors</title>
+
+ <glosslist>
+
+ <glossentry>
+ <glossterm>
+ Frederik Fouvry
+ </glossterm>
+ <glossdef>
+ <para>Developer of <application>sgmldiff</application>.</para>
+ </glossdef>
+ </glossentry>
+
+ </glosslist>
+
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+
+ <glosslist>
+
+ <glossentry>
+ <glossterm>
+ <citerefentry> <refentrytitle>jw</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
+ </glossterm>
+ <glossdef>
+ <para>conversion from a SGML file to other file formats</para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry>
+ <glossterm>
+<!-- Next line is a hack to force a paragraph break in the man-page. -->
+<cmdsynopsis> <command></command> </cmdsynopsis>
+ <citerefentry> <refentrytitle>nsgmls</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
+ </glossterm>
+ <glossdef>
+ <para>a base component of <application>Jade</application> DSSSL engine</para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry>
+ <glossterm>
+<!-- Next line is a hack to force a paragraph break in the man-page. -->
+<cmdsynopsis> <command></command> </cmdsynopsis>
+ <ulink url="http://sources.redhat.com/docbook-tools/">http://sources.redhat.com/docbook-tools/</ulink>
+ </glossterm>
+ <glossdef>
+ <para>the home page of the DocBook tools, a compendium of
+ all tools necessary to process DocBook files, including
+ the DocBook-utils</para>
+ </glossdef>
+ </glossentry>
+
+ </glosslist>
+ </refsect1>
+
+</refentry>
diff --git a/doc/version.in b/doc/version.in
new file mode 100644
index 0000000..27323da
--- /dev/null
+++ b/doc/version.in
@@ -0,0 +1 @@
+@VERSION@ \ No newline at end of file
diff --git a/docbook-utils.dsl b/docbook-utils.dsl
new file mode 100644
index 0000000..6a828f6
--- /dev/null
+++ b/docbook-utils.dsl
@@ -0,0 +1,115 @@
+<!-- This file defines the DocBook-utils Style Sheet for DocBook
+ Eric Bischoff <eric@caldera.de>
+-->
+
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+ <!ENTITY % html "IGNORE">
+ <![%html; [
+ <!ENTITY % print "IGNORE">
+ <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
+ ]]>
+ <!ENTITY % print "INCLUDE">
+ <![%print; [
+ <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
+ ]]>
+]>
+
+<STYLE-SHEET>
+
+ <STYLE-SPECIFICATION ID="UTILS" USE="DOCBOOK">
+ <STYLE-SPECIFICATION-BODY>
+;; ===================================================================
+;; Generic Parameters
+;; (Generic currently means: both print and html)
+
+(define %chapter-autolabel% #t)
+(define %section-autolabel% #t)
+(define (toc-depth nd) 3)
+
+ </STYLE-SPECIFICATION-BODY>
+ </STYLE-SPECIFICATION>
+
+ <STYLE-SPECIFICATION ID="PRINT" USE="UTILS">
+ <STYLE-SPECIFICATION-BODY>
+;; ===================================================================
+;; Print Parameters
+;; Call: jade -d docbook-utils.dsl#print
+
+; === Page layout ===
+;; (define %paper-type% "A4") ;; use A4 paper - comment this out if needed
+
+; === Media objects ===
+(define preferred-mediaobject-extensions ;; this magic allows to use different graphical
+ (list "eps")) ;; formats for printing and putting online
+(define acceptable-mediaobject-extensions
+ '())
+(define preferred-mediaobject-notations
+ (list "EPS"))
+(define acceptable-mediaobject-notations
+ (list "linespecific"))
+
+; === Rendering ===
+(define %head-after-factor% 0.2) ;; not much whitespace after orderedlist head
+(define ($paragraph$) ;; more whitespace after paragraph than before
+ (make paragraph
+ first-line-start-indent: (if (is-first-para)
+ %para-indent-firstpara%
+ %para-indent%)
+ space-before: (* %para-sep% 4)
+ space-after: (/ %para-sep% 4)
+ quadding: %default-quadding%
+ hyphenate?: %hyphenation%
+ language: (dsssl-language-code)
+ (process-children)))
+
+ </STYLE-SPECIFICATION-BODY>
+ </STYLE-SPECIFICATION>
+
+ <STYLE-SPECIFICATION ID="HTML" USE="UTILS">
+ <STYLE-SPECIFICATION-BODY>
+;; ===================================================================
+;; HTML Parameters
+;; Call: jade -d docbook-utils.dsl#html
+
+; === File names ===
+(define %root-filename% "index") ;; name for the root html file
+(define %html-ext% ".html") ;; default extension for html output files
+(define %html-prefix% "") ;; prefix for all filenames generated (except root)
+(define %use-id-as-filename% #f) ;; if #t uses ID value, if present, as filename
+ ;; otherwise a code is used to indicate level
+ ;; of chunk, and general element number
+ ;; (nth element in the document)
+(define use-output-dir #f) ;; output in separate directory?
+(define %output-dir% "HTML") ;; if output in directory, it's called HTML
+
+; === HTML settings ===
+(define %html-pubid% "-//W3C//DTD HTML 4.01 Transitional//EN") ;; Nearly true :-(
+(define %html40% #t)
+
+; === Media objects ===
+(define preferred-mediaobject-extensions ;; this magic allows to use different graphical
+ (list "png" "jpg" "jpeg")) ;; formats for printing and putting online
+(define acceptable-mediaobject-extensions
+ (list "bmp" "gif" "eps" "epsf" "avi" "mpg" "mpeg" "qt"))
+(define preferred-mediaobject-notations
+ (list "PNG" "JPG" "JPEG"))
+(define acceptable-mediaobject-notations
+ (list "EPS" "BMP" "GIF" "linespecific"))
+; === Rendering ===
+(define %admon-graphics% #t) ;; use symbols for Caution|Important|Note|Tip|Warning
+
+; === Books only ===
+(define %generate-book-titlepage% #t)
+(define %generate-book-toc% #t)
+(define ($generate-chapter-toc$) #f) ;; never generate a chapter TOC in books
+
+; === Articles only ===
+(define %generate-article-titlepage% #t)
+(define %generate-article-toc% #t) ;; make TOC
+
+ </STYLE-SPECIFICATION-BODY>
+ </STYLE-SPECIFICATION>
+
+ <EXTERNAL-SPECIFICATION ID="DOCBOOK" DOCUMENT="docbook.dsl">
+
+</STYLE-SHEET>
diff --git a/docbook-utils.spec b/docbook-utils.spec
new file mode 100644
index 0000000..1f58dae
--- /dev/null
+++ b/docbook-utils.spec
@@ -0,0 +1,60 @@
+%define Name docbook-utils
+%define Version 0.6.14
+
+Name : %{Name}
+Version : %{Version}
+Release : 1
+Group : Textprocessing/Tools
+
+Summary : Shell scripts to manage DocBook documents.
+
+Copyright : Eric Bischoff, Mark Galassi, Jochem Huhmann, Steve Cheng, and Frederik Fouvry; GPL 2.0
+Packager : Eric Bischoff <eric@caldera.de>, Mark Galassi <rosalia@galassi.org>
+
+Requires : docbook-style-dsssl >= 1.49
+Requires : jadetex >= 2.5
+Requires : perl-SGMLSpm >= 1.03ii
+
+BuildRoot : /tmp/%{Name}-%{Version}
+
+BuildArch : noarch
+Source0 : %{Name}-%{Version}.tar.gz
+
+
+%Description
+These little scripts allow to convert easily DocBook files to other formats
+(HTML, RTF, PostScript...), and to compare SGML files.
+
+
+%Prep
+%setup -q
+
+
+%Build
+./configure --prefix=/usr --mandir=/usr/share/man/en
+make
+
+
+%Install
+DESTDIR=$RPM_BUILD_ROOT
+make install prefix=$DESTDIR/usr mandir=$DESTDIR/usr/share/man/en docdir=$DESTDIR/usr/share/doc
+
+
+%Clean
+DESTDIR=$RPM_BUILD_ROOT
+rm -rf $DESTDIR
+
+
+%Files
+%defattr (-,root,root)
+%doc README COPYING TODO
+%doc /usr/share/doc/html/
+/usr/bin/jw
+/usr/bin/docbook2*
+/usr/bin/sgmldiff
+/usr/share/sgml/docbook/utils-%{Version}/docbook-utils.dsl
+/usr/share/sgml/docbook/utils-%{Version}/backends/*
+/usr/share/sgml/docbook/utils-%{Version}/frontends/*
+/usr/share/sgml/docbook/utils-%{Version}/helpers/*
+/usr/share/man/en/man1/*
+/usr/share/man/en/man7/*
diff --git a/docbook-utils.spec.in b/docbook-utils.spec.in
new file mode 100644
index 0000000..92bc9ff
--- /dev/null
+++ b/docbook-utils.spec.in
@@ -0,0 +1,60 @@
+%define Name docbook-utils
+%define Version @VERSION@
+
+Name : %{Name}
+Version : %{Version}
+Release : 1
+Group : Textprocessing/Tools
+
+Summary : Shell scripts to manage DocBook documents.
+
+Copyright : Eric Bischoff, Mark Galassi, Jochem Huhmann, Steve Cheng, and Frederik Fouvry; GPL 2.0
+Packager : Eric Bischoff <eric@caldera.de>, Mark Galassi <rosalia@galassi.org>
+
+Requires : docbook-style-dsssl >= 1.49
+Requires : jadetex >= 2.5
+Requires : perl-SGMLSpm >= 1.03ii
+
+BuildRoot : /tmp/%{Name}-%{Version}
+
+BuildArch : noarch
+Source0 : %{Name}-%{Version}.tar.gz
+
+
+%Description
+These little scripts allow to convert easily DocBook files to other formats
+(HTML, RTF, PostScript...), and to compare SGML files.
+
+
+%Prep
+%setup -q
+
+
+%Build
+./configure --prefix=/usr --mandir=/usr/share/man/en
+make
+
+
+%Install
+DESTDIR=$RPM_BUILD_ROOT
+make install prefix=$DESTDIR/usr mandir=$DESTDIR/usr/share/man/en docdir=$DESTDIR/usr/share/doc
+
+
+%Clean
+DESTDIR=$RPM_BUILD_ROOT
+rm -rf $DESTDIR
+
+
+%Files
+%defattr (-,root,root)
+%doc README COPYING TODO
+%doc /usr/share/doc/html/
+/usr/bin/jw
+/usr/bin/docbook2*
+/usr/bin/sgmldiff
+/usr/share/sgml/docbook/utils-%{Version}/docbook-utils.dsl
+/usr/share/sgml/docbook/utils-%{Version}/backends/*
+/usr/share/sgml/docbook/utils-%{Version}/frontends/*
+/usr/share/sgml/docbook/utils-%{Version}/helpers/*
+/usr/share/man/en/man1/*
+/usr/share/man/en/man7/*
diff --git a/frontends/Makefile.am b/frontends/Makefile.am
new file mode 100644
index 0000000..2ea006b
--- /dev/null
+++ b/frontends/Makefile.am
@@ -0,0 +1,3 @@
+sgmldudir = $(prefix)/share/sgml/docbook/utils-@VERSION@
+sgmldufedir = $(sgmldudir)/frontends
+sgmldufe_DATA = docbook
diff --git a/frontends/Makefile.in b/frontends/Makefile.in
new file mode 100644
index 0000000..14c1e82
--- /dev/null
+++ b/frontends/Makefile.in
@@ -0,0 +1,283 @@
+# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = frontends
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/docbook.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(mkdir_p)
+CONFIG_CLEAN_FILES = docbook
+SOURCES =
+DIST_SOURCES =
+am__installdirs = $(DESTDIR)$(sgmldufedir)
+sgmldufeDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(sgmldufe_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+jade_bindir = @jade_bindir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+perl_bindir = @perl_bindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+sgmldudir = $(prefix)/share/sgml/docbook/utils-@VERSION@
+sgmldufedir = $(sgmldudir)/frontends
+sgmldufe_DATA = docbook
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu frontends/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu frontends/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+docbook: $(top_builddir)/config.status $(srcdir)/docbook.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+uninstall-info-am:
+install-sgmldufeDATA: $(sgmldufe_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkdir_p) $(DESTDIR)$(sgmldufedir)
+ @list='$(sgmldufe_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(sgmldufeDATA_INSTALL) $$d$$p $(DESTDIR)$(sgmldufedir)/$$f"; \
+ $(sgmldufeDATA_INSTALL) $$d$$p $(DESTDIR)$(sgmldufedir)/$$f; \
+ done
+
+uninstall-sgmldufeDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sgmldufe_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(sgmldufedir)/$$f"; \
+ rm -f $(DESTDIR)$(sgmldufedir)/$$f; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ $(mkdir_p) $(DESTDIR)$(sgmldufedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-sgmldufeDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-sgmldufeDATA
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-sgmldufeDATA install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
+ uninstall-sgmldufeDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/frontends/docbook.in b/frontends/docbook.in
new file mode 100644
index 0000000..ea06927
--- /dev/null
+++ b/frontends/docbook.in
@@ -0,0 +1,52 @@
+# Frontend to convert a docbook file into something else
+# Send any comments to Eric Bischoff <eric@caldera.de>
+# This program is under GPL license. See LICENSE file for details.
+
+case "$1" in
+# Give the location of the centralized catalog
+# First try the one with a version matching the version that is indicated in the document
+ centralized-catalog)
+ if [ -n "$SGML_NORM" ]; then
+ SGML_NORM_OPTS='-d'
+ else
+ SGML_NORM=cat
+ SGML_NORM_OPTS=
+ fi
+ SGML_VERSION=`"$SGML_NORM" $SGML_NORM_OPTS -- "$SGML_FILE" 2>/dev/null |
+ grep -i '<!DOCTYPE' |
+ head -n 1 |
+ sed 's/^.*DocBook\( XML\)\? V\([0-9][\.0-9]*\).*$/\2/'`
+ SGML_CATALOG=
+ for f in "${SGML_CATALOGS_DIR}/${SGML_XML}-docbook-${SGML_VERSION}"*".cat"
+ do
+ if [ -f "$f" ]
+ then
+ SGML_CATALOG=$f
+ break
+ fi
+ done
+ if [ -z "$SGML_CATALOG" ]
+ then
+ if [ "${SGML_XML}" != "sgml" ]
+ then SGML_CATALOG=${SGML_CATALOGS_DIR}/${SGML_XML}-docbook.cat
+ else SGML_CATALOG=${SGML_CATALOGS_DIR}/catalog
+ fi
+ fi
+ echo "$SGML_CATALOG"
+ ;;
+# Find a stylesheet on the model "html/docbook.dsl" or "print/docbook.dsl"
+ style-sheet)
+ case $SGML_STYLESHEET in
+ default)
+ echo "${SGML_BASE_DIR}/docbook/utils-@VERSION@/docbook-utils.dsl#${SGML_TYPE}"
+ ;;
+ none)
+ find $SGML_BASE_DIR -name docbook.dsl | grep "$SGML_TYPE/docbook.dsl" | awk '{print $1}'
+ ;;
+ esac
+ ;;
+ *) exit 1
+ ;;
+esac
+
+exit 0
diff --git a/helpers/Makefile.am b/helpers/Makefile.am
new file mode 100644
index 0000000..4843d06
--- /dev/null
+++ b/helpers/Makefile.am
@@ -0,0 +1,5 @@
+sgmldudir = $(prefix)/share/sgml/docbook/utils-@VERSION@
+sgmlduhedir = $(sgmldudir)/helpers
+sgmlduhe_DATA = docbook2man-spec.pl docbook2texi-spec.pl
+
+EXTRA_DIST = $(sgmlduhe_DATA)
diff --git a/helpers/Makefile.in b/helpers/Makefile.in
new file mode 100644
index 0000000..958f4ee
--- /dev/null
+++ b/helpers/Makefile.in
@@ -0,0 +1,281 @@
+# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = helpers
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(mkdir_p)
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__installdirs = $(DESTDIR)$(sgmlduhedir)
+sgmlduheDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(sgmlduhe_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+jade_bindir = @jade_bindir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+perl_bindir = @perl_bindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+sgmldudir = $(prefix)/share/sgml/docbook/utils-@VERSION@
+sgmlduhedir = $(sgmldudir)/helpers
+sgmlduhe_DATA = docbook2man-spec.pl docbook2texi-spec.pl
+EXTRA_DIST = $(sgmlduhe_DATA)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu helpers/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu helpers/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+install-sgmlduheDATA: $(sgmlduhe_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkdir_p) $(DESTDIR)$(sgmlduhedir)
+ @list='$(sgmlduhe_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(sgmlduheDATA_INSTALL) $$d$$p $(DESTDIR)$(sgmlduhedir)/$$f"; \
+ $(sgmlduheDATA_INSTALL) $$d$$p $(DESTDIR)$(sgmlduhedir)/$$f; \
+ done
+
+uninstall-sgmlduheDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sgmlduhe_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(sgmlduhedir)/$$f"; \
+ rm -f $(DESTDIR)$(sgmlduhedir)/$$f; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ $(mkdir_p) $(DESTDIR)$(sgmlduhedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-sgmlduheDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-sgmlduheDATA
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-sgmlduheDATA install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
+ uninstall-sgmlduheDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/helpers/docbook2man-spec.pl b/helpers/docbook2man-spec.pl
new file mode 100644
index 0000000..8e46a1e
--- /dev/null
+++ b/helpers/docbook2man-spec.pl
@@ -0,0 +1,1248 @@
+=head1 NAME
+
+docbook2man-spec - convert DocBook RefEntries to Unix manpages
+
+=head1 SYNOPSIS
+
+The SGMLSpm package from CPAN. This contains the sgmlspl script which
+is used to grok this file. Use it like this:
+
+nsgmls some-docbook-document.sgml | sgmlspl docbook2man-spec.pl
+
+=head1 DESCRIPTION
+
+This is a sgmlspl spec file that produces Unix-style
+manpages from RefEntry markup.
+
+See the accompanying RefEntry man page for 'plain new' documentation. :)
+
+=head1 LIMITATIONS
+
+Trying docbook2man on non-DocBook or non-conformant SGML results in
+undefined behavior. :-)
+
+This program is a slow, dodgy Perl script.
+
+This program does not come close to supporting all the possible markup
+in DocBook, and will produce wrong output in some cases with supported
+markup.
+
+=head1 TODO
+
+Add new element handling and fix existing handling. Be robust.
+Produce cleanest, readable man output as possible (unlike some
+other converters). Follow Linux man(7) convention.
+If this results in added logic in this script,
+that's okay. The code should still be reasonably organized.
+
+Make it faster. If Perl sucks port it to another language.
+
+=head1 COPYRIGHT
+
+Copyright (C) 1998-1999 Steve Cheng <steve@ggi-project.org>
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+You should have received a copy of the GNU General Public License along with
+this program; see the file COPYING. If not, please write to the Free
+Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+=cut
+
+# $Id: docbook2man-spec.pl,v 1.10 2003/06/10 08:30:30 twaugh Exp $
+
+use SGMLS; # Use the SGMLS package.
+use SGMLS::Output; # Use stack-based output.
+use SGMLS::Refs;
+
+########################################################################
+# SGMLSPL script produced automatically by the script sgmlspl.pl
+#
+# Document Type: any, but processes only RefEntries
+# Edited by: me :)
+########################################################################
+
+$write_manpages = 0;
+$blank_xrefs = 0;
+
+sgml('start', sub {
+ push_output('nul');
+ $raw_cdata = 1; # Makes it a bit faster.
+
+ # Links file
+ open(LINKSFILE, ">manpage.links");
+
+ $Refs = new SGMLS::Refs("manpage.refs");
+});
+sgml('end', sub {
+ close(LINKSFILE);
+ if($blank_xrefs) {
+ print STDERR "Warning: output contains unresolved XRefs\n";
+ }
+});
+
+
+
+
+########################################################################
+#
+# Output helpers
+#
+########################################################################
+
+# Our own version of sgml() and output() to allow simple string output
+# to play well with roff's stupid whitespace rules.
+
+sub man_sgml
+{
+ if(ref($_[1]) eq 'CODE') {
+ return &sgml;
+ }
+
+ my $s = $_[1];
+
+ $s =~ s/\\/\\\\/g;
+ $s =~ s/'/\\'/g;
+
+ # \n at the beginning means start at beginning of line
+ if($s =~ s/^\n//) {
+ $sub = 'sub { output "\n" unless $newline_last++; ';
+ if($s eq '') {
+ sgml($_[0], eval('sub { output "\n" unless $newline_last++; }'));
+ } elsif($s =~ /\n$/) {
+ sgml($_[0], eval("sub { output \"\\n\" unless \$newline_last++; output '$s'; }"));
+ } else {
+ sgml($_[0], eval("sub { output \"\\n\" unless \$newline_last; output '$s'; \$newline_last = 0; }"));
+ }
+ } else {
+ if($s =~ /\n$/) {
+ sgml($_[0], eval("sub { output '$s'; \$newline_last = 1; }"));
+ } else {
+ sgml($_[0], eval("sub { output '$s'; \$newline_last = 0; }"));
+ }
+ }
+}
+
+sub man_output
+{
+ $_ = shift;
+ if(s/^\n//) {
+ output "\n" unless $newline_last++;
+ }
+ return if $_ eq '';
+
+ output $_;
+
+ if(@_) {
+ output @_;
+ $newline_last = (pop(@_) =~ /\n$/);
+ } else {
+ $newline_last = ($_ =~ /\n$/)
+ }
+}
+
+# Fold lines into one, quote some characters
+sub fold_string
+{
+ $_ = shift;
+
+ s/\\/\\\\/g;
+ s/"/\\\&"/g;
+
+ # Change tabs to spaces
+ tr/\t\n/ /;
+
+ # Trim whitespace from beginning and end.
+ s/^ +//;
+ s/ +$//;
+
+ return $_;
+}
+
+sub save_cdata()
+{
+ $raw_cdata++;
+ push_output('string');
+}
+
+sub bold_on()
+{
+ # If the last font is also bold, don't change anything.
+ # Basically this is to just get more readable man output.
+ if($fontstack[$#fontstack] ne 'bold') {
+ if(!$raw_cdata) {
+ output '\fB';
+ $newline_last = 0;
+ }
+ }
+ push(@fontstack, 'bold');
+}
+
+sub italic_on()
+{
+ # If the last font is also italic, don't change anything.
+ if($fontstack[$#fontstack] ne 'italic') {
+ if(!$raw_cdata) {
+ output '\fI';
+ $newline_last = 0;
+ }
+ }
+ push(@fontstack, 'italic');
+}
+
+sub font_off()
+{
+ my $thisfont = pop(@fontstack);
+ my $lastfont = $fontstack[$#fontstack];
+
+ # Only output font change if it is different
+ if($thisfont ne $lastfont) {
+ if($raw_cdata) { return; }
+ elsif($lastfont eq 'bold') { output '\fB'; }
+ elsif($lastfont eq 'italic') { output '\fI'; }
+ else { output '\fR'; }
+
+ $newline_last = 0;
+ }
+}
+
+
+
+
+
+
+########################################################################
+#
+# Manpage management
+#
+########################################################################
+
+sgml('<REFENTRY>', sub {
+ # This will be overwritten at end of REFMETA, when we know the name of the page.
+ pop_output();
+
+ $write_manpages = 1; # Currently writing manpage.
+
+ $nocollapse_whitespace = 0; # Current whitespace collapse counter.
+ $newline_last = 1; # At beginning of line?
+ # Just a bit of warning, you will see this variable manipulated
+ # manually a lot. It makes the code harder to follow but it
+ # saves you from having to worry about collapsing at the end of
+ # parse, stopping at verbatims, etc.
+ $raw_cdata = 0; # Instructs certain output functions to
+ # leave CDATA alone, so we can assign
+ # it to a string and process it, etc.
+ @fontstack = (); # Fonts being activated.
+
+ $manpage_title = ''; # Needed for indexing.
+ $manpage_sect = '';
+ @manpage_names = ();
+
+ $manpage_misc = '';
+
+ $list_nestlevel = 0; # Indent certain nested content.
+
+ # check refentry's language
+ if(defined($_[0]->attribute('LANG')->value)) {
+ $manpage_lang = $_[0]->attribute('LANG')->value;
+ }
+ else {
+ $manpage_lang = '';
+ }
+});
+sgml('</REFENTRY>', sub {
+ if(!$newline_last) {
+ output "\n";
+ }
+
+ $write_manpages = 0;
+ $raw_cdata = 1;
+ push_output('nul');
+});
+
+sgml('</REFMETA>', sub {
+ if ($manpage_lang) {
+ push_output('file', "$manpage_title.$manpage_lang.$manpage_sect");
+ } else {
+ push_output('file', "$manpage_title.$manpage_sect");
+ }
+
+ output <<_END_BANNER;
+.\\" This manpage has been automatically generated by docbook2man
+.\\" from a DocBook document. This tool can be found at:
+.\\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
+.\\" Please send any bug reports, improvements, comments, patches,
+.\\" etc. to Steve Cheng <steve\@ggi-project.org>.
+_END_BANNER
+
+ my $manpage_date = `date "+%d %B %Y"`;
+
+ output '.TH "';
+
+ # If the title is not mixed-case, convention says to
+ # uppercase the whole title. (The canonical title is
+ # lowercase.)
+ if($manpage_title =~ /[A-Z]/) {
+ output fold_string($manpage_title);
+ } else {
+ output uc(fold_string($manpage_title));
+ }
+
+ output '" "', fold_string($manpage_sect),
+ '" "', fold_string(`date "+%d %B %Y"`),
+ '" "', $manpage_misc,
+ '" "', $manpage_manual,
+ "\"\n";
+
+ $newline_last = 1;
+
+ # References to this RefEntry.
+ my $id = $_[0]->parent->attribute('ID')->value;
+ if($id ne '') {
+ # The 'package name' part of the section should
+ # not be used when citing it.
+ my ($sectnum) = ($manpage_sect =~ /([0-9]*)/);
+
+ if($_[0]->parent->attribute('XREFLABEL')->value eq '') {
+ $Refs->put("refentry:$id", "$manpage_title($sectnum)");
+ } else {
+ $Refs->put("refentry:$id",
+ $_[0]->parent->attribute('XREFLABEL')->value .
+ "($sectnum)");
+ }
+ }
+});
+
+sgml('<REFENTRYTITLE>', sub {
+ if($_[0]->in('REFMETA')) {
+ save_cdata();
+ } else {
+ # Manpage citations are in bold.
+ bold_on();
+ }
+});
+sgml('</REFENTRYTITLE>', sub {
+ if($_[0]->in('REFMETA')) {
+ $raw_cdata--;
+ $manpage_title = pop_output();
+ }
+ else { font_off(); }
+});
+
+sgml('<MANVOLNUM>', sub {
+ if($_[0]->in('REFMETA')) {
+ save_cdata();
+ } else {
+ # Manpage citations use ().
+ output '(';
+ }
+});
+sgml('</MANVOLNUM>', sub {
+ if($_[0]->in('REFMETA')) {
+ $raw_cdata--;
+ $manpage_sect = pop_output();
+ }
+ else { output ')' }
+});
+
+sgml('<REFMISCINFO>', \&save_cdata);
+sgml('</REFMISCINFO>', sub {
+ $raw_cdata--;
+ $manpage_misc = fold_string(pop_output());
+});
+
+
+# NAME section
+man_sgml('<REFNAMEDIV>', sub {
+ my %words = qw( fr NOM es NOMBRE de NAME );
+ if (defined($_[0]->attribute('LANG')->value)) {
+ my $id = $_[0]->attribute('LANG')->value;
+ my $ad = $words{$id};
+ output("\n.SH $ad\n");}
+ else {output("\n.SH NAME\n");}
+});
+
+sgml('<REFNAME>', \&save_cdata);
+sgml('</REFNAME>', sub {
+ $raw_cdata--;
+ push(@manpage_names, pop_output());
+});
+
+sgml('<REFPURPOSE>', \&save_cdata);
+sgml('</REFPURPOSE>', sub {
+ $raw_cdata--;
+ my $manpage_purpose = fold_string(pop_output());
+
+ for(my $i = 0; $i < $#manpage_names; $i++) {
+ output fold_string($manpage_names[$i]), ', ';
+ }
+
+ output fold_string($manpage_names[$#manpage_names]);
+ output " \\- $manpage_purpose\n";
+
+ $newline_last = 1;
+
+ foreach(@manpage_names) {
+ # Don't link to itself
+ if($_ ne $manpage_title) {
+ print LINKSFILE "$manpage_title.$manpage_sect $_.$manpage_sect\n";
+ }
+ }
+});
+
+man_sgml('<REFCLASS>', "\n.sp\n");
+
+#RefDescriptor
+
+
+
+
+
+########################################################################
+#
+# SYNOPSIS section and synopses
+#
+########################################################################
+
+man_sgml('<REFSYNOPSISDIV>', "\n.SH SYNOPSIS\n");
+man_sgml('</REFSYNOPSISDIV>', "\n");
+
+## FIXME! Must be made into block elements!!
+#sgml('<FUNCSYNOPSIS>', \&bold_on);
+#sgml('</FUNCSYNOPSIS>', \&font_off);
+#sgml('<CMDSYNOPSIS>', \&bold_on);
+#sgml('</CMDSYNOPSIS>', \&font_off);
+
+man_sgml('<FUNCSYNOPSIS>', sub {
+ man_output("\n.sp\n");
+ bold_on();
+});
+man_sgml('</FUNCSYNOPSIS>', sub {
+ font_off();
+ man_output("\n");
+});
+
+man_sgml('<CMDSYNOPSIS>', "\n\n");
+man_sgml('</CMDSYNOPSIS>', "\n\n");
+
+man_sgml('<FUNCPROTOTYPE>', "\n.sp\n");
+
+# Arguments to functions. This is C convention.
+sub paramdef
+{
+ if($_[0]->parent->ext->{'inparams'}) {
+ output ', ';
+ } else {
+ output ' (';
+ $_[0]->parent->ext->{'inparams'} = 1;
+ }
+}
+man_sgml('<PARAMDEF>', \&paramdef);
+man_sgml('</FUNCPROTOTYPE>', ");\n");
+man_sgml('<VOID>', "(void");
+man_sgml('<VARARGS>', "(...");
+
+
+
+sub group_start
+{
+ if(not $_[0]->parent->in('TERM')) {
+ if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+ output ' [';
+ } elsif($_[0]->attribute('CHOICE')->value =~ /req/i) {
+ output ' {';
+ }
+ }
+ $_[0]->ext->{'count'} = 1;
+}
+sub group_end
+{
+ if($_[0]->attribute('REP')->value =~ /^Repeat/i) {
+ italic_on();
+ output ' ...';
+ font_off();
+ }
+ if(not $_[0]->parent->in('TERM')) {
+ if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+ output ' ]';
+ } elsif($_[0]->attribute('CHOICE')->value =~ /req/i) {
+ output ' }';
+ }
+ }
+}
+
+sub arg_start
+{
+ # my $choice = $_[0]->attribute('CHOICE')->value;
+
+ # The content model for CmdSynopsis doesn't include #PCDATA,
+ # so we won't see any of the whitespace in the source file,
+ # so we have to add it after each component.
+ output ' ';
+
+ if($_[0]->in('GROUP')) {
+ output '| ' if $_[0]->parent->ext->{'count'} > 1;
+ $_[0]->parent->ext->{'count'}++;
+ } elsif($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+ output '[ ';
+ }
+ bold_on();
+}
+sub arg_end
+{
+ font_off();
+ if($_[0]->attribute('REP')->value =~ /^Repeat/i) {
+ italic_on();
+ output ' ...';
+ font_off();
+ }
+ if($_[0]->attribute('CHOICE')->value =~ /opt/i and
+ not $_[0]->in('GROUP')) {
+ output ' ]';
+ }
+}
+
+sgml('<ARG>', \&arg_start);
+sgml('</ARG>', \&arg_end);
+sgml('<GROUP>', \&group_start);
+sgml('</GROUP>', \&group_end);
+
+sgml('<OPTION>', \&bold_on);
+sgml('</OPTION>', \&font_off);
+
+man_sgml('<SBR>', "\n ");
+
+
+########################################################################
+#
+# General sections
+#
+########################################################################
+
+# The name of the section is handled by TITLE. This just sets
+# up the roff markup.
+man_sgml('<REFSECT1>', "\n.SH ");
+man_sgml('<REFSECT2>', "\n.SS ");
+man_sgml('<REFSECT3>', "\n.SS ");
+
+
+########################################################################
+#
+# Titles, metadata.
+#
+########################################################################
+
+sgml('<TITLE>', sub {
+ if($_[0]->in('REFERENCE') or $_[0]->in('BOOK')) {
+ $write_manpages = 1;
+ }
+ save_cdata();
+});
+sgml('</TITLE>', sub {
+ my $title = fold_string(pop_output());
+ $raw_cdata--;
+
+ if($_[0]->in('REFERENCE') or $_[0]->in('BOOK')) {
+ # We use TITLE of enclosing Reference or Book as manual name
+ $manpage_manual = $title;
+ $write_manpages = 0;
+ }
+ elsif(exists $_[0]->parent->ext->{'title'}) {
+ # By far the easiest case. Just fold the string as
+ # above, and then set the parent element's variable.
+ $_[0]->parent->ext->{'title'} = $title;
+ }
+ else {
+ # If the parent element's handlers are lazy,
+ # output the folded string for them :)
+ # We assume they want uppercase and a newline.
+ output '"', uc($title), "\"\n";
+ $newline_last = 1;
+ }
+});
+
+sgml('<ATTRIBUTION>', sub { push_output('string') });
+sgml('</ATTRIBUTION>', sub { $_[0]->parent->ext->{'attribution'} = pop_output(); });
+
+
+# IGNORE.
+sgml('<DOCINFO>', sub { push_output('nul'); });
+sgml('</DOCINFO>', sub { pop_output(); });
+sgml('<REFSECT1INFO>', sub { push_output('nul'); });
+sgml('</REFSECT1INFO>', sub { pop_output(); });
+sgml('<REFSECT2INFO>', sub { push_output('nul'); });
+sgml('</REFSECT2INFO>', sub { pop_output(); });
+sgml('<REFSECT3INFO>', sub { push_output('nul'); });
+sgml('</REFSECT3INFO>', sub { pop_output(); });
+
+sgml('<INDEXTERM>', sub { push_output('nul'); });
+sgml('</INDEXTERM>', sub { pop_output(); });
+
+
+########################################################################
+#
+# Set bold on enclosed content
+#
+########################################################################
+
+sgml('<APPLICATION>', \&bold_on); sgml('</APPLICATION>', \&font_off);
+
+sgml('<CLASSNAME>', \&bold_on); sgml('</CLASSNAME>', \&font_off);
+sgml('<STRUCTNANE>', \&bold_on); sgml('</STRUCTNAME>', \&font_off);
+sgml('<STRUCTFIELD>', \&bold_on); sgml('</STRUCTFIELD>', \&font_off);
+sgml('<SYMBOL>', \&bold_on); sgml('</SYMBOL>', \&font_off);
+sgml('<TYPE>', \&bold_on); sgml('</TYPE>', \&font_off);
+
+sgml('<ENVAR>', \&bold_on); sgml('</ENVAR>', \&font_off);
+
+sgml('<FUNCTION>', \&bold_on); sgml('</FUNCTION>', \&font_off);
+
+sgml('<EMPHASIS>', \&bold_on); sgml('</EMPHASIS>', \&font_off);
+
+sgml('<ERRORNAME>', \&bold_on); sgml('</ERRORNAME>', \&font_off);
+# ERRORTYPE
+
+sgml('<COMMAND>', \&bold_on); sgml('</COMMAND>', \&font_off);
+
+sgml('<GUIBUTTON>', \&bold_on); sgml('</GUIBUTTON>', \&font_off);
+sgml('<GUIICON>', \&bold_on); sgml('</GUIICON>', \&font_off);
+# GUILABEL
+# GUIMENU
+# GUIMENUITEM
+# GUISUBMENU
+# MENUCHOICE
+# MOUSEBUTTON
+
+sgml('<ACCEL>', \&bold_on); sgml('</ACCEL>', \&font_off);
+sgml('<KEYCAP>', \&bold_on); sgml('</KEYCAP>', \&font_off);
+sgml('<KEYSYM>', \&bold_on); sgml('</KEYSYM>', \&font_off);
+# KEYCODE
+# KEYCOMBO
+# SHORTCUT
+
+sgml('<USERINPUT>', \&bold_on); sgml('</USERINPUT>', \&font_off);
+
+sgml('<INTERFACEDEFINITION>', \&bold_on);
+sgml('</INTERFACEDEFINITION>', \&font_off);
+
+# May need to look at the CLASS
+sgml('<SYSTEMITEM>', \&bold_on);
+sgml('</SYSTEMITEM>', \&font_off);
+
+
+
+
+
+########################################################################
+#
+# Set italic on enclosed content
+#
+########################################################################
+
+sgml('<FIRSTTERM>', \&italic_on); sgml('</FIRSTTERM>', \&font_off);
+
+sgml('<FILENAME>', \&italic_on); sgml('</FILENAME>', \&font_off);
+sgml('<PARAMETER>', \&italic_on); sgml('</PARAMETER>', \&font_off);
+sgml('<PROPERTY>', \&italic_on); sgml('</PROPERTY>', \&font_off);
+
+sgml('<REPLACEABLE>', sub {
+ italic_on();
+ if($_[0]->in('TOKEN')) {
+ # When tokenizing, follow more 'intuitive' convention
+ output "<";
+ }
+});
+sgml('</REPLACEABLE>', sub {
+ if($_[0]->in('TOKEN')) {
+ output ">";
+ }
+ font_off();
+});
+
+sgml('<CITETITLE>', \&italic_on); sgml('</CITETITLE>', \&font_off);
+sgml('<FOREIGNPHRASE>', \&italic_on); sgml('</FOREIGNPHRASE>', \&font_off);
+
+sgml('<LINEANNOTATION>', \&italic_on); sgml('</LINEANNOTATION>', \&font_off);
+
+
+
+
+
+
+########################################################################
+#
+# Other 'inline' elements
+#
+########################################################################
+
+man_sgml('<EMAIL>', '<');
+man_sgml('</EMAIL>', '>');
+man_sgml('<OPTIONAL>', '[');
+man_sgml('</OPTIONAL>', ']');
+
+man_sgml('</TRADEMARK>', "\\u\\s-2TM\\s+2\\d");
+
+man_sgml('<COMMENT>', "[Comment: ");
+man_sgml('</COMMENT>', "]");
+
+man_sgml('<QUOTE>', "``");
+man_sgml('</QUOTE>', "''");
+
+#man_sgml('<LITERAL>', '"');
+#man_sgml('</LITERAL>', '"');
+
+# No special presentation:
+
+# AUTHOR
+# AUTHORINITIALS
+
+# ABBREV
+# ACTION
+# ACRONYM
+# ALT
+# CITATION
+# PHRASE
+# QUOTE
+# WORDASWORD
+
+# COMPUTEROUTPUT
+# MARKUP
+# PROMPT
+# RETURNVALUE
+# SGMLTAG
+# TOKEN
+
+# DATABASE
+# HARDWARE
+# INTERFACE
+# MEDIALABEL
+
+# There doesn't seem to be a good way to represent LITERAL in -man
+
+
+
+########################################################################
+#
+# Paragraph and paragraph-like elements
+#
+########################################################################
+
+sub para_start {
+ output "\n" unless $newline_last++;
+
+ # In lists, etc., don't start paragraph with .PP since
+ # the indentation will be gone.
+
+ if($_[0]->parent->ext->{'nobreak'}==1) {
+ # Usually this is the FIRST element of
+ # a hanging tag, so we MUST not do a full
+ # paragraph break.
+ $_[0]->parent->ext->{'nobreak'} = 2;
+ } elsif($_[0]->parent->ext->{'nobreak'}==2) {
+ # Usually these are the NEXT elements of
+ # a hanging tag. If we break using a blank
+ # line, we're okay.
+ output "\n";
+ } else {
+ # Normal case. (For indented blocks too, at least
+ # -man isn't so braindead in this area.)
+ output ".PP\n";
+ }
+}
+# Actually applies to a few other block elements as well
+sub para_end {
+ output "\n" unless $newline_last++;
+}
+
+sgml('<PARA>', \&para_start);
+sgml('</PARA>', \&para_end);
+sgml('<SIMPARA>', \&para_start);
+sgml('</SIMPARA>', \&para_end);
+
+# Nothing special, except maybe FIXME set nobreak.
+sgml('<INFORMALEXAMPLE>', \&para_start);
+sgml('</INFORMALEXAMPLE>', \&para_end);
+
+
+
+
+
+########################################################################
+#
+# Blocks using SS sections
+#
+########################################################################
+
+# FIXME: We need to consider the effects of SS
+# in a hanging tag :(
+
+# Complete with the optional-title dilemma (again).
+sgml('<ABSTRACT>', sub {
+ $_[0]->ext->{'title'} = 'ABSTRACT';
+ output "\n" unless $newline_last++;
+ push_output('string');
+});
+sgml('</ABSTRACT>', sub {
+ my $content = pop_output();
+
+ # As ABSTRACT is never on the same level as RefSect1,
+ # this leaves us with only .SS in terms of -man macros.
+ output ".SS \"", uc($_[0]->ext->{'title'}), "\"\n";
+
+ output $content;
+ output "\n" unless $newline_last++;
+});
+
+# Ah, I needed a break. Example always has a title.
+man_sgml('<EXAMPLE>', "\n.SS ");
+sgml('</EXAMPLE>', \&para_end);
+
+# Same with sidebar.
+man_sgml('<SIDEBAR>', "\n.SS ");
+sgml('</SIDEBAR>', \&para_end);
+
+# NO title.
+man_sgml('<HIGHLIGHTS>', "\n.SS HIGHLIGHTS\n");
+sgml('</HIGHLIGHTS>', \&para_end);
+
+
+
+
+########################################################################
+#
+# Indented 'Block' elements
+#
+########################################################################
+
+sub indent_block_start
+{
+ output "\n" unless $newline_last++;
+ output ".sp\n.RS\n";
+}
+sub indent_block_end
+{
+ output "\n" unless $newline_last++;
+ output ".RE\n";
+}
+
+# This element is almost like an admonition (below),
+# only the default title is blank :)
+
+sgml('<BLOCKQUOTE>', sub {
+ $_[0]->ext->{'title'} = '';
+ output "\n" unless $newline_last++;
+ push_output('string');
+});
+sgml('</BLOCKQUOTE>', sub {
+ my $content = pop_output();
+
+ indent_block_start();
+
+ if($_[0]->ext->{'title'}) {
+ output ".B \"", $_[0]->ext->{'title'}, ":\"\n";
+ }
+
+ output $content;
+
+ if($_[0]->ext->{'attribution'}) {
+ output "\n" unless $newline_last++;
+ # One place where roff's space-sensitivity makes sense :)
+ output "\n -- ";
+ output $_[0]->ext->{'attribution'} . "\n";
+ }
+
+ indent_block_end();
+});
+
+# Set off admonitions from the rest of the text by indenting.
+# FIXME: Need to check if this works inside paragraphs, not enclosing them.
+sub admonition_end {
+ my $content = pop_output();
+
+ indent_block_start();
+
+ # When the admonition is only one paragraph,
+ # it looks nicer if the title was inline.
+ my $num_para;
+ while ($content =~ /^\.PP/gm) { $num_para++ }
+ if($num_para==1) {
+ $content =~ s/^\.PP\n//;
+ }
+
+ output ".B \"" . $_[0]->ext->{'title'} . ":\"\n";
+ output $content;
+
+ indent_block_end();
+}
+
+sgml('<NOTE>', sub {
+ # We can't see right now whether or not there is a TITLE
+ # element, so we have to save the output now and add it back
+ # at the end of this admonition.
+ $_[0]->ext->{'title'} = 'Note';
+
+ # Although admonition_end's indent_block_start will do this,
+ # we need to synchronize the output _now_
+ output "\n" unless $newline_last++;
+
+ push_output('string');
+});
+sgml('</NOTE>', \&admonition_end);
+
+# Same as above.
+sgml('<WARNING>', sub {
+ $_[0]->ext->{'title'} = 'Warning';
+ output "\n" unless $newline_last++;
+ push_output('string');
+});
+sgml('</WARNING>', \&admonition_end);
+
+sgml('<TIP>', sub {
+ $_[0]->ext->{'title'} = 'Tip';
+ output "\n" unless $newline_last++;
+ push_output('string');
+});
+sgml('</TIP>', \&admonition_end);
+sgml('<CAUTION>', sub {
+ $_[0]->ext->{'title'} = 'Caution';
+ output "\n" unless $newline_last++;
+ push_output('string');
+});
+sgml('</CAUTION>', \&admonition_end);
+
+sgml('<IMPORTANT>', sub {
+ $_[0]->ext->{'title'} = 'Important';
+ output "\n" unless $newline_last++;
+ push_output('string');
+});
+sgml('</IMPORTANT>', \&admonition_end);
+
+
+
+
+
+
+
+
+
+
+
+
+########################################################################
+#
+# Verbatim displays.
+#
+########################################################################
+
+sub verbatim_start {
+ output "\n" unless $newline_last++;
+
+ if($_[0]->parent->ext->{'nobreak'}==1) {
+ # Usually this is the FIRST element of
+ # a hanging tag, so we MUST not do a full
+ # paragraph break.
+ $_[0]->parent->ext->{'nobreak'} = 2;
+ } else {
+ output "\n";
+ }
+
+ output(".nf\n") unless $nocollapse_whitespace++;
+}
+
+sub verbatim_end {
+ output "\n" unless $newline_last++;
+ output(".fi\n") unless --$nocollapse_whitespace;
+}
+
+sgml('<PROGRAMLISTING>', \&verbatim_start);
+sgml('</PROGRAMLISTING>', \&verbatim_end);
+
+sgml('<SCREEN>', \&verbatim_start);
+sgml('</SCREEN>', \&verbatim_end);
+
+sgml('<LITERALLAYOUT>', \&verbatim_start);
+sgml('</LITERALLAYOUT>', \&verbatim_end);
+
+#sgml('<SYNOPSIS>', sub {
+# if($_[0]->attribute('FORMAT')->value =~ /linespecific/i) {
+# &verbatim_start;
+# } else {
+# roffcmd("");
+# }
+#});
+#
+#sgml('</SYNOPSIS>', sub {
+# if($_[0]->attribute('FORMAT')->value =~ /linespecific/i) {
+# &verbatim_end;
+# }
+# else {
+# roffcmd("");# not sure about this.
+# }
+#});
+sgml('<SYNOPSIS>', \&verbatim_start);
+sgml('</SYNOPSIS>', \&verbatim_end);
+
+
+
+
+
+
+
+
+
+########################################################################
+#
+# Lists
+#
+########################################################################
+
+# Indent nested lists.
+sub indent_list_start {
+ if($list_nestlevel++) {
+ output "\n" unless $newline_last++;
+ output ".RS\n";
+ }
+}
+sub indent_list_end {
+ if(--$list_nestlevel) {
+ output "\n" unless $newline_last++;
+ output ".RE\n";
+ }
+}
+
+sgml('<VARIABLELIST>', \&indent_list_start);
+sgml('</VARIABLELIST>', \&indent_list_end);
+sgml('<ITEMIZEDLIST>', \&indent_list_start);
+sgml('</ITEMIZEDLIST>', \&indent_list_end);
+sgml('<ORDEREDLIST>', sub {
+ indent_list_start();
+ $_[0]->ext->{'count'} = 1;
+});
+sgml('</ORDEREDLIST>', \&indent_list_end);
+sgml('<GLOSSLIST>', \&indent_list_start);
+sgml('</GLOSSLIST>', \&indent_list_end);
+
+# Output content on one line, bolded.
+sgml('<TERM>', sub {
+ output "\n" unless $newline_last++;
+ output ".TP\n";
+ bold_on();
+ push_output('string');
+});
+sgml('</TERM>', sub {
+ my $term = pop_output();
+ $term =~ tr/\n/ /;
+ output $term;
+ font_off();
+ output "\n";
+ $newline_last = 1;
+});
+sgml('<GLOSSTERM>', sub {
+ output "\n" unless $newline_last++;
+ output ".TP\n";
+ bold_on();
+ push_output('string');
+});
+sgml('</GLOSSTERM>', sub {
+ my $term = pop_output();
+ $term =~ tr/\n/ /;
+ output $term;
+ font_off();
+ output "\n";
+ $newline_last = 1;
+});
+
+sgml('<LISTITEM>', sub {
+ # A bulleted list.
+ if($_[0]->in('ITEMIZEDLIST')) {
+ output "\n" unless $newline_last++;
+ output ".TP 0.2i\n\\(bu\n";
+ }
+
+ # Need numbers.
+ # Assume Arabic numeration for now.
+ elsif($_[0]->in('ORDEREDLIST')) {
+ output "\n" unless $newline_last++;
+ output ".TP 3\n", $_[0]->parent->ext->{'count'}++, ". \n";
+ }
+
+ $_[0]->ext->{'nobreak'} = 1;
+});
+sgml('<GLOSSDEF>', sub {
+ $_[0]->ext->{'nobreak'} = 1;
+});
+
+sgml('<SIMPLELIST>', sub {
+ $_[0]->ext->{'first_member'} = 1;
+});
+
+sgml('<MEMBER>', sub {
+ my $parent = $_[0]->parent;
+
+ if($parent->attribute('TYPE')->value =~ /Inline/i) {
+ if($parent->ext->{'first_member'}) {
+ # If this is the first member don't put any commas
+ $parent->ext->{'first_member'} = 0;
+ } else {
+ output ", ";
+ }
+ } elsif($parent->attribute('TYPE')->value =~ /Vert/i) {
+ output "\n" unless $newline_last++;
+ output "\n";
+ }
+});
+
+
+
+
+
+########################################################################
+#
+# Stuff we don't know how to handle (yet)
+#
+########################################################################
+
+# Address blocks:
+
+# Credit stuff:
+# ACKNO
+# ADDRESS
+# AFFILIATION
+# ARTPAGENUMS
+# ATTRIBUTION
+# AUTHORBLURB
+# AUTHORGROUP
+# OTHERCREDIT
+# HONORIFIC
+
+# Areas:
+# AREA
+# AREASET
+# AREASPEC
+
+
+
+
+
+########################################################################
+#
+# Linkage, cross references
+#
+########################################################################
+
+# Print the URL
+sgml('</ULINK>', sub {
+ output ' <URL:', $_[0]->attribute('URL')->value, '>';
+ $newline_last = 0;
+});
+
+# If cross reference target is a RefEntry,
+# output CiteRefEntry-style references.
+sgml('<XREF>', sub {
+ my $id = $_[0]->attribute('LINKEND')->value;
+ my $manref = $Refs->get("refentry:$id");
+
+ if($manref) {
+ my ($title, $sect) = ($manref =~ /(.*)(\(.*\))/);
+ bold_on();
+ output $title;
+ font_off();
+ output $sect;
+ } else {
+ $blank_xrefs++ if $write_manpages;
+ output "[XRef to $id]";
+ }
+
+ $newline_last = 0;
+});
+
+# Anchor
+
+
+
+
+########################################################################
+#
+# Other handlers
+#
+########################################################################
+
+man_sgml('|[lt ]|', '<');
+man_sgml('|[gt ]|', '>');
+man_sgml('|[amp ]|', '&');
+man_sgml('|[minus ]|', '-');
+man_sgml('|[copy ]|', '(C)');
+man_sgml('|[nbsp ]|', '\~');
+man_sgml('|[thinsp]|', '\~');
+
+#
+# Default handlers (uncomment these if needed). Right now, these are set
+# up to gag on any unrecognised elements, sdata, processing-instructions,
+# or entities.
+#
+# sgml('start_element',sub { die "Unknown element: " . $_[0]->name; });
+# sgml('end_element','');
+
+# This is for weeding out and escaping certain characters.
+# This looks like it's inefficient since it's done on every line, but
+# in reality, SGMLSpm and sgmlspl parsing ESIS takes _much_ longer.
+
+sgml('cdata', sub
+{
+ if(!$write_manpages) { return; }
+ elsif($raw_cdata) { output $_[0]; return; }
+
+ # Escape backslashes
+ $_[0] =~ s/\\/\\\\/g;
+
+ # Escape dots and single quotes in column 1
+ $_[0] =~ s/^\./\\\&\./;
+ $_[0] =~ s/^\'/\\\&\'/;
+
+ # In non-'pre'-type elements:
+ if(!$nocollapse_whitespace) {
+ # Change tabs to spaces
+ $_[0] =~ tr/\t/ /;
+
+ # Do not allow indents at beginning of line
+ # groff chokes on that.
+ if($newline_last) {
+ $_[0] =~ s/^ +//;
+
+ # If the line is all blank, don't do anything.
+ if($_[0] eq '') { return; }
+ }
+ }
+
+ $newline_last = 0;
+
+ output $_[0];
+});
+
+
+# When in whitespace-collapsing mode, we disallow consecutive newlines.
+
+sgml('re', sub
+{
+ if($nocollapse_whitespace || !$newline_last) {
+ output "\n";
+ }
+
+ $newline_last = 1;
+});
+
+sgml('sdata',sub
+{
+ die "Unknown SDATA: " . $_[0];
+});
+sgml('pi',sub { die "Unknown processing instruction: " . $_[0]; });
+sgml('entity',sub { die "Unknown external entity: " . $_[0]->name; });
+sgml('start_subdoc',sub { die "Unknown subdoc entity: " . $_[0]->name; });
+sgml('end_subdoc','');
+sgml('conforming','');
+
+1;
+
diff --git a/helpers/docbook2texi-spec.pl b/helpers/docbook2texi-spec.pl
new file mode 100644
index 0000000..b2fd563
--- /dev/null
+++ b/helpers/docbook2texi-spec.pl
@@ -0,0 +1,848 @@
+=head1 NAME
+
+docbook2texi-spec - convert DocBook Books to a Texinfo document
+
+=head1 DESCRIPTION
+
+This is a sgmlspl spec file that produces a Texinfo file
+from DocBook markup.
+
+=head1 LIMITATIONS
+
+Trying docbook2info on non-DocBook or non-conformant SGML results in
+undefined behavior. :-)
+
+This program is a slow, dodgy Perl script.
+
+=head1 COPYRIGHT
+
+Copyright (C) 1998-1999 Steve Cheng <steve@ggi-project.org>
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+You should have received a copy of the GNU General Public License along with
+this program; see the file COPYING. If not, please write to the Free
+Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+=cut
+
+# $Id: docbook2texi-spec.pl,v 1.1 2000/07/21 20:22:30 rosalia Exp $
+
+use SGMLS; # Use the SGMLS package.
+use SGMLS::Output; # Use stack-based output.
+use SGMLS::Refs;
+
+########################################################################
+# SGMLSPL script produced automatically by the script sgmlspl.pl
+#
+# Document Type: BOOK
+# Edited by: me :)
+########################################################################
+
+
+$nocollapse_whitespace = 0; # Current whitespace collapse counter.
+$newline_last = 1; # At beginning of line?
+
+$skip_inline = 0;
+$id_counter = 1;
+$raw_cdata = 0;
+
+$basename = shift || "db2texi";
+
+sgml('start', sub {
+ $Refs = new SGMLS::Refs("$basename.refs");
+});
+sgml('end', sub {
+ $Refs->warn();
+});
+
+
+########################################################################
+#
+# Output helpers
+#
+########################################################################
+
+sub save_cdata
+{
+ $raw_cdata++;
+ push_output('string');
+}
+
+# Copied from docbook2man.
+# Texinfo's newline rules aren't so stringent, so
+# perhaps we can do away with at least some of these cases for speed.
+
+sub texi_sgml
+{
+ if(ref($_[1]) eq 'CODE') {
+ return &sgml;
+ }
+
+ my $s = $_[1];
+
+ $s =~ s/\\/\\\\/g;
+ $s =~ s/'/\\'/g;
+
+ # \n at the beginning means start at beginning of line
+ if($s =~ s/^\n//) {
+ $sub = 'sub { output "\n" unless $newline_last++; ';
+ if($s eq '') {
+ sgml($_[0], eval('sub { output "\n" unless $newline_last++; }'));
+ } elsif($s =~ /\n$/) {
+ sgml($_[0], eval("sub { output \"\\n\" unless \$newline_last++; output '$s'; }"));
+ } else {
+ sgml($_[0], eval("sub { output \"\\n\" unless \$newline_last; output '$s'; \$newline_last = 0; }"));
+ }
+ } else {
+ if($s =~ /\n$/) {
+ sgml($_[0], eval("sub { output '$s'; \$newline_last = 1; }"));
+ } else {
+ sgml($_[0], eval("sub { output '$s'; \$newline_last = 0; }"));
+ }
+ }
+}
+
+sub texi_output
+{
+ $_ = shift;
+ if(s/^\n//) {
+ output "\n" unless $newline_last++;
+ }
+ return if $_ eq '';
+
+ output $_;
+
+ if(@_) {
+ output @_;
+ $newline_last = (pop(@_) =~ /\n$/);
+ } else {
+ $newline_last = ($_ =~ /\n$/)
+ }
+}
+
+# Fold lines into one, quote some characters
+sub fold_string
+{
+ $_ = shift;
+
+ for($_[0]) {
+ tr/\t/\n /;
+ s/\@/\@\@/g;
+ s/\{/\@\{/g;
+ s/\}/\@\}/g;
+ }
+
+ # Trim whitespace from beginning and end.
+ s/^ +//;
+ s/ +$//;
+
+ return $_;
+}
+
+# Another version of sgml(), for 'inline' @-commands,
+# and prevent nesting them.
+sub _inline
+{
+ my ($gi, $tcmd) = @_;
+
+ $tcmd =~ s/\\/\\\\/g;
+ $tcmd =~ s/'/\\'/g;
+
+ sgml($gi, eval("sub { output '${tcmd}\{' unless \$raw_cdata or \$skip_inline++ }"));
+
+ $gi =~ s/^</<\//;
+ sgml($gi, eval("sub { output '}' unless \$raw_cdata or --\$skip_inline }"));
+}
+
+
+sub generate_id {
+ return "ID" . $id_counter++;
+}
+
+
+
+
+########################################################################
+#
+# Metadata
+#
+########################################################################
+
+sub author_start {
+ if($_[0]->within('BOOKINFO')) {
+ save_cdata();
+ }
+}
+sub author_end {
+ if($_[0]->within('BOOKINFO')) {
+ texi_output('@author{' . fold_string(pop_output()) . "\}\n");
+ $raw_cdata--;
+ }
+}
+
+sgml('<AUTHOR>', \&author_start);
+sgml('</AUTHOR>', \&author_end);
+sgml('<EDITOR>', \&author_start);
+sgml('</EDITOR>', \&author_end);
+sgml('<COLLAB>', \&author_start);
+sgml('</COLLAB>', \&author_end);
+sgml('<CORPAUTHOR>', \&author_start);
+sgml('</CORPAUTHOR>', \&author_end);
+sgml('<OTHERCREDIT>', \&author_start);
+sgml('</OTHERCREDIT>', \&author_end);
+
+sgml('</FIRSTNAME>', ' ');
+sgml('</SURNAME>', ' ');
+sgml('</HONORIFIC>', ' ');
+sgml('</LINEAGE>', ' ');
+sgml('</OTHERNAME>', ' ');
+sgml('</AFFILIATION>', ' ');
+
+# Ignore content.
+sgml('<CONTRIB>', sub { push_output('nul') });
+sgml('</CONTRIB>', sub { pop_output });
+sgml('<AUTHORBLURB>', sub { push_output('nul') });
+sgml('</AUTHORBLURB>', sub { pop_output });
+
+sgml('<DOCINFO>', sub { push_output('nul'); });
+sgml('</DOCINFO>', sub { pop_output(); });
+sgml('<REFSECT1INFO>', sub { push_output('nul'); });
+sgml('</REFSECT1INFO>', sub { pop_output(); });
+sgml('<REFSECT2INFO>', sub { push_output('nul'); });
+sgml('</REFSECT2INFO>', sub { pop_output(); });
+sgml('<REFSECT3INFO>', sub { push_output('nul'); });
+sgml('</REFSECT3INFO>', sub { pop_output(); });
+
+sgml('<TITLEABBREV>', sub { push_output('nul') });
+sgml('</TITLEABBREV>', sub { pop_output() });
+
+texi_sgml('<LEGALNOTICE>', "\n\@page\n\@vskip 0pt plus 1fill\n");
+
+sgml('<BOOKINFO>', sub {
+ texi_output("\n\@titlepage\n");
+ texi_output('@title{', $doc_title, "\}\n");
+});
+#texi_sgml('</BOOKINFO>', "\n\@end titlepage\n");
+texi_sgml('</BOOKINFO>', sub {
+ texi_output "\n\@end titlepage\n\n";
+ texi_output "\@node Top\n\@top\n\n";
+
+ # Generate top menu for BOOK.
+ $_[0]->parent->ext->{'output_toc'} = 1;
+
+ # This is so that elements below can find me.
+ $_[0]->parent->ext->{'id'} = $_[0]->parent->attribute('ID')->value || generate_id();
+});
+
+sgml('<TITLE>', \&save_cdata);
+sgml('</TITLE>', sub {
+ my $title = fold_string(pop_output());
+ $raw_cdata--;
+
+ if($_[0]->in('BOOKINFO')) {
+ texi_output("\n\@subtitle{", $title, "\}\n");
+ }
+ elsif(exists $_[0]->parent->ext->{'title'}) {
+ # By far the easiest case. Just fold the string as
+ # above, and then set the parent element's variable.
+ $_[0]->parent->ext->{'title'} = $title;
+ }
+ elsif(exists $_[0]->parent->ext->{'nodesection'}) {
+ # Start new node, since we now know its title.
+
+ # This node.
+ $me = $_[0]->parent;
+
+ my $nodename = fold_string($me->attribute('XREFLABEL')->value) || $title;
+ $nodename =~ s/,/ /;
+
+ texi_output("\n\n\@node $nodename\n");
+
+ # The heading such as @chapter $title.
+ texi_output($me->ext->{'nodesection'}, " $title\n");
+
+ # This is so that elements below can find me.
+ my $id = $me->attribute('ID')->value || generate_id();
+ $me->ext->{'id'} = $id;
+
+ # Don't overwrite info from previous parse.
+ if($Refs->get($id) eq '') {
+ $Refs->put($id, $nodename);
+
+ # Add myself to parent node's list of nodes.
+ my $pid = $me->parent->ext->{'id'};
+ $Refs->put($pid, $Refs->get($pid) . ",$id");
+ }
+ }
+ else {
+ if($_[0]->in('BOOK')) {
+ $doc_title = $title;
+ }
+ output $title, "\n";
+ $newline_last++;
+ }
+});
+
+# Appendix
+# Article
+
+
+
+
+
+
+
+
+
+########################################################################
+#
+# Major sectioning elements
+#
+########################################################################
+
+sgml('<BOOK>', "\\input texinfo\n\@settitle ");
+texi_sgml('</BOOK>', "\n\n\@bye\n");
+
+# Start a new section with new node.
+# Most of the handling is at </TITLE>.
+sub start_node
+{
+ $_[0]->ext->{'nodesection'} = $_[1];
+
+ # Flag that the first child node ...
+ $_[0]->ext->{'output_toc'} = 1;
+
+ # ... need to output a list of nodes.
+ if($_[0]->parent->ext->{'output_toc'}) {
+ $_[0]->parent->ext->{'output_toc'} = 0;
+
+ my @nodes = split(/,/, $Refs->get($_[0]->parent->ext->{'id'}));
+ shift @nodes;
+
+ texi_output("\n\n\@menu\n");
+
+ foreach(@nodes) {
+ my ($nodename) = split(/,/, $Refs->get($_));
+ output "* ", $nodename, "::\n";
+ }
+
+ texi_output("\n\n\@end menu\n");
+ }
+}
+
+sgml('<PREFACE>', sub { start_node $_[0], '@chapter'; });
+sgml('<CHAPTER>', sub { start_node $_[0], '@chapter'; });
+
+sgml('<SECT1>', sub { start_node $_[0], '@section'; });
+sgml('<SECT2>', sub { start_node $_[0], '@subsection'; });
+sgml('<SECT3>', sub { start_node $_[0], '@subsubsection'; });
+sgml('<SECT4>', sub { start_node $_[0], '@subsubsection'; });
+sgml('<SECT5>', sub { start_node $_[0], '@subsubsection'; });
+
+
+########################################################################
+#
+# Reference pages
+#
+########################################################################
+
+sgml('<REFENTRY>', sub {
+ # Determine what it is under ...
+ # FIXME! Add more of these parents!
+ if($_[0]->in('CHAPTER')) {
+ start_node $_[0], '@section';
+ } elsif($_[0]->in('SECT1')) {
+ start_node $_[0], '@subsection';
+ } else {
+ # From Sect2 and after
+ start_node $_[0], '@subsubsection';
+ }
+});
+
+sgml('<REFENTRYTITLE>', sub {
+ if($_[0]->in('REFMETA')) {
+ save_cdata();
+ }
+});
+sgml('</REFENTRYTITLE>', sub {
+ if($_[0]->in('REFMETA')) {
+ my $title = fold_string(pop_output());
+ $raw_cdata--;
+
+ # This node.
+ my $me = $_[0]->parent->parent;
+
+ my $nodename = fold_string($me->attribute('XREFLABEL')->value) || $title;
+ $nodename =~ s/,/ /;
+
+ texi_output("\n\n\@node $nodename\n");
+
+ # The heading such as @chapter $title.
+ texi_output($me->ext->{'nodesection'}, " $title\n");
+
+ # This is so that elements below can find me.
+ my $id = $me->attribute('ID')->value || generate_id();
+ $me->ext->{'id'} = $id;
+
+ # Don't overwrite info from previous parse.
+ if($Refs->get($id) eq '') {
+ $Refs->put($id, $nodename);
+
+ # Add myself to parent node's list of nodes.
+ my $pid = $me->parent->ext->{'id'};
+ $Refs->put($pid, $Refs->get($pid) . ",$id");
+ }
+ }
+});
+
+sgml('<MANVOLNUM>', sub {
+ if($_[0]->in('REFMETA')) { push_output('nul') }
+ else { texi_output '(' }
+});
+sgml('</MANVOLNUM>', sub {
+ if($_[0]->in('REFMETA')) { pop_output() }
+ else { texi_output ')' }
+});
+
+sgml('<REFMISCINFO>', sub { push_output('nul') });
+sgml('</REFMISCINFO>', sub { pop_output() });
+
+sgml('<REFNAMEDIV>', sub {
+ $_[0]->ext->{'first_refname'} = 1;
+
+ # FIXME! Add more of these parents!
+ if($_[0]->parent->in('CHAPTER')) {
+ texi_output "\n\n\@unnumberedsubsec Name\n";
+ } else {
+ texi_output "\n\n\@unnumberedsubsubsec Name\n";
+ }
+});
+
+sgml('<REFNAME>', sub {
+ if($_[0]->parent->ext->{'first_refname'}) {
+ $_[0]->parent->ext->{'first_refname'} = 0;
+ return;
+ }
+ output ", ";
+});
+
+sgml('<REFPURPOSE>', " --- ");
+
+# RefDescriptor
+
+sgml('<REFSYNOPSISDIV>', sub {
+ # FIXME! Add more of these parents!
+ if($_[0]->parent->in('CHAPTER')) {
+ texi_output "\n\@unnumberedsubsec Synopsis\n";
+ } else {
+ texi_output "\n\@unnumberedsubsubsec Synopsis\n";
+ }
+});
+
+sgml('<REFSECT1>', sub {
+ # FIXME! Add more of these parents!
+ if($_[0]->parent->in('CHAPTER')) {
+ texi_output "\n\n\@unnumberedsubsec ";
+ } else {
+ texi_output "\\nn\@unnumberedsubsubsec ";
+ }
+});
+
+sgml('<REFSECT2>', sub { start_node $_[0], '@unnumberedsubsubsec' });
+sgml('<REFSECT3>', sub { start_node $_[0], '@unnumberedsubsubsec' });
+
+
+
+
+
+########################################################################
+#
+# Synopses
+#
+########################################################################
+
+sgml('<FUNCSYNOPSIS>', sub { $skip_inline++ });
+sgml('</FUNCSYNOPSIS>', sub { $skip_inline-- });
+sgml('<CMDSYNOPSIS>', sub { $skip_inline++ });
+sgml('</CMDSYNOPSIS>', sub { $skip_inline-- });
+
+sgml('<FUNCPROTOTYPE>', "\n\n");
+
+# Arguments to functions. This is C convention.
+texi_sgml('<PARAMDEF>', '(');
+texi_sgml('</PARAMDEF>', ');');
+texi_sgml('<VOID>', '(void);');
+
+## ARG: should be bold, but not needed.
+#
+
+
+
+
+
+
+
+########################################################################
+#
+# 'Useful highlighting'
+#
+########################################################################
+
+
+_inline('<CITETITLE>', '@cite');
+_inline('<EMAIL>', '@email');
+_inline('<FIRSTTERM>', '@dfn');
+_inline('<FILENAME>', '@file');
+
+_inline('<ACCEL>', '@key');
+_inline('<KEYCAP>', '@key');
+_inline('<KEYCOMBO>', '@key');
+_inline('<KEYSYM>', '@key');
+_inline('<USERINPUT>', '@kbd');
+
+_inline('<LITERAL>', '@samp');
+_inline('<MARKUP>', '@samp');
+_inline('<SGMLTAG>', '@samp');
+_inline('<TOKEN>', '@samp');
+
+_inline('<CLASSNAME>', '@code');
+_inline('<ENVAR>', '@code');
+_inline('<FUNCTION>', '@code');
+_inline('<PARAMETER>', '@code'); # not always
+_inline('<RETURNVALUE>', '@code');
+_inline('<STRUCTFIELD>', '@code');
+_inline('<STRUCTNAME>', '@code');
+_inline('<SYMBOL>', '@code');
+_inline('<TYPE>', '@code');
+
+_inline('<ACRONYM>', '@sc');
+_inline('<EMPHASIS>', '@emph');
+
+# Only in certain contexts
+#sgml('<REPLACEABLE>'
+
+sgml('<OPTIONAL>', "[");
+sgml('</OPTIONAL>', "]");
+
+sgml('<COMMENT>', "[Comment: ");
+sgml('</COMMENT>', "]");
+
+# ACTION
+# ALT
+
+# AUTHOR
+# AUTHORINITIALS
+
+# ABBREV
+# CITATION
+# FOREIGNPHRASE
+# PHRASE
+# QUOTE
+# WORDASWORD
+
+# COMPUTEROUTPUT
+# LITERAL
+# MARKUP
+# PROMPT
+# RETURNVALUE
+# SGMLTAG
+# TOKEN
+
+# DATABASE
+# HARDWARE
+# INTERFACE
+# MEDIALABEL
+# SYSTEMITEM
+
+sgml('<CITEREFENTRY>', sub { $skip_inline++ });
+sgml('</CITEREFENTRY>', sub { $skip_inline-- });
+
+
+
+########################################################################
+#
+# 'Block' elements
+#
+########################################################################
+
+sub para_start {
+ output "\n" unless $newline_last++;
+
+ if($_[0]->parent->ext->{'nobreak'}) {
+ # Usually this is the FIRST element of
+ # an @item, so we MUST not do a full
+ # paragraph break.
+ $_[0]->parent->ext->{'nobreak'} = 0;
+ } else {
+ output "\n";
+ }
+}
+
+# Actually applies to a few other block elements as well
+sub para_end {
+ output "\n" unless $newline_last++;
+}
+
+sgml('<PARA>', \&para_start);
+sgml('<SIMPARA>', \&para_end);
+
+texi_sgml('<EXAMPLE>', "\n\@unnumberedsubsubsec ");
+texi_sgml('</EXAMPLE>', "\n\n");
+
+
+
+########################################################################
+#
+# Verbatim displays.
+#
+########################################################################
+
+sub verbatim_on {
+ texi_output("\n\n");
+ texi_output("\@example\n") unless $no_collapase++;
+}
+
+sub verbatim_off {
+ texi_output("\n\n");
+ texi_output("\@end example\n") unless --$no_collapase;
+}
+
+texi_sgml('<PROGRAMLISTING>', \&verbatim_on);
+texi_sgml('</PROGRAMLISTING>', \&verbatim_off);
+texi_sgml('<SCREEN>', \&verbatim_on);
+texi_sgml('</SCREEN>', \&verbatim_off);
+texi_sgml('<LITERALLAYOUT>', \&verbatim_on);
+texi_sgml('</LITERALLAYOUT>', \&verbatim_off);
+texi_sgml('<SYNOPSIS>', \&verbatim_on);
+texi_sgml('</SYNOPSIS>', \&verbatim_off);
+
+
+
+########################################################################
+#
+# Admonitions and other 'outside flow'
+#
+########################################################################
+
+## These are supposed to be set off from the text, so
+## proper indentation is not so important.
+#
+#sub admonition_end {
+# output "\n" unless $newline_last++;
+# output ".sp\n";
+#}
+#
+#$admonition_end = *admonition_end{CODE};
+#
+
+# FIXME! Lotsa things!
+
+#sgml('<NOTE>', "\n\n\@cartouche\nNote: ");
+#sgml('</NOTE>', "\n\n\@end cartouche\n");
+#sgml('<WARNING>', "\n\n\@cartouche\nWarning: ");
+#sgml('</WARNING>', "\n\n\@end cartouche\n");
+#sgml('<TIP>', "\n\n\@cartouche\nTip: ");
+#sgml('</TIP>', "\n\n\@end cartouche\n");
+#sgml('<CAUTION>', "\n\n\@cartouche\nCaution: ");
+#sgml('</CAUTION>', "\n\n\@end cartouche\n");
+#sgml('<IMPORTANT>', "\n\n\@cartouche\nImportant: ");
+#sgml('</IMPORTANT>', "\n\n\@end cartouche\n");
+
+#sgml('<NOTE>', sub {
+# output "\n" unless $newline_last++;
+# output ".PP\n";
+# output ".B Note: \n";
+# $listitem_first = 1;
+#});
+#sgml('</NOTE>', $admonition_end);
+
+
+
+
+########################################################################
+#
+# Lists
+#
+########################################################################
+
+texi_sgml('<VARIABLELIST>', "\n\@table \@asis\n");
+texi_sgml('</VARIABLELIST>', "\n\@end table\n");
+texi_sgml('<ORDEREDLIST>', "\n\@enumerate\n");
+texi_sgml('</ORDEREDLIST>', "\n\@end enumerate\n");
+texi_sgml('<ITEMIZEDLIST>', "\n\@itemize \@bullet\n");
+texi_sgml('</ITEMIZEDLIST>', "\n\@end itemize\n");
+
+sgml('<VARLISTENTRY>', sub {
+ $_[0]->ext->{'first_term'} = 1;
+});
+
+sgml('<TERM>', sub {
+ if($_[0]->parent->ext->{'first_term'}) {
+ $_[0]->parent->ext->{'first_term'} = 0;
+ texi_output "\n\n\@item ";
+ } else {
+ texi_output "\n\n\@itemx ";
+ }
+ save_cdata();
+});
+sgml('</TERM>', sub {
+ output fold_string(pop_output()) . "\n";
+ $newline_last = 1;
+ $raw_cdata--;
+});
+
+sgml('<LISTITEM>', sub {
+ texi_output "\n\n\@item\n" unless $_[0]->in('VARLISTENTRY');
+ $_[0]->ext->{'nobreak'} = 1;
+});
+
+sgml('<SIMPLELIST>', sub {
+ $_[0]->ext->{'first_member'} = 1;
+});
+
+sgml('<MEMBER>', sub {
+ my $listtype = $_[0]->parent->attribute(TYPE)->value;
+
+ if($listtype =~ /Inline/i) {
+ if($_[0]->parent->ext->{'first_member'}) {
+ # If this is the first member don't put any commas
+ $_[0]->parent->ext->{'first_member'} = 0;
+ } else {
+ output ", ";
+ }
+ } elsif($listtype =~ /Vert/i) {
+ texi_output("\n\n");
+ }
+});
+
+
+
+
+
+########################################################################
+#
+# Stuff we don't know how to handle (yet)
+#
+########################################################################
+
+# Address blocks:
+
+# Credit stuff:
+# ACKNO
+# ADDRESS
+# AFFILIATION
+# ARTPAGENUMS
+# ATTRIBUTION
+# AUTHORBLURB
+# AUTHORGROUP
+# OTHERCREDIT
+# HONORIFIC
+
+# Other document metadata:
+# Element: BOOKINFO
+# Element: RELEASEINFO
+
+
+
+# DocInfo
+# ArtHeader
+
+# Areas:
+# AREA
+# AREASET
+# AREASPEC
+
+
+texi_sgml('<BEGINPAGE>', "\n\@page\n");
+
+#BeginPage
+#IndexTerm
+
+
+
+
+########################################################################
+#
+# Linkage, cross references
+#
+########################################################################
+
+## Print the URL
+sgml('<ULINK>', sub {
+ if($skip_inline++) { return; } # hopefully doesn't happen
+ output '@uref{', output $_[0]->attribute('URL'), ', '
+});
+sgml('</ULINK>', sub {
+ output '}' unless --$skip_inline;
+});
+
+sgml('<XREF>', sub {
+ my $id = $_[0]->attribute('LINKEND')->value;
+ my ($nodename) = split(/,/, $Refs->get($id));
+
+ if($nodename) {
+ texi_output("\@xref\{$nodename\}");
+ } else {
+ $blank_xrefs++;
+ texi_output "[XRef to $id]";
+ }
+});
+
+
+# Anchor
+
+
+
+
+########################################################################
+#
+# Other handlers
+#
+########################################################################
+
+sgml('|[lt ]|', "<");
+sgml('|[gt ]|', ">");
+sgml('|[amp ]|', "&");
+
+#
+# Default handlers (uncomment these if needed). Right now, these are set
+# up to gag on any unrecognised elements, sdata, processing-instructions,
+# or entities.
+#
+# sgml('start_element',sub { die "Unknown element: " . $_[0]->name; });
+# sgml('end_element','');
+
+sgml('cdata', sub
+{
+ for($_[0]) {
+ s/\@/\@\@/g;
+ s/\{/\@\{/g;
+ s/\}/\@\}/g;
+ }
+ $newline_last = 0;
+ output $_[0];
+});
+
+sgml('re', sub
+{
+ if($nocollapse_whitespace || !$newline_last) {
+ output "\n";
+ }
+
+ $newline_last = 1;
+});
+
+sgml('re', "\n");
+sgml('sdata',sub { die "Unknown SDATA: " . $_[0]; });
+sgml('pi',sub { die "Unknown processing instruction: " . $_[0]; });
+sgml('entity',sub { die "Unknown external entity: " . $_[0]->name; });
+sgml('start_subdoc',sub { die "Unknown subdoc entity: " . $_[0]->name; });
+sgml('end_subdoc','');
+# sgml('conforming','');
+
+1;
+
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..040ebc8
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,310 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2004-01-12.10
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=
+transform_arg=
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+
+usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 -d DIRECTORIES...
+
+In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
+In the second, create the directory path DIR.
+
+Options:
+-b=TRANSFORMBASENAME
+-c copy source (using $cpprog) instead of moving (using $mvprog).
+-d create directories instead of installing files.
+-g GROUP $chgrp installed files to GROUP.
+-m MODE $chmod installed files to MODE.
+-o USER $chown installed files to USER.
+-s strip installed files (using $stripprog).
+-t=TRANSFORM
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ -c) instcmd=$cpprog
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit 0;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit 0;;
+
+ *) # When -d is used, all remaining arguments are directories to create.
+ test -n "$dir_arg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
+done
+
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ instcmd=:
+ chmodcmd=
+ else
+ instcmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ test -d "$pathcomp" || $mkdirprog "$pathcomp"
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $instcmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ # If we're going to rename the final executable, determine the name now.
+ if test -z "$transformarg"; then
+ dstfile=`basename "$dst"`
+ else
+ dstfile=`basename "$dst" $transformbasename \
+ | sed $transformarg`$transformbasename
+ fi
+
+ # don't allow the sed command to completely eliminate the filename.
+ test -z "$dstfile" && dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Move or copy the file name to the temp name
+ $doit $instcmd "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $instcmd $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now remove or move aside any old file at destination location. We
+ # try this two ways since rm can't unlink itself on some systems and
+ # the destination file might be busy for other reasons. In this case,
+ # the final cleanup might fail but the new file should still install
+ # successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ fi || { (exit 1); exit; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+ (exit 0); exit
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/missing b/missing
new file mode 100755
index 0000000..e7ef83a
--- /dev/null
+++ b/missing
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2003-09-02.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
+# Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/packaging/db2html b/packaging/db2html
new file mode 100644
index 0000000..8a1f3a1
--- /dev/null
+++ b/packaging/db2html
@@ -0,0 +1,34 @@
+#! /bin/sh
+
+ADMON_GRAPHICS=/usr/share/sgml/docbook/dsssl-stylesheets/images/*.gif
+
+output=docbook2html-dir
+skip=0
+for arg in "$@"
+do
+ if [ $skip -gt 0 ]
+ then
+ skip=$(($skip - 1))
+ continue
+ fi
+ case $arg in
+ -h|--help|-v|--version) break
+ ;;
+ -n|--nostd|-u|--nochunks) ;;
+ -*) skip=1
+ ;;
+ *) output="$(echo $arg | sed 's,\.sgml$,,;s,\.sgm$,,;s,\.xml,,')"
+ echo "output is $output"
+ break
+ ;;
+ esac
+done
+if [ -d ${output} ]
+then
+ rm -rf ${output}.junk
+ mv ${output} ${output}.junk
+fi
+mkdir ${output}
+mkdir ${output}/stylesheet-images
+cp ${ADMON_GRAPHICS} ${output}/stylesheet-images
+jw -f docbook -b html -o ${output} "$@"
diff --git a/packaging/docbook-utils-2ndspaces.patch b/packaging/docbook-utils-2ndspaces.patch
new file mode 100644
index 0000000..eb4d6c6
--- /dev/null
+++ b/packaging/docbook-utils-2ndspaces.patch
@@ -0,0 +1,260 @@
+--- Original/backends/dvi 2003-01-13 18:14:10.000000000 +0100
++++ Changes/backends/dvi 2007-05-21 14:10:42.000000000 +0200
+@@ -6,31 +6,31 @@
+ export TEXINPUTS
+
+ # Convert to TeX
+-$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
++$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+
+ # Convert from TeX to DVI
+-jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
++jadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp"
+ if [ $? -ne 0 ]
+ then
+- cat ${SGML_FILE_NAME}.tmp
+- rm ${SGML_FILE_NAME}.tmp
+- rm ${SGML_FILE_NAME}.tex
++ cat "${SGML_FILE_NAME}.tmp"
++ rm "${SGML_FILE_NAME}.tmp"
++ rm "${SGML_FILE_NAME}.tex"
+ exit 2
+ fi
+-rm ${SGML_FILE_NAME}.tmp
++rm "${SGML_FILE_NAME}.tmp"
+
+ # If there are unresolved references, re-run jadetex, twice
+-if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
++if egrep '^LaTeX Warning: There were undefined references.$' "${SGML_FILE_NAME}.log" >/dev/null 2>&1
+ then
+- jadetex ${SGML_FILE_NAME}.tex >/dev/null
+- jadetex ${SGML_FILE_NAME}.tex >/dev/null
++ jadetex "${SGML_FILE_NAME}.tex" >/dev/null
++ jadetex "${SGML_FILE_NAME}.tex" >/dev/null
+ fi
+-rm ${SGML_FILE_NAME}.log
+-rm ${SGML_FILE_NAME}.aux
+-rm ${SGML_FILE_NAME}.tex
+-rm ${SGML_FILE_NAME}.out
++rm "${SGML_FILE_NAME}.log"
++rm "${SGML_FILE_NAME}.aux"
++rm "${SGML_FILE_NAME}.tex"
++rm "${SGML_FILE_NAME}.out"
+
+ exit 0
+--- Original/backends/html 2000-07-21 20:15:22.000000000 +0200
++++ Changes/backends/html 2007-05-21 14:11:32.000000000 +0200
+@@ -3,7 +3,7 @@
+ # This program is under GPL license. See LICENSE file for details.
+
+ # Convert to HTML
+-$SGML_JADE -t sgml $SGML_ARGUMENTS
++$SGML_JADE -t sgml $SGML_ARGUMENTS "$SGML_FILE"
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+--- Original/backends/pdf 2003-03-17 18:47:11.000000000 +0100
++++ Changes/backends/pdf 2007-05-21 14:13:58.000000000 +0200
+@@ -6,26 +6,26 @@
+ export TEXINPUTS
+
+ # Convert to TeX
+-$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
++$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+
+ # Convert from TeX to PDF
+-pdfjadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
++pdfjadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp"
+ if [ $? -ne 0 ]
+ then
+- cat ${SGML_FILE_NAME}.tmp
+- rm ${SGML_FILE_NAME}.tmp
+- rm ${SGML_FILE_NAME}.tex
++ cat "${SGML_FILE_NAME}.tmp"
++ rm "${SGML_FILE_NAME}.tmp"
++ rm "${SGML_FILE_NAME}.tex"
+ exit 2
+ fi
+-rm ${SGML_FILE_NAME}.tmp
++rm "${SGML_FILE_NAME}.tmp"
+
+ # Unconditionally re-run pdfjadetex, twice
+-pdfjadetex ${SGML_FILE_NAME}.tex >/dev/null
+-pdfjadetex ${SGML_FILE_NAME}.tex >/dev/null
+-rm -f ${SGML_FILE_NAME}.log ${SGML_FILE_NAME}.aux \
+- ${SGML_FILE_NAME}.tex ${SGML_FILE_NAME}.out
++pdfjadetex "${SGML_FILE_NAME}.tex" >/dev/null
++pdfjadetex "${SGML_FILE_NAME}.tex" >/dev/null
++rm -f "${SGML_FILE_NAME}.log" "${SGML_FILE_NAME}.aux" \
++ "${SGML_FILE_NAME}.tex" "${SGML_FILE_NAME}.out"
+
+ exit 0
+--- Original/backends/ps 2003-03-17 18:51:48.000000000 +0100
++++ Changes/backends/ps 2007-05-21 14:16:51.000000000 +0200
+@@ -6,30 +6,30 @@
+ export TEXINPUTS
+
+ # Convert to TeX
+-$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
++$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+
+ # Convert from TeX to DVI
+-jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
++jadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp"
+ if [ $? -ne 0 ]
+ then
+- cat ${SGML_FILE_NAME}.tmp
+- rm ${SGML_FILE_NAME}.tmp
+- rm ${SGML_FILE_NAME}.tex
++ cat "${SGML_FILE_NAME}.tmp"
++ rm "${SGML_FILE_NAME}.tmp"
++ rm "${SGML_FILE_NAME}.tex"
+ exit 2
+ fi
+-rm ${SGML_FILE_NAME}.tmp
++rm "${SGML_FILE_NAME}.tmp"
+
+ # If there are unresolved references, re-run jadetex, twice
+-if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
++if egrep '^LaTeX Warning: There were undefined references.$' "${SGML_FILE_NAME}.log" >/dev/null 2>&1
+ then
+- jadetex ${SGML_FILE_NAME}.tex >/dev/null
+- jadetex ${SGML_FILE_NAME}.tex >/dev/null
++ jadetex "${SGML_FILE_NAME}.tex" >/dev/null
++ jadetex "${SGML_FILE_NAME}.tex" >/dev/null
+ fi
+-rm -f ${SGML_FILE_NAME}.log ${SGML_FILE_NAME}.aux \
+- ${SGML_FILE_NAME}.tex ${SGML_FILE_NAME}.out
++rm -f "${SGML_FILE_NAME}.log" "${SGML_FILE_NAME}.aux" \
++ "${SGML_FILE_NAME}.tex" "${SGML_FILE_NAME}.out"
+
+ # Convert from DVI to PostScript
+ PAPERSIZE="-t letter"
+@@ -38,12 +38,12 @@
+ PAPERSIZE="-t a4"
+ fi
+
+-dvips -R -q $PAPERSIZE ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}.ps
++dvips -R -q $PAPERSIZE "${SGML_FILE_NAME}.dvi" -o "${SGML_FILE_NAME}.ps"
+ if [ $? -ne 0 ]
+ then
+- rm ${SGML_FILE_NAME}.dvi
++ rm "${SGML_FILE_NAME}.dvi"
+ exit 3
+ fi
+-rm ${SGML_FILE_NAME}.dvi
++rm "${SGML_FILE_NAME}.dvi"
+
+ exit 0
+--- Original/backends/rtf 2000-07-21 20:15:22.000000000 +0200
++++ Changes/backends/rtf 2007-05-21 14:18:37.000000000 +0200
+@@ -3,7 +3,7 @@
+ # This program is under GPL license. See LICENSE file for details.
+
+ # Convert to RTF
+-$SGML_JADE -t rtf -o ${SGML_FILE_NAME}.rtf $SGML_ARGUMENTS
++$SGML_JADE -t rtf -o "${SGML_FILE_NAME}.rtf" $SGML_ARGUMENTS "$SGML_FILE"
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+--- Original/backends/tex 2000-07-21 20:15:22.000000000 +0200
++++ Changes/backends/tex 2007-05-21 14:21:12.000000000 +0200
+@@ -3,7 +3,7 @@
+ # This program is under GPL license. See LICENSE file for details.
+
+ # Convert to TeX
+-$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
++$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+--- Original/backends/txt 2004-02-11 14:58:03.000000000 +0100
++++ Changes/backends/txt 2007-05-21 14:22:33.000000000 +0200
+@@ -23,7 +23,7 @@
+ trap 'rm -f "$HTML"; exit' 0 1 2 3 7 13 15
+
+ # Convert to HTML
+-$SGML_JADE -V nochunks -t sgml ${SGML_ARGUMENTS} >${HTML}
++$SGML_JADE -V nochunks -t sgml ${SGML_ARGUMENTS} "$SGML_FILE" >${HTML}
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+--- Original/bin/jw.in 2003-04-30 18:21:49.000000000 +0200
++++ Changes/bin/jw.in 2007-05-21 14:28:58.000000000 +0200
+@@ -246,7 +246,7 @@ then
+ echo -e $SGML_HELP_MESSAGE >&2
+ exit 1
+ fi
+-if [ ! -s $SGML_FRONTEND ]
++if [ ! -s "$SGML_FRONTEND" ]
+ then
+ echo "`basename $0`: There is no frontend called \"$SGML_FRONTEND\"." >&2
+ exit 2
+@@ -270,14 +270,14 @@
+ echo -e $SGML_HELP_MESSAGE >&2
+ exit 1
+ fi
+-if [ ! -s $SGML_FILE ]
++if [ ! -s "$SGML_FILE" ]
+ then
+ echo "`basename $0`: Cannot open \"$SGML_FILE\"." >&2
+ exit 3
+ fi
+
+ # Separate the file name and the extension (if any)
+-SGML_FILE_NAME=`basename $SGML_FILE`
++SGML_FILE_NAME=`basename "$SGML_FILE"`
+ SGML_FILE_NAME=${SGML_FILE_NAME%.*}
+
+ # Determine if we are in an XML file
+@@ -416,7 +416,7 @@
+ fi
+
+ # Prepare the parser's arguments
+-SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET $SGML_OPTIONS $SGML_WARNINGS $SGML_DECL $SGML_FILE"
++SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET $SGML_OPTIONS $SGML_WARNINGS $SGML_DECL"
+
+ # Call the backend
+ echo "Using catalogs: `echo $SGML_CATALOG_FILES | sed 's/:/, /g'`"
+@@ -430,7 +430,7 @@
+ then
+ sh $SGML_BACKEND
+ else
+- sh $SGML_BACKEND >$SGML_FILE_NAME.html
++ sh $SGML_BACKEND >"$SGML_FILE_NAME.html"
+ fi
+ SGML_RETURN=$?
+ cd "$SGML_CURRENT_DIRECTORY"
+diff -urNp docbook-utils-0.6.14-orig/backends/man.in docbook-utils-0.6.14/backends/man.in
+--- docbook-utils-0.6.14-orig/backends/man.in 2003-02-11 13:56:23.000000000 +0100
++++ docbook-utils-0.6.14/backends/man.in 2009-07-24 15:07:04.000000000 +0200
+@@ -7,7 +7,7 @@ HELPER=$SGML_BASE_DIR/docbook/utils-@VER
+ TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \
+ { echo >&2 "man backend: could not create secure temporary directory"; exit 1;}
+ trap 'rm -rf "${TMPDIR}"' EXIT
+-nsgmls $SGML_FILE > "${TMPDIR}/nsgmls.tmp"
++nsgmls "$SGML_FILE" > "${TMPDIR}/nsgmls.tmp"
+ sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs"
+ if [ $? -ne 0 ]
+ then
+diff -urNp docbook-utils-0.6.14-orig/backends/texi.in docbook-utils-0.6.14/backends/texi.in
+--- docbook-utils-0.6.14-orig/backends/texi.in 2002-08-05 23:20:56.000000000 +0200
++++ docbook-utils-0.6.14/backends/texi.in 2009-07-24 15:08:02.000000000 +0200
+@@ -3,7 +3,7 @@
+ # This program is under GPL license. See LICENSE file for details.
+
+ # Convert to texinfo
+-nsgmls $SGML_FILE | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
++nsgmls "$SGML_FILE" | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
diff --git a/packaging/docbook-utils-grepnocolors.patch b/packaging/docbook-utils-grepnocolors.patch
new file mode 100644
index 0000000..3cce39e
--- /dev/null
+++ b/packaging/docbook-utils-grepnocolors.patch
@@ -0,0 +1,15 @@
+diff -urNp docbook-utils-0.6.14-orig/bin/jw.in docbook-utils-0.6.14/bin/jw.in
+--- docbook-utils-0.6.14-orig/bin/jw.in 2008-11-28 10:53:09.000000000 +0100
++++ docbook-utils-0.6.14/bin/jw.in 2008-11-28 11:22:28.000000000 +0100
+@@ -81,9 +81,9 @@ SGML_CATALOGS_DIR="/etc/sgml"
+ if [ -f "$SGML_CONF" ]
+ then
+ RE='^[:space:]*SGML_BASE_DIR[:space:]*=[:space:]*'
+- SGML_BASE_DIR=`grep $RE $SGML_CONF | sed "s/$RE//"`
++ SGML_BASE_DIR=`grep --color=never $RE $SGML_CONF | sed "s/$RE//"`
+ RE='^[:space:]*SGML_CATALOGS_DIR[:space:]*=[:space:]*'
+- SGML_CATALOGS_DIR=`grep $RE $SGML_CONF | sed "s/$RE//"`
++ SGML_CATALOGS_DIR=`grep --color=never $RE $SGML_CONF | sed "s/$RE//"`
+ fi
+
+ # Set frontend to use
diff --git a/packaging/docbook-utils-rtfmanpage.patch b/packaging/docbook-utils-rtfmanpage.patch
new file mode 100644
index 0000000..f37873b
--- /dev/null
+++ b/packaging/docbook-utils-rtfmanpage.patch
@@ -0,0 +1,15 @@
+diff -urNp docbook-utils-0.6.14-orig/doc/man/jw.1 docbook-utils-0.6.14/doc/man/jw.1
+--- docbook-utils-0.6.14-orig/doc/man/jw.1 2004-02-11 15:16:21.000000000 +0100
++++ docbook-utils-0.6.14/doc/man/jw.1 2009-08-13 10:44:03.000000000 +0200
+@@ -192,6 +192,11 @@ by calling \fBJade\fR or
+ \fBOpenJade\fR\&. The resulting file can
+ then be inported into \fBMS Word\fR
+ or one of its Linux replacement programs.
++
++\fBNote\fR - The original picture must be
++present when RTF document is viewed, because
++the RTF documents created by \fBOpenJade\fR
++includes pictures by reference.
+ .TP
+ \fB\fItex\fB\fR
+ Converts to TeX by calling \fBJade\fR or
diff --git a/packaging/docbook-utils-sgmlinclude.patch b/packaging/docbook-utils-sgmlinclude.patch
new file mode 100644
index 0000000..a4958e0
--- /dev/null
+++ b/packaging/docbook-utils-sgmlinclude.patch
@@ -0,0 +1,24 @@
+diff -urNp docbook-utils-0.6.14-orig/backends/man.in docbook-utils-0.6.14/backends/man.in
+--- docbook-utils-0.6.14-orig/backends/man.in 2009-07-24 15:17:42.000000000 +0200
++++ docbook-utils-0.6.14/backends/man.in 2009-07-24 15:20:57.000000000 +0200
+@@ -7,7 +7,7 @@ HELPER=$SGML_BASE_DIR/docbook/utils-@VER
+ TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \
+ { echo >&2 "man backend: could not create secure temporary directory"; exit 1;}
+ trap 'rm -rf "${TMPDIR}"' EXIT
+-nsgmls "$SGML_FILE" > "${TMPDIR}/nsgmls.tmp"
++nsgmls "$SGML_INCLUDE" "$SGML_FILE" > "${TMPDIR}/nsgmls.tmp"
+ sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs"
+ if [ $? -ne 0 ]
+ then
+diff -urNp docbook-utils-0.6.14-orig/bin/jw.in docbook-utils-0.6.14/bin/jw.in
+--- docbook-utils-0.6.14-orig/bin/jw.in 2009-07-24 15:17:42.000000000 +0200
++++ docbook-utils-0.6.14/bin/jw.in 2009-07-24 15:18:51.000000000 +0200
+@@ -423,7 +423,7 @@ echo "Using catalogs: `echo $SGML_CATALO
+ echo "Using stylesheet: $SGML_STYLESHEET"
+ echo "Working on: $SGML_FILE"
+ cd "$SGML_OUTPUT_DIRECTORY"
+-export SGML_JADE SGML_FILE_NAME SGML_ARGUMENTS
++export SGML_JADE SGML_FILE_NAME SGML_ARGUMENTS SGML_INCLUDE
+ export SGML_CATALOG_FILES SGML_BASE_DIR SGML_FILE SGML_STYLESHEET
+ NOCHUNKS=`echo $SGML_OPTIONS | grep nochunks`
+ if [ -z "$NOCHUNKS" ]
diff --git a/packaging/docbook-utils-spaces.patch b/packaging/docbook-utils-spaces.patch
new file mode 100644
index 0000000..4c18b1d
--- /dev/null
+++ b/packaging/docbook-utils-spaces.patch
@@ -0,0 +1,32 @@
+--- docbook-utils-0.6.14/bin/jw.in.spaces 2003-04-30 17:21:49.000000000 +0100
++++ docbook-utils-0.6.14/bin/jw.in 2004-08-19 09:33:34.989426640 +0100
+@@ -405,9 +405,9 @@
+ echo -e $SGML_HELP_MESSAGE >&2
+ exit 1
+ fi
+-if [ ! -d $SGML_OUTPUT_DIRECTORY ]
++if [ ! -d "$SGML_OUTPUT_DIRECTORY" ]
+ then
+- mkdir $SGML_OUTPUT_DIRECTORY 2>/dev/null
++ mkdir "$SGML_OUTPUT_DIRECTORY" 2>/dev/null
+ if [ $? -ne 0 ]
+ then
+ echo "`basename $0`: Could not create \"$SGML_OUTPUT_DIRECTORY\" output directory" >&2
+@@ -422,7 +422,7 @@
+ echo "Using catalogs: `echo $SGML_CATALOG_FILES | sed 's/:/, /g'`"
+ echo "Using stylesheet: $SGML_STYLESHEET"
+ echo "Working on: $SGML_FILE"
+-cd $SGML_OUTPUT_DIRECTORY
++cd "$SGML_OUTPUT_DIRECTORY"
+ export SGML_JADE SGML_FILE_NAME SGML_ARGUMENTS
+ export SGML_CATALOG_FILES SGML_BASE_DIR SGML_FILE SGML_STYLESHEET
+ NOCHUNKS=`echo $SGML_OPTIONS | grep nochunks`
+@@ -433,7 +433,7 @@
+ sh $SGML_BACKEND >$SGML_FILE_NAME.html
+ fi
+ SGML_RETURN=$?
+-cd $SGML_CURRENT_DIRECTORY
++cd "$SGML_CURRENT_DIRECTORY"
+
+ if [ $SGML_RETURN -gt 0 ]
+ then exit `expr 7 + $SGML_RETURN`
diff --git a/packaging/docbook-utils-w3mtxtconvert.patch b/packaging/docbook-utils-w3mtxtconvert.patch
new file mode 100644
index 0000000..249af8e
--- /dev/null
+++ b/packaging/docbook-utils-w3mtxtconvert.patch
@@ -0,0 +1,12 @@
+diff -urNp original/txt new/txt
+--- original/backends/txt 2007-11-05 18:44:52.000000000 +0100
++++ new/backends/txt 2007-11-22 15:21:36.000000000 +0100
+@@ -13,7 +13,7 @@ then
+ elif [ -x /usr/bin/w3m ]
+ then
+ CONVERT=/usr/bin/w3m
+- ARGS="-dump"
++ ARGS="-T text/html -dump"
+ else
+ echo >&2 "No way to convert HTML to text found."
+ exit 1
diff --git a/packaging/docbook-utils.changes b/packaging/docbook-utils.changes
new file mode 100644
index 0000000..cfe2e7b
--- /dev/null
+++ b/packaging/docbook-utils.changes
@@ -0,0 +1,2 @@
+* Fri Aug 31 18:43:19 UTC 2012 - tracy.graydon@intel.com
+- TIVI-153: Add as dependency for iputils. Imported from MeeGo trunk
diff --git a/packaging/docbook-utils.spec b/packaging/docbook-utils.spec
new file mode 100644
index 0000000..33c9a06
--- /dev/null
+++ b/packaging/docbook-utils.spec
@@ -0,0 +1,133 @@
+Name: docbook-utils
+Version: 0.6.14
+Release: 20
+Group: Applications/Text
+
+Summary: Shell scripts for managing DocBook documents
+URL: http://sources.redhat.com/docbook-tools/
+
+License: GPLv2+
+
+Requires: docbook-style-dsssl >= 1.72
+Requires: docbook-dtds
+Requires: perl-SGMLSpm >= 1.03ii
+Requires: which grep gawk
+Requires: text-www-browser
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRequires: perl-SGMLSpm, openjade, docbook-style-dsssl
+
+BuildArch: noarch
+Source0: ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/%{name}-%{version}.tar.gz
+Source1: db2html
+Source2: gdp-both.dsl
+#We will ship newer version of docbook2man-spec.pl for better handling of docbook2man conversion
+#You could check it at http://sourceforge.net/projects/docbook2x/
+Source3: docbook2man-spec.pl
+
+Obsoletes: stylesheets <= %{version}-%{release}
+Provides: stylesheets = %{version}-%{release}
+
+Patch0: docbook-utils-spaces.patch
+Patch1: docbook-utils-2ndspaces.patch
+Patch2: docbook-utils-w3mtxtconvert.patch
+Patch3: docbook-utils-grepnocolors.patch
+Patch4: docbook-utils-sgmlinclude.patch
+Patch5: docbook-utils-rtfmanpage.patch
+
+%description
+This package contains scripts are for easy conversion from DocBook
+files to other formats (for example, HTML, RTF, and PostScript), and
+for comparing SGML files.
+
+%package pdf
+Requires: jadetex >= 2.5
+Requires: docbook-utils = %{version}
+Requires: tex(dvips)
+License: GPL+
+Group: Applications/Text
+Obsoletes: stylesheets-db2pdf <= %{version}-%{release}
+Provides: stylesheets-db2pdf = %{version}-%{release}
+Summary: A script for converting DocBook documents to PDF format
+URL: ftp://sources.redhat.com/pub/docbook-tools/new-trials/
+
+%description pdf
+This package contains a script for converting DocBook documents to
+PDF format.
+
+%prep
+%setup -q
+%patch0 -p1 -b .spaces
+%patch1 -p1 -b .2ndspaces
+%patch2 -p1 -b .w3mtxtconvert
+%patch3 -p1 -b .grepnocolors
+%patch4 -p1 -b .sgmlinclude
+%patch5 -p1 -b .rtfman
+
+%build
+./configure --prefix=%{_prefix} --mandir=%{_mandir} --libdir=%{_libdir}
+make %{?_smp_mflags}
+
+%install
+export DESTDIR=$RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
+make install prefix=%{_prefix} mandir=%{_mandir} docdir=/tmp
+for util in dvi html pdf ps rtf
+do
+ ln -s docbook2$util $RPM_BUILD_ROOT%{_bindir}/db2$util
+ ln -s jw.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/db2$util.1
+done
+ln -s jw.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/docbook2txt.1
+# db2html is not just a symlink, as it has to create the output directory
+rm -f $RPM_BUILD_ROOT%{_bindir}/db2html
+install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/db2html
+install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/utils-%{version}/docbook-utils.dsl
+install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/utils-%{version}/helpers/docbook2man-spec.pl
+
+rm -rf $RPM_BUILD_ROOT/tmp
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr (-,root,root,-)
+%doc README COPYING TODO
+%{_bindir}/jw
+%{_bindir}/docbook2html
+%{_bindir}/docbook2man
+%{_bindir}/docbook2rtf
+%{_bindir}/docbook2tex
+%{_bindir}/docbook2texi
+%{_bindir}/docbook2txt
+%attr(0755,root,root) %{_bindir}/db2html
+%{_bindir}/db2rtf
+%{_bindir}/sgmldiff
+%{_datadir}/sgml/docbook/utils-%{version}
+%{_mandir}/*/db2dvi.*
+%{_mandir}/*/db2html.*
+%{_mandir}/*/db2ps.*
+%{_mandir}/*/db2rtf.*
+%{_mandir}/*/docbook2html.*
+%{_mandir}/*/docbook2rtf.*
+%{_mandir}/*/docbook2man.*
+%{_mandir}/*/docbook2tex.*
+%{_mandir}/*/docbook2texi.*
+%{_mandir}/*/docbook2txt.*
+%{_mandir}/*/jw.*
+%{_mandir}/*/sgmldiff.*
+%{_mandir}/*/*-spec.*
+
+%files pdf
+%defattr (-,root,root,-)
+%{_bindir}/docbook2pdf
+%{_bindir}/docbook2dvi
+%{_bindir}/docbook2ps
+%{_bindir}/db2dvi
+%{_bindir}/db2pdf
+%{_bindir}/db2ps
+%{_mandir}/*/db2pdf.*
+%{_mandir}/*/docbook2pdf.*
+%{_mandir}/*/docbook2dvi.*
+%{_mandir}/*/docbook2ps.*
+
diff --git a/packaging/docbook2man-spec.pl b/packaging/docbook2man-spec.pl
new file mode 100644
index 0000000..5209e36
--- /dev/null
+++ b/packaging/docbook2man-spec.pl
@@ -0,0 +1,1551 @@
+=head1 NAME
+
+docbook2man-spec.pl - convert DocBook RefEntries to Unix manpages
+
+=head1 SYNOPSIS
+
+The sgmlspl script from the SGMLSpm Perl module must be used to run
+this script. Use it like this:
+
+nsgmls some-docbook-document.sgml | sgmlspl docbook2man-spec.pl
+
+See man page or included DocBook documentation for details.
+
+=head1 DESCRIPTION
+
+This is a sgmlspl spec file that produces Unix-style
+man pages from DocBook RefEntry markup.
+
+=head1 COPYRIGHT
+
+Copyright (C) 1998-2001 Steve Cheng <stevecheng@users.sourceforge.net>
+
+Copyright (C) 1999 Thomas Lockhart <lockhart@alumni.caltech.edu>
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+You should have received a copy of the GNU General Public License along with
+this program; see the file COPYING. If not, please write to the Free
+Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+=cut
+
+# $Id: docbook2man-spec.pl,v 1.2 2009/07/24 13:30:48 ovasik Exp $
+
+use SGMLS; # Use the SGMLS package.
+use SGMLS::Output; # Use stack-based output.
+use SGMLS::Refs;
+
+
+########################################################################
+# SGMLSPL script produced automatically by the script sgmlspl.pl
+#
+# Document Type: any, but processes only RefEntries
+# Edited by: me :)
+########################################################################
+
+
+$write_manpages = 0;
+$blank_xrefs = 0;
+
+$default_sect = "1";
+$default_date = `date "+%d %B %Y"`;
+$cite_numeral_only = 1;
+
+while (@ARGV) {
+ my $arg = shift @ARGV;
+ if ($arg eq "--section") {
+ $default_sect = shift @ARGV || die "$arg requires an argument\n";
+ } elsif ($arg eq "--date") {
+ $default_date = shift @ARGV || die "$arg requires an argument\n";
+ } elsif ($arg eq "--lowercase") {
+ $lowercase_names = 1;
+ } elsif ($arg eq "--preserve-case") {
+ $lowercase_names = 0;
+ } elsif ($arg eq "--cite-numeral-only") {
+ $cite_numeral_only = 1;
+ } elsif ($arg eq "--nocite-numeral-only") {
+ $cite_numeral_only = 0;
+ } elsif ($arg eq "--help") {
+ print "Usage: $0",
+ " [ --section <label> ]",
+ " [ --date <string> ]",
+ " [ --lowercase | --preserve-case ]",
+ " [ --cite-numeral-only | --nocite-numeral-only ]",
+ "\n";
+ exit;
+ } else {
+ die "unrecognized switch $arg; try $0 --help\n";
+ }
+}
+
+sgml('start', sub {
+ push_output('nul');
+ $raw_cdata = 1; # Makes it a bit faster.
+
+ # Links file
+ open(LINKSFILE, ">manpage.links");
+
+ $Refs = new SGMLS::Refs("manpage.refs", "manpage.log");
+});
+sgml('end', sub {
+ close(LINKSFILE);
+
+ # Explicitly invoke destructor,
+ # otherwise cache file may not get written!
+ # Thomas Lockhart, 1999-08-03, perl-5.004, RedHat5.2
+ undef $Refs;
+
+ if($blank_xrefs) {
+ warn "Warning: output contains unresolved XRefs\n";
+ }
+});
+
+
+########################################################################
+#
+# Output helpers
+#
+########################################################################
+
+# Remove leading and trailing blanks.
+
+sub StripString
+{
+ my $str = shift;
+
+ $str = $1 if ($str =~ m#^\s*(\S.*)#);
+ $str = $1 if ($str =~ m#^(.*\S)\s*$#);
+
+ return $str;
+}
+
+# Generate a good file name, for given manpage title and manvolnum
+# (cdata content).
+# Cleanup whitespace and convert to lower case if required.
+
+sub FileInfo
+{
+ my $title = StripString(shift);
+ my $volnum = StripString(shift);
+
+ $title = lc $title if $lowercase_names;
+
+ $title =~ tr/ /_/;
+ $volnum =~ tr/ /_/;
+
+ my $sectcite = $volnum;
+ # The 'package name' part of the section should
+ # not be used when citing it.
+ if ($cite_numeral_only) {
+ $sectcite = $1 if ($volnum =~ /^([0-9]+)/);
+ }
+
+ return ("$title.$volnum", "$title($sectcite)");
+}
+
+# Our own version of sgml() and output() to allow simple string output
+# to play well with roff's stupid whitespace rules.
+
+sub man_sgml
+{
+ if(ref($_[1]) eq 'CODE') {
+ return &sgml;
+ }
+
+ my $s = $_[1];
+ $s =~ s/\\/\\\\/g;
+ $s =~ s/'/\\'/g;
+
+ sgml($_[0], eval("sub { man_output '$s' }"));
+}
+
+sub man_output
+{
+ if($separator eq 'full') {
+ output "\n" unless $newline_last++;
+ output ".PP\n";
+ $separator = '';
+ }
+
+ $_ = shift;
+ if(s/^\n//) {
+ output "\n" unless $newline_last++;
+ }
+ return if $_ eq '';
+
+ output $_;
+
+ if(@_) {
+ output @_;
+ $newline_last = (pop(@_) =~ /\n$/);
+ } else {
+ $newline_last = ($_ =~ /\n$/)
+ }
+}
+
+# Fold lines into one, quote some characters
+sub fold_string
+{
+ $_ = shift;
+
+ s/\\/\\\\/g;
+ s/"/\\\&"/g;
+
+ # Change tabs and newlines to spaces
+ # The newlines will be swallowed later while trimming
+ tr/[\t\n]/ /;
+
+ # Trim whitespace from beginning and end.
+ s/^ +//;
+ s/ +$//;
+
+ return $_;
+}
+
+sub save_cdata()
+{
+ $raw_cdata++;
+ push_output('string');
+}
+
+sub bold_on()
+{
+ # If the last font is also bold, don't change anything.
+ # Basically this is to just get more readable man output.
+ if($fontstack[$#fontstack] ne 'bold') {
+ if(!$raw_cdata) {
+ output '\fB';
+ #$newline_last = 0;
+ }
+ }
+ push(@fontstack, 'bold');
+}
+
+sub italic_on()
+{
+ # If the last font is also italic, don't change anything.
+ if($fontstack[$#fontstack] ne 'italic') {
+ if(!$raw_cdata) {
+ output '\fI';
+ #$newline_last = 0;
+ }
+ }
+ push(@fontstack, 'italic');
+}
+
+sub font_off()
+{
+ my $thisfont = pop(@fontstack);
+ my $lastfont = $fontstack[$#fontstack];
+
+ # Only output font change if it is different
+ if($thisfont ne $lastfont) {
+ if($raw_cdata) { return; }
+ elsif($lastfont eq 'bold') { output '\fB'; }
+ elsif($lastfont eq 'italic') { output '\fI'; }
+ else { output '\fR'; }
+
+ #$newline_last = 0;
+ }
+}
+
+
+########################################################################
+#
+# Manpage management
+#
+########################################################################
+
+sgml('<REFENTRY>', sub {
+ # This will be overwritten at end of REFMETA, when we know the name of the page.
+ pop_output();
+
+ $write_manpages = 1; # Currently writing manpage.
+
+ $nocollapse_whitespace = 0; # Current whitespace collapse counter.
+ $newline_last = 1; # At beginning of line?
+ # Just a bit of warning, you will see this variable manipulated
+ # manually a lot. It makes the code harder to follow but it
+ # saves you from having to worry about collapsing at the end of
+ # parse, stopping at verbatims, etc.
+ $raw_cdata = 0; # Instructs certain output functions to
+ # leave CDATA alone, so we can assign
+ # it to a string and process it, etc.
+ @fontstack = (); # Fonts being activated.
+
+ $list_nestlevel = 0; # Indent certain nested content.
+
+ # Separator to use between 'elements' in the content of a
+ # paragraph (usually). This makes sure that PCDATA after a list
+ # in a PARA gets a break in between and not become part of the
+ # last listitem. Note that we can't do it after the list ends,
+ # because often the list ends the paragraph and we'll get an
+ # extra break. Anything that changes the separator status from
+ # the default should also save its last state in the parent
+ # element's ext, but I'm not going to explain further. It's a
+ # gross hack and almost guaranteed to fail in unforseen cases.
+ # The only way to avoid all this is to use a tree/grove model, which
+ # we're _not_ doing.
+ $separator = '';
+
+ $manpage_title = ''; # Needed for indexing.
+ $manpage_sect = '';
+ @manpage_names = ();
+
+ $manpage_misc = '';
+
+ # check refentry's language
+ if(defined($_[0]->attribute('LANG')->value)) {
+ $manpage_lang = $_[0]->attribute('LANG')->value;
+ }
+ else {
+ $manpage_lang = '';
+ }
+});
+sgml('</REFENTRY>', sub {
+ if(!$newline_last) {
+ output "\n";
+ }
+
+ $raw_cdata = 1;
+ push_output('nul');
+
+ $write_manpages = 0;
+});
+
+sgml('</REFMETA>', sub {
+ my ($filename, $citation) =
+ FileInfo($manpage_title, $manpage_sect || $default_sect);
+
+ push_output('file', $filename);
+
+ output <<'_END_BANNER';
+.\\" auto-generated by docbook2man-spec $Revision: 1.2 $
+_END_BANNER
+
+ my $manpage_date = $_[0]->parent->ext->{'date'} || $default_date;
+
+ output '.TH "';
+
+ # If the title is not mixed-case, convention says to
+ # uppercase the whole title. (The canonical title is
+ # lowercase.)
+ if($manpage_title =~ /[A-Z]/) {
+ output fold_string($manpage_title);
+ } else {
+ output uc(fold_string($manpage_title));
+ }
+
+ output '" "', fold_string($manpage_sect),
+ '" "', fold_string($manpage_date),
+ '" "', $manpage_misc,
+ '" "', $manpage_manual,
+ "\"\n";
+
+ $newline_last = 1;
+
+ # References to this RefEntry.
+ if(defined($_[0]->parent->attribute('ID')->value)) {
+ my $id = $_[0]->parent->attribute('ID')->value;
+
+ # Append XREFLABEL content to citations.
+ if(defined($_[0]->parent->attribute('XREFLABEL')->value)) {
+ $citation = $_[0]->parent->attribute('XREFLABEL')->value .
+ ' [' . $citation . ']';
+ }
+
+ $Refs->put("refentry:$id", $citation);
+ }
+});
+
+sgml('<REFENTRYTITLE>', sub {
+ if($_[0]->in('REFMETA')) {
+ save_cdata();
+ } else {
+ # Manpage citations are in bold.
+ bold_on();
+ }
+});
+sgml('</REFENTRYTITLE>', sub {
+ if($_[0]->in('REFMETA')) {
+ $raw_cdata--;
+ $manpage_title = pop_output();
+ }
+ else { font_off(); }
+
+ if (defined($_[0]->attribute('ID')->value)) {
+ my $id = $_[0]->attribute('ID')->value;
+ $Refs->put("refentrytitle:$id", $manpage_title);
+ }
+});
+
+sgml('<MANVOLNUM>', sub {
+ if($_[0]->in('REFMETA')) {
+ save_cdata();
+ } else {
+ # Manpage citations use ().
+ output '(';
+ }
+});
+sgml('</MANVOLNUM>', sub {
+ if($_[0]->in('REFMETA')) {
+ $raw_cdata--;
+ $manpage_sect = pop_output();
+ }
+ else { output ')' }
+});
+
+sgml('<REFMISCINFO>', \&save_cdata);
+sgml('</REFMISCINFO>', sub {
+ $raw_cdata--;
+ $manpage_misc = fold_string(pop_output());
+});
+
+
+# NAME section
+#man_sgml('<REFNAMEDIV>', "\n.SH NAME\n");
+man_sgml('<REFNAMEDIV>', sub {
+ my %text = { fr=>'NOM', es=>'NOMBRE', pl=>'NAZWA' };
+
+ if(defined $text{lc($manpage_lang)})
+ {
+ man_output "\n.SH " . $text{lc($manpage_lang)} . "\n";
+ } elsif(defined $_[0]->attribute('LANG') and
+ defined $text{lc($_[0]->attribute('LANG')->value)})
+ {
+ man_output "\n.SH " . $text{lc($_[0]->attribute('LANG'))} . "\n";
+ } else {
+ man_output "\n.SH NAME\n";
+ }
+});
+
+sgml('<REFNAME>', \&save_cdata);
+sgml('</REFNAME>', sub {
+ $raw_cdata--;
+ push(@manpage_names, pop_output());
+});
+
+sgml('<REFPURPOSE>', \&save_cdata);
+sgml('</REFPURPOSE>', sub {
+ $raw_cdata--;
+ my $manpage_purpose = fold_string(pop_output());
+
+ for(my $i = 0; $i < $#manpage_names; $i++) {
+ output fold_string($manpage_names[$i]), ', ';
+ }
+
+ output fold_string($manpage_names[$#manpage_names]);
+ output " \\- $manpage_purpose\n";
+
+ $newline_last = 1;
+
+ foreach(@manpage_names) {
+ # Don't link to itself
+ if($_ ne $manpage_title) {
+ print LINKSFILE "$manpage_title.$manpage_sect $_.$manpage_sect\n";
+ }
+ }
+});
+
+man_sgml('<REFCLASS>', "\n.sp\n");
+
+#RefDescriptor
+
+
+########################################################################
+#
+# SYNOPSIS section and synopses
+#
+########################################################################
+
+#man_sgml('<REFSYNOPSISDIV>', "\n.SH SYNOPSIS\n");
+man_sgml('<REFSYNOPSISDIV>', sub {
+ if ($manpage_lang eq "pl") { man_output "\n.SH SK£ADNIA\n"; }
+ # waits for another languages
+ #elsif ($manpage_lang eq "xx") { man_output "\n.SH xxxxxxx\n"; }
+ else { man_output "\n.SH SYNOPSIS\n"; }
+});
+
+man_sgml('</REFSYNOPSISDIV>', "\n");
+
+## FIXME! Must be made into block elements!!
+#sgml('<FUNCSYNOPSIS>', \&bold_on);
+#sgml('</FUNCSYNOPSIS>', \&font_off);
+#sgml('<CMDSYNOPSIS>', \&bold_on);
+#sgml('</CMDSYNOPSIS>', \&font_off);
+
+man_sgml('<FUNCSYNOPSIS>', sub {
+ man_output("\n.nf\n");
+ bold_on();
+});
+man_sgml('</FUNCSYNOPSIS>', sub {
+ font_off();
+ man_output "\n.fi";
+});
+
+man_sgml('<CMDSYNOPSIS>', "\n.sp\n");
+man_sgml('</CMDSYNOPSIS>', "\n");
+
+man_sgml('<FUNCPROTOTYPE>', "\n.sp\n");
+
+# Arguments to functions. This is C convention.
+man_sgml('<PARAMDEF>', '(');
+man_sgml('</PARAMDEF>', ");\n");
+man_sgml('<VOID>', "(void);\n");
+
+
+sub arg_start
+{
+ # my $choice = $_[0]->attribute('CHOICE')->value;
+
+ # The content model for CmdSynopsis doesn't include #PCDATA,
+ # so we won't see any of the whitespace in the source file,
+ # so we have to add it after each component.
+ man_output ' ';
+
+ if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+ man_output '[ ';
+ }
+ bold_on();
+}
+sub arg_end
+{
+ font_off();
+ if($_[0]->attribute('REP')->value =~ /^Repeat/i) {
+ italic_on();
+ man_output '...';
+ font_off();
+ }
+ if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+ man_output ' ] ';
+ }
+}
+
+sgml('<ARG>', \&arg_start);
+sgml('</ARG>', \&arg_end);
+sgml('<GROUP>', \&arg_start);
+sgml('</GROUP>', \&arg_end);
+
+sgml('<OPTION>', \&bold_on);
+sgml('</OPTION>', \&font_off);
+
+# FIXME: This is one _blank_ line.
+man_sgml('<SBR>', "\n\n");
+
+
+########################################################################
+#
+# General sections
+#
+########################################################################
+
+# The name of the section is handled by TITLE. This just sets
+# up the roff markup.
+man_sgml('<REFSECT1>', sub { $separator = ''; man_output "\n.SH "});
+man_sgml('<REFSECT2>', sub { $separator = ''; man_output "\n.SS "});
+man_sgml('<REFSECT3>', sub { $separator = ''; man_output "\n.SS "});
+
+
+########################################################################
+#
+# Titles, metadata.
+#
+########################################################################
+
+sgml('<TITLE>', sub {
+ if($_[0]->in('REFERENCE') or $_[0]->in('BOOK')) {
+ $write_manpages = 1;
+ }
+ save_cdata();
+});
+sgml('</TITLE>', sub {
+ my ($element, $event) = @_;
+ my $title = fold_string(pop_output());
+ $raw_cdata--;
+
+ if($element->in('REFERENCE') or $element->in('BOOK')) {
+ # We use TITLE of enclosing Reference or Book as manual name
+ $manpage_manual = $title;
+ $write_manpages = 0;
+ }
+ elsif(exists $element->parent->ext->{'title'}) {
+ # By far the easiest case. Just fold the string as
+ # above, and then set the parent element's variable.
+ $_[0]->parent->ext->{'title'} = $title;
+ }
+ else {
+ # If the parent element's handlers are lazy,
+ # output the folded string for them :)
+ # We assume they want uppercase and a newline.
+ man_output '"', uc($title), "\"\n";
+ }
+
+ if (defined($element->attribute('ID')->value)) {
+ my $id = $_[0]->attribute('ID')->value;
+ $Refs->put("title:$id", $title);
+ }
+
+ my ($filename, $citation) =
+ FileInfo($manpage_title, $manpage_sect || $default_sect);
+ my $parentid = $element->parent->attribute('ID')->value;
+ if ($parentid and ($element->in('REFSECT1') or $element->in('REFSECT2') or $element->in('REFSECT3'))) {
+ $Refs->put("refsect:$parentid", "$citation");
+ }
+});
+
+sgml('<ATTRIBUTION>', sub {
+ if($_[0]->in('BLOCKQUOTE')) {
+ push_output('string');
+ }
+});
+sgml('</ATTRIBUTION>', sub {
+ if($_[0]->in('BLOCKQUOTE')) {
+ $_[0]->parent->ext->{'attribution'} = pop_output();
+ } else {
+ # For an Epigraph.
+ man_output "\n\n";
+ }
+});
+
+sgml('<DATE>', sub {
+ save_cdata();
+});
+sgml('</DATE>', sub {
+ $_[0]->parent->parent->ext->{'date'} = fold_string(pop_output());
+ $raw_cdata--;
+});
+
+sub ignore_content { push_output 'nul'; }
+sub restore_content { pop_output(); }
+
+sgml('<DOCINFO>', \&ignore_content);
+sgml('</DOCINFO>', \&restore_content);
+sgml('<REFSYNOPSISDIVINFO>', \&ignore_content);
+sgml('</REFSYNOPSISDIVINFO>', \&restore_content);
+sgml('<REFSECT1INFO>', \&ignore_content);
+sgml('</REFSECT1INFO>', \&restore_content);
+sgml('<REFSECT2INFO>', \&ignore_content);
+sgml('</REFSECT2INFO>', \&restore_content);
+sgml('<REFSECT3INFO>', \&ignore_content);
+sgml('</REFSECT3INFO>', \&restore_content);
+
+sgml('<INDEXTERM>', \&ignore_content);
+sgml('</INDEXTERM>', \&restore_content);
+
+sgml('<AUTHORBLURB>', \&ignore_content);
+sgml('</AUTHORBLURB>', \&restore_content);
+
+
+########################################################################
+#
+# Set bold on enclosed content
+#
+########################################################################
+
+sgml('<APPLICATION>', \&bold_on);
+sgml('</APPLICATION>', \&font_off);
+
+sgml('<CLASSNAME>', \&bold_on); sgml('</CLASSNAME>', \&font_off);
+sgml('<STRUCTNAME>', \&bold_on); sgml('</STRUCTNAME>', \&font_off);
+sgml('<STRUCTFIELD>', \&bold_on); sgml('</STRUCTFIELD>', \&font_off);
+sgml('<SYMBOL>', \&bold_on); sgml('</SYMBOL>', \&font_off);
+sgml('<TYPE>', \&bold_on); sgml('</TYPE>', \&font_off);
+
+sgml('<ENVAR>', \&bold_on); sgml('</ENVAR>', \&font_off);
+
+sgml('<FUNCTION>', \&bold_on); sgml('</FUNCTION>', \&font_off);
+
+sgml('<EMPHASIS>', \&bold_on); sgml('</EMPHASIS>', \&font_off);
+
+sgml('<ERRORNAME>', \&bold_on); sgml('</ERRORNAME>', \&font_off);
+# ERRORTYPE
+
+sgml('<COMMAND>', \&bold_on); sgml('</COMMAND>', \&font_off);
+
+sgml('<GUIBUTTON>', \&bold_on); sgml('</GUIBUTTON>', \&font_off);
+sgml('<GUIICON>', \&bold_on); sgml('</GUIICON>', \&font_off);
+# GUILABEL
+# GUIMENU
+# GUIMENUITEM
+# GUISUBMENU
+# MENUCHOICE
+
+sgml('<ACCEL>', \&bold_on); sgml('</ACCEL>', \&font_off);
+# KEYCODE
+# SHORTCUT
+
+
+sgml('<KEYCOMBO>', sub {
+ $separator = 'none';
+ $_[0]->ext->{'separator'} = 'none';
+});
+sgml('</KEYCOMBO>', sub { $separator = $_[0]->parent->ext->{'separator'}; });
+
+sub _keycombo {
+ if($_[0]->in('KEYCOMBO')) {
+ if($separator eq 'none') { $separator = '' }
+ else { man_output "+"; }
+ }
+ bold_on();
+}
+sgml('<KEYCAP>', \&_keycombo); sgml('</KEYCAP>', \&font_off);
+sgml('<KEYSYM>', \&_keycombo); sgml('</KEYSYM>', \&font_off);
+sgml('<MOUSEBUTTON>', \&_keycombo); sgml('</MOUSEBUTTON>', \&font_off);
+
+
+sgml('<USERINPUT>', \&bold_on); sgml('</USERINPUT>', \&font_off);
+
+sgml('<INTERFACEDEFINITION>', \&bold_on);
+sgml('</INTERFACEDEFINITION>', \&font_off);
+
+# May need to look at the CLASS
+sgml('<SYSTEMITEM>', \&bold_on);
+sgml('</SYSTEMITEM>', \&font_off);
+
+
+########################################################################
+#
+# Set italic on enclosed content
+#
+########################################################################
+
+sgml('<FIRSTTERM>', \&italic_on); sgml('</FIRSTTERM>', \&font_off);
+
+sgml('<FILENAME>', \&italic_on); sgml('</FILENAME>', \&font_off);
+sgml('<PARAMETER>', \&italic_on); sgml('</PARAMETER>', \&font_off);
+sgml('<PROPERTY>', \&italic_on); sgml('</PROPERTY>', \&font_off);
+
+sgml('<REPLACEABLE>', sub {
+ italic_on();
+ if($_[0]->in('TOKEN')) {
+ # When tokenizing, follow more 'intuitive' convention
+ output "<";
+ }
+});
+sgml('</REPLACEABLE>', sub {
+ if($_[0]->in('TOKEN')) {
+ output ">";
+ }
+ font_off();
+});
+
+sgml('<CITETITLE>', \&italic_on); sgml('</CITETITLE>', \&font_off);
+sgml('<FOREIGNPHRASE>', \&italic_on); sgml('</FOREIGNPHRASE>', \&font_off);
+
+sgml('<LINEANNOTATION>', \&italic_on); sgml('</LINEANNOTATION>', \&font_off);
+
+
+########################################################################
+#
+# Other 'inline' elements
+#
+########################################################################
+
+man_sgml('<EMAIL>', '<');
+man_sgml('</EMAIL>', '>');
+man_sgml('<OPTIONAL>', '[');
+man_sgml('</OPTIONAL>', ']');
+
+man_sgml('</TRADEMARK>', "\\u\\s-2TM\\s+2\\d");
+
+man_sgml('<COMMENT>', "[Comment: ");
+man_sgml('</COMMENT>', "]");
+
+man_sgml('<QUOTE>', "``");
+man_sgml('</QUOTE>', "''");
+
+#man_sgml('<LITERAL>', '"');
+#man_sgml('</LITERAL>', '"');
+# There doesn't seem to be a good way to represent LITERAL in -man
+# ComputerOutput, SGMLTag, Markup are the same thing.
+
+# These create spaces between content in special elements
+# without PCDATA content.
+man_sgml('</HONORIFIC>', " ");
+man_sgml('</FIRSTNAME>', " ");
+man_sgml('</SURNAME>', " ");
+man_sgml('</LINEAGE>', " ");
+man_sgml('</OTHERNAME>', " ");
+
+man_sgml('<AFFILIATION>', "(");
+man_sgml('</AFFILIATION>', ") ");
+man_sgml('<CONTRIB>', "(");
+man_sgml('</CONTRIB>', ") ");
+
+man_sgml('</STREET>', " ");
+man_sgml('</POB>', " ");
+man_sgml('</POSTCODE>', " ");
+man_sgml('</CITY>', " ");
+man_sgml('</STATE>', " ");
+man_sgml('</COUNTRY>', " ");
+man_sgml('</PHONE>', " ");
+man_sgml('</FAX>', " ");
+man_sgml('</OTHERADDRESS>', " ");
+
+man_sgml('</ALT>', ": ");
+man_sgml('<GRAPHIC>', " [GRAPHIC] ");
+
+# No special presentation:
+
+# AUTHORINITIALS
+
+# ABBREV
+# ACTION
+# ACRONYM
+# CITATION
+# PHRASE
+# QUOTE
+# WORDASWORD
+
+# PROMPT
+# RETURNVALUE
+# TOKEN
+
+# DATABASE
+# HARDWARE
+# INTERFACE
+# MEDIALABEL
+
+
+########################################################################
+#
+# Paragraph and paragraph-like elements
+#
+########################################################################
+
+sub para_start {
+ if($separator eq '' or $separator eq 'full') {
+ $separator = '';
+ man_output "\n.PP\n";
+ } elsif($separator eq 'blank') {
+ man_output "\n\n";
+ } elsif($separator eq 'none' ) {
+ $_[0]->parent->ext->{'separator'} = 'blank';
+ $separator = 'blank';
+ }
+}
+# Actually applies to a few other block elements as well
+sub para_end {
+ $separator = $_[0]->parent->ext->{'separator'};
+ man_output "\n";
+}
+
+sgml('<PARA>', \&para_start);
+sgml('</PARA>', \&para_end);
+sgml('<SIMPARA>', \&para_start);
+sgml('</SIMPARA>', \&para_end);
+
+# Nothing special, except maybe FIXME set nobreak.
+sgml('<INFORMALEXAMPLE>', \&para_start);
+sgml('</INFORMALEXAMPLE>', \&para_end);
+
+
+########################################################################
+#
+# Blocks using SS sections
+#
+########################################################################
+
+# FIXME: We need to consider the effects of SS
+# in a hanging tag :(
+
+# Complete with the optional-title dilemma (again).
+sgml('<ABSTRACT>', sub {
+ $_[0]->ext->{'title'} = 'ABSTRACT';
+ output "\n" unless $newline_last++;
+ push_output('string');
+});
+sgml('</ABSTRACT>', sub {
+ my $content = pop_output();
+
+ # As ABSTRACT is never on the same level as RefSect1,
+ # this leaves us with only .SS in terms of -man macros.
+ output ".SS \"", uc($_[0]->ext->{'title'}), "\"\n";
+
+ output $content;
+ output "\n" unless $newline_last++;
+});
+
+
+
+# Ah, I needed a break. Example always has a title.
+sgml('<EXAMPLE>', sub { $separator = ''; man_output "\n.SS "});
+sgml('</EXAMPLE>', \&para_end);
+
+# Same with sidebar.
+sgml('<SIDEBAR>', sub { $separator = ''; man_output "\n.SS "});
+sgml('</SIDEBAR>', \&para_end);
+
+sgml('<FORMALPARA>', sub { $separator = ''; man_output "\n.SS "});
+sgml('</FORMALPARA>', \&para_end);
+
+sgml('<FIGURE>', sub { $separator = ''; man_output "\n.SS "});
+sgml('</FIGURE>', \&para_end);
+
+
+
+# NO title.
+sgml('<HIGHLIGHTS>', sub { $separator = ''; man_output "\n.SS HIGHLIGHTS\n"});
+sgml('</HIGHLIGHTS>', \&para_end);
+
+
+########################################################################
+#
+# Indented 'Block' elements
+#
+########################################################################
+
+sub indent_block_start
+{
+ $separator = '';
+ man_output "\n.sp\n.RS\n";
+}
+sub indent_block_end
+{
+ $separator = $_[0]->parent->ext->{'separator'};
+ man_output "\n.RE\n.sp\n";
+}
+
+sgml('<ADDRESS>', sub {
+ &indent_block_start;
+ if($_[0]->attribute('FORMAT')->type eq 'NOTATION'
+ and $_[0]->attribute('FORMAT')->value->name eq 'LINESPECIFIC') {
+ &verbatim_start;
+ }
+});
+sgml('</ADDRESS>', sub {
+ if($_[0]->attribute('FORMAT')->type eq 'NOTATION'
+ and $_[0]->attribute('FORMAT')->value->name eq 'LINESPECIFIC') {
+ &verbatim_end;
+ }
+ &indent_block_end;
+});
+
+# This element is almost like an admonition (below),
+# only the default title is blank :)
+
+sgml('<BLOCKQUOTE>', sub {
+ $_[0]->ext->{'title'} = '';
+ &indent_block_start;
+ push_output('string');
+});
+sgml('</BLOCKQUOTE>', sub {
+ my $content = pop_output();
+
+ if($_[0]->ext->{'title'}) {
+ output ".B \"", $_[0]->ext->{'title'}, ":\"\n";
+ }
+
+ output $content;
+
+ if($_[0]->ext->{'attribution'}) {
+ man_output "\n\n -- ",
+ $_[0]->ext->{'attribution'}, "\n";
+ }
+
+ &indent_block_end;
+});
+
+# Set off admonitions from the rest of the text by indenting.
+# FIXME: Need to check if this works inside paragraphs, not enclosing them.
+sub admonition_end {
+ my $content = pop_output();
+
+ # When the admonition is only one paragraph,
+ # it looks nicer if the title was inline.
+ my $num_para;
+ while ($content =~ /^\.PP/gm) { $num_para++ }
+ if($num_para==1) {
+ $content =~ s/^\.PP\n//;
+ }
+
+ output ".B \"" . $_[0]->ext->{'title'} . ":\"\n";
+ output $content;
+
+ &indent_block_end;
+}
+
+sgml('<NOTE>', sub {
+ # We can't see right now whether or not there is a TITLE
+ # element, so we have to save the output now and add it back
+ # at the end of this admonition.
+ $_[0]->ext->{'title'} = 'Note';
+
+ &indent_block_start;
+
+ push_output('string');
+});
+sgml('</NOTE>', \&admonition_end);
+
+# Same as above.
+sgml('<WARNING>', sub {
+ $_[0]->ext->{'title'} = 'Warning';
+ &indent_block_start;
+ push_output('string');
+});
+sgml('</WARNING>', \&admonition_end);
+
+sgml('<TIP>', sub {
+ $_[0]->ext->{'title'} = 'Tip';
+ &indent_block_start;
+ push_output('string');
+});
+sgml('</TIP>', \&admonition_end);
+sgml('<CAUTION>', sub {
+ $_[0]->ext->{'title'} = 'Caution';
+ &indent_block_start;
+ push_output('string');
+});
+sgml('</CAUTION>', \&admonition_end);
+
+sgml('<IMPORTANT>', sub {
+ $_[0]->ext->{'title'} = 'Important';
+ &indent_block_start;
+ push_output('string');
+});
+sgml('</IMPORTANT>', \&admonition_end);
+
+
+########################################################################
+#
+# Verbatim displays.
+#
+########################################################################
+
+sub verbatim_start {
+ $separator = '';
+ man_output "\n.sp\n";
+ man_output "\n.nf\n" unless $nocollapse_whitespace++;
+}
+
+sub verbatim_end {
+ man_output "\n.sp\n";
+ man_output "\n.fi\n" unless --$nocollapse_whitespace;
+ $separator = $_[0]->parent->ext->{'separator'};
+}
+
+sgml('<PROGRAMLISTING>', \&verbatim_start);
+sgml('</PROGRAMLISTING>', \&verbatim_end);
+
+sgml('<SCREEN>', \&verbatim_start);
+sgml('</SCREEN>', \&verbatim_end);
+
+sgml('<LITERALLAYOUT>', \&verbatim_start);
+sgml('</LITERALLAYOUT>', \&verbatim_end);
+
+sgml('<SYNOPSIS>', sub {
+ my $format = $_[0]->attribute('FORMAT');
+
+ if($format->type eq 'NOTATION'
+ and $format->value->name eq 'LINESPECIFIC')
+ {
+ &verbatim_start;
+ } else {
+ $separator = '';
+ man_output "\n.sp\n";
+ }
+});
+
+sgml('</SYNOPSIS>', sub {
+ my $format = $_[0]->attribute('FORMAT');
+
+ if($format->type eq 'NOTATION'
+ and $format->value->name eq 'LINESPECIFIC')
+ {
+ &verbatim_end;
+ } else {
+ man_output "\n";
+ $_[0]->parent->ext->{'separator'} = 'full';
+ $separator = 'full';
+ }
+});
+
+
+########################################################################
+#
+# Lists
+#
+########################################################################
+
+# Indent nested lists.
+sub list_start {
+ man_output "\n.RS\n" if $list_nestlevel++;
+}
+sub list_end {
+ man_output "\n.RE\n" if --$list_nestlevel;
+ $_[0]->parent->ext->{'separator'} = 'full';
+ $separator = 'full';
+}
+
+sgml('<VARIABLELIST>', \&list_start);
+sgml('</VARIABLELIST>', \&list_end);
+sgml('<ITEMIZEDLIST>', \&list_start);
+sgml('</ITEMIZEDLIST>', \&list_end);
+sgml('<ORDEREDLIST>', sub {
+ &list_start;
+ $_[0]->ext->{'count'} = 1;
+});
+sgml('</ORDEREDLIST>', \&list_end);
+
+# Output content on one line, bolded.
+sgml('<TERM>', sub {
+ man_output "\n.TP\n";
+ bold_on();
+ push_output('string');
+});
+sgml('</TERM>', sub {
+ my $term = StripString(pop_output());
+ $term =~ tr/\n/ /;
+ output $term;
+ font_off();
+ output "\n";
+ $newline_last = 1;
+});
+
+sgml('<LISTITEM>', sub {
+ # A bulleted list.
+ if($_[0]->in('ITEMIZEDLIST')) {
+ man_output "\n.TP 0.2i\n\\(bu\n";
+ }
+
+ # Need numbers.
+ # Assume Arabic numeration for now.
+ elsif($_[0]->in('ORDEREDLIST')) {
+ man_output "\n.IP ", $_[0]->parent->ext->{'count'}++, ". \n";
+ }
+
+ $_[0]->ext->{'separator'} = 'none';
+ $separator = 'none';
+});
+
+sgml('<SIMPLELIST>', sub {
+ $_[0]->ext->{'first_member'} = 1;
+});
+sgml('<MEMBER>', sub {
+ my $parent = $_[0]->parent;
+
+ if($parent->attribute('TYPE')->value =~ /Inline/i) {
+ if($parent->ext->{'first_member'}) {
+ # If this is the first member don't put any commas
+ $parent->ext->{'first_member'} = 0;
+ } else {
+ man_output ", ";
+ }
+
+ # We don't really have Horiz rendering, so it's the same
+ # as Vert.
+ } else {
+ man_output "\n\n";
+ }
+});
+
+# We implement Procedures as indent and lists
+
+sgml('<PROCEDURE>', sub {
+ $_[0]->ext->{'count'} = 1;
+ &indent_block_start;
+});
+sgml('</PROCEDURE>', sub {
+ &indent_block_end;
+ $_[0]->parent->ext->{'separator'} = 'full';
+ $separator = 'full';
+});
+
+sgml('<STEP>', sub {
+ man_output "\n.IP ", $_[0]->parent->ext->{'count'}++, ". \n";
+ $_[0]->ext->{'separator'} = 'none';
+ $separator = 'none';
+});
+
+
+########################################################################
+#
+# Linkage, cross references
+#
+########################################################################
+
+# Print the URL
+sgml('</ULINK>', sub {
+ man_output ' <URL:', $_[0]->attribute('URL')->value, '>';
+});
+
+# If cross reference target is a RefEntry,
+# output CiteRefEntry-style references.
+sgml('<XREF>', sub {
+ my $id = $_[0]->attribute('LINKEND')->value;
+
+ my $manref = $Refs->get("refentry:$id") || $Refs->get("refsect:$id");
+ if(!defined $manref) {
+ $blank_xrefs++ if $write_manpages;
+ man_output "[XRef to $id]";
+ return;
+ }
+
+ # Limited ENDTERM support.
+ if(defined $_[0]->attribute('ENDTERM')->value) {
+ my $endterm = $_[0]->attribute('ENDTERM')->value;
+ my $content = $Refs->get("title:$endterm") ||
+ $Refs->get("refentrytitle:$endterm");
+ man_output $content, ' [';
+ }
+
+ # This also displays the XREFLABEL (as bold)...
+ # It's not worth the bother to fix it though, there
+ # are better tools for this.
+ my ($title, $sect) = ($manref =~ /(.*)(\(.*\))/);
+ bold_on();
+ man_output $title;
+ font_off();
+ man_output $sect;
+
+ if(defined $_[0]->attribute('ENDTERM')->value) {
+ man_output ']';
+ }
+});
+
+# Anchor
+
+########################################################################
+#
+# SDATA
+#
+########################################################################
+
+man_sgml('|[lt ]|', '<');
+man_sgml('|[equals]|', '=');
+man_sgml('|[gt ]|', '>');
+man_sgml('|[plus ]|', '\(pl');
+man_sgml('|[dollar]|', '$');
+man_sgml('|[num ]|', '#');
+man_sgml('|[percnt]|', '%');
+man_sgml('|[amp ]|', '&');
+man_sgml('|[commat]|', '@');
+man_sgml('|[lsqb ]|', '[');
+man_sgml('|[bsol ]|', '\e');
+man_sgml('|[rsqb ]|', ']');
+man_sgml('|[lcub ]|', '{');
+man_sgml('|[verbar]|', '\(or');
+man_sgml('|[rcub ]|', '}');
+man_sgml('|[excl ]|', '!');
+man_sgml('|[quot ]|', '"');
+man_sgml('|[apos ]|', '\\&\'');
+man_sgml('|[lpar ]|', '(');
+man_sgml('|[rpar ]|', ')');
+man_sgml('|[comma ]|', ',');
+man_sgml('|[lowbar]|', '_');
+man_sgml('|[period]|', '.');
+man_sgml('|[sol ]|', '/');
+man_sgml('|[colon ]|', ':');
+man_sgml('|[semi ]|', ';');
+man_sgml('|[quest ]|', '?');
+man_sgml('|[grave ]|', '`');
+man_sgml('|[tilde ]|', '~');
+man_sgml('|[half ]|', '\(12');
+man_sgml('|[frac12]|', '\(12');
+man_sgml('|[frac14]|', '\(14');
+man_sgml('|[frac34]|', '\(34');
+man_sgml('|[frac18]|', '1/8');
+man_sgml('|[frac38]|', '3/8');
+man_sgml('|[frac58]|', '5/8');
+man_sgml('|[frac78]|', '7/8');
+man_sgml('|[sup1 ]|', '\u1\l');
+man_sgml('|[sup2 ]|', '\u2\l');
+man_sgml('|[sup3 ]|', '\u3\l');
+man_sgml('|[plusmn]|', '\(+-');
+man_sgml('|[divide]|', '\(di');
+man_sgml('|[times ]|', '\(ti');
+man_sgml('|[pound ]|', '#');
+man_sgml('|[cent ]|', '\(ct');
+man_sgml('|[yen ]|', 'yen');
+man_sgml('|[ast ]|', '*');
+man_sgml('|[horbar]|', '_');
+man_sgml('|[micro ]|', '\(*m');
+man_sgml('|[ohm ]|', '\(*W');
+man_sgml('|[deg ]|', '\(de');
+man_sgml('|[sect ]|', '\(sc');
+man_sgml('|[larr ]|', '\(<-');
+man_sgml('|[rarr ]|', '\(->');
+man_sgml('|[uarr ]|', '\(ua');
+man_sgml('|[darr ]|', '\(da');
+man_sgml('|[copy ]|', '\(co');
+man_sgml('|[reg ]|', '\(rg');
+man_sgml('|[trade ]|', '\(tm');
+man_sgml('|[brvbar]|', '|');
+man_sgml('|[not ]|', '\(no');
+man_sgml('|[hyphen]|', '\-');
+man_sgml('|[laquo ]|', '<<');
+man_sgml('|[raquo ]|', '>>');
+man_sgml('|[lsquo ]|', '`');
+man_sgml('|[rsquo ]|', '\&\'');
+man_sgml('|[ldquo ]|', '"');
+man_sgml('|[rdquo ]|', '"');
+man_sgml('|[nbsp ]|', '\ ');
+man_sgml('|[shy ]|', '\%');
+man_sgml('|[emsp ]|', '\ \ ');
+man_sgml('|[ensp ]|', '\ ');
+man_sgml('|[emsp3 ]|', '\ ');
+man_sgml('|[emsp4 ]|', '\ ');
+man_sgml('|[numsp ]|', '\0');
+man_sgml('|[puncsp]|', '\|');
+man_sgml('|[thinsp]|', '\!');
+man_sgml('|[hairsp]|', '\\^');
+man_sgml('|[mdash ]|', '\(em');
+man_sgml('|[ndash ]|', '-');
+man_sgml('|[dash ]|', '-');
+man_sgml('|[blank ]|', '\ ');
+man_sgml('|[hellip]|', '\&...');
+man_sgml('|[nldr ]|', '\&..');
+man_sgml('|[frac13]|', '1/3');
+man_sgml('|[frac23]|', '2/3');
+man_sgml('|[frac15]|', '1/5');
+man_sgml('|[frac25]|', '2/5');
+man_sgml('|[frac35]|', '3/5');
+man_sgml('|[frac45]|', '4/5');
+man_sgml('|[frac16]|', '1/6');
+man_sgml('|[frac56]|', '5/6');
+man_sgml('|[cir ]|', '\(ci');
+man_sgml('|[squ ]|', '\(sq');
+man_sgml('|[star ]|', '\(**');
+man_sgml('|[bull ]|', '\(bu');
+man_sgml('|[dagger]|', '\(dg');
+man_sgml('|[Dagger]|', '\(dd');
+man_sgml('|[caret ]|', '\^');
+man_sgml('|[lsquor]|', '`');
+man_sgml('|[ldquor]|', '``');
+man_sgml('|[fflig ]|', '\(ff');
+man_sgml('|[filig ]|', '\(fi');
+man_sgml('|[ffilig]|', '\(Fi');
+man_sgml('|[ffllig]|', '\(Fl');
+man_sgml('|[fllig ]|', '\(fl');
+man_sgml('|[rdquor]|', '\&\'\'');
+man_sgml('|[rsquor]|', '\&\'');
+man_sgml('|[vellip]|', '\&...');
+man_sgml('|[aacute]|', '\(a\'');
+man_sgml('|[Aacute]|', '\(A\'');
+man_sgml('|[acirc ]|', '\(a^');
+man_sgml('|[Acirc ]|', '\(A^');
+man_sgml('|[agrave]|', '\(a`');
+man_sgml('|[Agrave]|', '\(A`');
+man_sgml('|[auml ]|', '\(a:');
+man_sgml('|[aelig ]|', '\(ae');
+man_sgml('|[AElig ]|', '\(AE');
+man_sgml('|[eacute]|', '\(e\'');
+man_sgml('|[Eacute]|', '\(E\'');
+man_sgml('|[egrave]|', '\(e`');
+man_sgml('|[Egrave]|', '\(E`');
+man_sgml('|[iacute]|', '\(i\'');
+man_sgml('|[Iacute]|', '\(I\'');
+man_sgml('|[igrave]|', '\(i`');
+man_sgml('|[Igrave]|', '\(I`');
+man_sgml('|[ntilde]|', '\(n~');
+man_sgml('|[Ntilde]|', '\(N~');
+man_sgml('|[oacute]|', '\(o\'');
+man_sgml('|[Oacute]|', '\(O\'');
+man_sgml('|[ograve]|', '\(o`');
+man_sgml('|[Ograve]|', '\(O`');
+man_sgml('|[oslash]|', '\(o/');
+man_sgml('|[Oslash]|', '\(O/');
+man_sgml('|[szlig ]|', '\(ss');
+man_sgml('|[thorn ]|', '\(th');
+man_sgml('|[uacute]|', '\(u\'');
+man_sgml('|[Uacute]|', '\(U\'');
+man_sgml('|[ugrave]|', '\(u`');
+man_sgml('|[Ugrave]|', '\(U`');
+man_sgml('|[aogon ]|', '\(ao');
+man_sgml('|[agr ]|', '\(*a');
+man_sgml('|[Agr ]|', '\(*A');
+man_sgml('|[bgr ]|', '\(*b');
+man_sgml('|[Bgr ]|', '\(*B');
+man_sgml('|[ggr ]|', '\(*g');
+man_sgml('|[Ggr ]|', '\(*G');
+man_sgml('|[dgr ]|', '\(*d');
+man_sgml('|[Dgr ]|', '\(*D');
+man_sgml('|[egr ]|', '\(*e');
+man_sgml('|[Egr ]|', '\(*E');
+man_sgml('|[zgr ]|', '\(*z');
+man_sgml('|[Zgr ]|', '\(*Z');
+man_sgml('|[eegr ]|', '\(*y');
+man_sgml('|[EEgr ]|', '\(*Y');
+man_sgml('|[thgr ]|', '\(*h');
+man_sgml('|[THgr ]|', '\(*H');
+man_sgml('|[igr ]|', '\(*i');
+man_sgml('|[Igr ]|', '\(*I');
+man_sgml('|[kgr ]|', '\(*k');
+man_sgml('|[Kgr ]|', '\(*K');
+man_sgml('|[lgr ]|', '\(*l');
+man_sgml('|[Lgr ]|', '\(*L');
+man_sgml('|[mgr ]|', '\(*m');
+man_sgml('|[Mgr ]|', '\(*M');
+man_sgml('|[ngr ]|', '\(*n');
+man_sgml('|[Ngr ]|', '\(*N');
+man_sgml('|[xgr ]|', '\(*c');
+man_sgml('|[Xgr ]|', '\(*C');
+man_sgml('|[ogr ]|', '\(*o');
+man_sgml('|[Ogr ]|', '\(*O');
+man_sgml('|[pgr ]|', '\(*p');
+man_sgml('|[Pgr ]|', '\(*P');
+man_sgml('|[rgr ]|', '\(*r');
+man_sgml('|[Rgr ]|', '\(*R');
+man_sgml('|[sgr ]|', '\(*s');
+man_sgml('|[Sgr ]|', '\(*S');
+man_sgml('|[sfgr ]|', '\(ts');
+man_sgml('|[tgr ]|', '\(*t');
+man_sgml('|[Tgr ]|', '\(*T');
+man_sgml('|[ugr ]|', '\(*u');
+man_sgml('|[Ugr ]|', '\(*U');
+man_sgml('|[phgr ]|', '\(*f');
+man_sgml('|[PHgr ]|', '\(*F');
+man_sgml('|[khgr ]|', '\(*x');
+man_sgml('|[KHgr ]|', '\(*X');
+man_sgml('|[psgr ]|', '\(*q');
+man_sgml('|[PSgr ]|', '\(*Q');
+man_sgml('|[ohgr ]|', '\(*w');
+man_sgml('|[OHgr ]|', '\(*W');
+man_sgml('|[alpha ]|', '\(*a');
+man_sgml('|[beta ]|', '\(*b');
+man_sgml('|[gamma ]|', '\(*g');
+man_sgml('|[Gamma ]|', '\(*G');
+man_sgml('|[delta ]|', '\(*d');
+man_sgml('|[Delta ]|', '\(*D');
+man_sgml('|[epsi ]|', '\(*e');
+man_sgml('|[epsis ]|', '\(*e');
+man_sgml('|[zeta ]|', '\(*z');
+man_sgml('|[eta ]|', '\(*y');
+man_sgml('|[thetas]|', '\(*h');
+man_sgml('|[Theta ]|', '\(*H');
+man_sgml('|[iota ]|', '\(*i');
+man_sgml('|[kappa ]|', '\(*k');
+man_sgml('|[lambda]|', '\(*l');
+man_sgml('|[Lambda]|', '\(*L');
+man_sgml('|[mu ]|', '\(*m');
+man_sgml('|[nu ]|', '\(*n');
+man_sgml('|[xi ]|', '\(*c');
+man_sgml('|[Xi ]|', '\(*C');
+man_sgml('|[pi ]|', '\(*p');
+man_sgml('|[Pi ]|', '\(*P');
+man_sgml('|[rho ]|', '\(*r');
+man_sgml('|[sigma ]|', '\(*s');
+man_sgml('|[Sigma ]|', '\(*S');
+man_sgml('|[tau ]|', '\(*t');
+man_sgml('|[upsi ]|', '\(*u');
+man_sgml('|[Upsi ]|', '\(*U');
+man_sgml('|[phis ]|', '\(*f');
+man_sgml('|[Phi ]|', '\(*F');
+man_sgml('|[chi ]|', '\(*x');
+man_sgml('|[psi ]|', '\(*q');
+man_sgml('|[Psi ]|', '\(*X');
+man_sgml('|[omega ]|', '\(*w');
+man_sgml('|[Omega ]|', '\(*W');
+man_sgml('|[ap ]|', '\(ap');
+man_sgml('|[equiv ]|', '\(==');
+man_sgml('|[ge ]|', '\(>=');
+man_sgml('|[infin ]|', '\(if');
+man_sgml('|[isin ]|', '\(sb');
+man_sgml('|[le ]|', '\(<=');
+man_sgml('|[minus ]|', '\(mi');
+man_sgml('|[ne ]|', '\(!=');
+man_sgml('|[prop ]|', '\(pt');
+man_sgml('|[square]|', '\(sq');
+man_sgml('|[sub ]|', '\(sb');
+man_sgml('|[sube ]|', '\(ib');
+man_sgml('|[sup ]|', '\(sp');
+man_sgml('|[supe ]|', '\(ip');
+man_sgml('|[acute ]|', '\&\'');
+man_sgml('|[breve ]|', '\(be');
+man_sgml('|[caron ]|', '\(hc');
+man_sgml('|[cedil ]|', '\(cd');
+man_sgml('|[dot ]|', '\(dt');
+man_sgml('|[macr ]|', '\(ma');
+man_sgml('|[ogon ]|', '\(og');
+man_sgml('|[ring ]|', '\(ri');
+man_sgml('|[uml ]|', '\(..');
+
+sgml('sdata',sub {
+ my ($element, $event) = @_;
+ my ($file, $line) = ($event->file, $event->line);
+ man_output "|[", $_[0], "]|";
+ warn "Warning: unrecognized SDATA '$_[0]'"
+ . ($file && $line ? " in $file on line $line" : "")
+ . ": please add definition to docbook2man-spec.pl\n";
+});
+
+#
+# Default handlers (uncomment these if needed). Right now, these are set
+# up to gag on any unrecognised elements, sdata, processing-instructions,
+# or entities.
+#
+# sgml('start_element',sub { die "Unknown element: " . $_[0]->name; });
+# sgml('end_element','');
+
+# This is for weeding out and escaping certain characters.
+# This looks like it's inefficient since it's done on every line, but
+# in reality, SGMLSpm and sgmlspl parsing ESIS takes _much_ longer.
+
+sgml('cdata', sub
+{
+ if(!$write_manpages) { return; }
+ elsif($raw_cdata) { output $_[0]; return; }
+
+ if($separator eq 'full') {
+ output "\n" unless $newline_last++;
+ output ".PP\n";
+ $separator = '';
+ }
+
+ # Escape backslashes
+ $_[0] =~ s/\\/\\\\/g;
+
+ # Escape dots and single quotes in column 1
+ $_[0] =~ s/^[ \t]*\./\\\&\./;
+ $_[0] =~ s/^[ \t]*\'/\\\&\'/;
+
+
+ # In non-'pre'-type elements:
+ if(!$nocollapse_whitespace) {
+ # Change tabs to spaces
+ $_[0] =~ tr/\t / /s;
+
+ # Do not allow indents at beginning of line
+ # groff chokes on that.
+ if($newline_last) {
+ $_[0] =~ s/^ //;
+
+ # If the line is all blank, don't do anything.
+ if($_[0] eq '') { return; }
+
+ $_[0] =~ s/^\./\\\&\./;
+
+ # Argh... roff doesn't like ' for some unknown reason
+ $_[0] =~ s/^\'/\\\&\'/;
+ }
+ }
+
+ $newline_last = 0;
+
+ output $_[0];
+});
+
+
+# When in whitespace-collapsing mode, we disallow consecutive newlines.
+
+sgml('re', sub
+{
+ if($nocollapse_whitespace || !$newline_last) {
+ output "\n";
+ }
+
+ $newline_last = 1;
+});
+
+sgml('pi', sub {});
+sgml('entity',sub { die "Unknown external entity: " . $_[0]->name; });
+sgml('start_subdoc',sub { die "Unknown subdoc entity: " . $_[0]->name; });
+sgml('end_subdoc',sub{});
+sgml('conforming',sub{});
+
+1;
+
diff --git a/packaging/gdp-both.dsl b/packaging/gdp-both.dsl
new file mode 100644
index 0000000..2303673
--- /dev/null
+++ b/packaging/gdp-both.dsl
@@ -0,0 +1,1061 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % html "IGNORE">
+<![%html;[
+<!ENTITY % print "IGNORE">
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
+]]>
+<!ENTITY % print "INCLUDE">
+<![%print;[
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
+]]>
+]>
+
+<!--
+;;#######################################################################
+;;# #
+;;# The GNOME Documentation Project's #
+;;# Custion DocBook Stylesheet Layer #
+;;# by Dave Mason dcm@redhat.com #
+;;# Based on Norman Walsh's Modular Stylesheets #
+;;# #
+;;# This is intended as a drop-in replacement for #
+;;# the cygnus-both.dsl file in DocBook Tools. #
+;;# Just copy it to the location dbtools created #
+;;# and rename it cygnus-both.dsl #
+;;# #
+;;# This is Version 1.0-4 #
+;;# patched to fix RTF output (#49677) #
+;;# patched to work with docbook-dsssl-1.72 #
+;;# patched for ADDRESS output (#50605) #
+;;# removed comment and remark #
+;;# disabled use-id-as-filename #
+;;# don't define %graphic-default-extension% #
+;;#######################################################################
+-->
+
+<style-sheet>
+
+
+<style-specification id="print" use="docbook">
+<style-specification-body>
+
+;;==========================================================================
+;; PRINT
+;;==========================================================================
+
+;;======================================
+;;General Options
+;;======================================
+
+;;Do you want to print on both sides of the paper?
+(define %two-side%
+ #t)
+
+;;Do you want enumerated sections? (E.g, 1.1, 1.1.1, 1.2, etc.)
+(define %section-autolabel%
+ #f)
+
+;;Show URL links? If the text of the link and the URL are identical,
+;;the parenthetical URL is suppressed.
+(define %show-ulinks%
+ #t)
+
+;Make Ulinks footnotes to stop bleeding in the edges - this increases
+;'jade --> print' time tremendously keep this in mind before
+;complaining!
+(define %footnote-ulinks%
+ #t)
+
+;;Tex Backend on
+(define tex-backend
+ #t)
+
+;;Define Line Spacing
+(define %line-spacing-factor% 1.1)
+
+;;Define the Paragraph Style
+(define para-style
+ (style
+ font-size: %bf-size%
+ font-weight: 'medium
+ font-posture: 'upright
+ font-family-name: %body-font-family%
+ line-spacing: (* %bf-size% %line-spacing-factor%)))
+
+(define ($object-titles-after$)
+ (list (normalize "figure")))
+
+;;======================================
+;;Book Options
+;;======================================
+
+
+;;Do you want a title page for a Book?
+(define %generate-book-titlepage%
+ #t)
+
+;;Do you want a separate page for the title?
+(define %generate-book-titlepage-on-separate-page%
+ #t)
+
+;;Generate Book TOC?
+(define %generate-book-toc%
+ #t)
+
+;;What depth should the TOC generate?
+;;!Only top level of appendixes!
+(define (toc-depth nd)
+ (if (string=? (gi nd) (normalize "book"))
+ 3
+ (if (string=? (gi nd) (normalize "appendix"))
+ 0
+ 1)))
+
+;;Do you want a TOC for the element part?
+(define %generate-part-toc%
+ #f)
+
+;;Do you want the part toc on the part titlepage or separate?
+(define %generate-part-toc-on-titlepage%
+ #t)
+
+;;Generate Part Title Page?
+(define %generate-part-titlepage%
+ #f)
+
+;;Do you want the Part intro on the part title page?
+(define %generate-partintro-on-titlepage%
+ #t)
+
+;;What elements should have a LOT?
+(define ($generate-book-lot-list$)
+ (list (normalize "equation")))
+
+;;Do you want chapters enumerated?
+(define %chapter-autolabel%
+ #t)
+
+;;Do you want Chapter's and Appendix's
+;;to have automatic labels?
+(define %chap-app-running-head-autolabel%
+ #t)
+
+
+;;======================================
+;;Article Options
+;;======================================
+
+;;Do you want a title page for an Article?
+(define %generate-article-titlepage%
+ #t)
+
+;;Generate Article TOC?
+(define %generate-article-toc%
+ #t)
+
+;;Do you want a separate page for the title?
+(define %generate-article-titlepage-on-separate-page%
+ #t)
+
+;;Do you want the article toc on the titlepage or separate?
+(define %generate-article-toc-on-titlepage%
+ #t)
+
+;;Do you want to start new page numbers with each article?
+(define %article-page-number-restart%
+ #f)
+
+;;Titlepage Separate?
+(define (chunk-skip-first-element-list)
+ '())
+
+;;Titlepage Not Separate
+;(define (chunk-skip-first-element-list)
+; (list (normalize "sect1")
+; (normalize "section")))
+
+;;======================================
+;;Columns
+;;======================================
+
+;;How many columns do you want?
+(define %page-n-columns%
+ 1)
+
+;;How much space between columns?
+(define %page-column-sep%
+ 0.2in)
+
+;;How many Columns on the titlepage?
+(define %titlepage-n-columns%
+ 1)
+
+;;Balance columns?
+(define %page-balance-colums%
+#t)
+
+;;======================================
+;;Fonts
+;;======================================
+
+;;Defines the general size of the text in the document. normal(10),
+;;presbyopic(12), and large-type(24).
+(define %visual-acuity%
+ "normal")
+
+;;What font would you like for titles?
+(define %title-font-family%
+ "Helvetica")
+
+;;What font would you like for the body?
+(define %body-font-family%
+ "Palatino")
+
+;;What font would you like for mono-seq?
+(define %mono-font-family%
+ "Courier New")
+
+;;If the base fontsize is 10pt, and '%hsize-bump-factor%' is
+;; 1.2, hsize 1 is 12pt, hsize 2 is 14.4pt, hsize 3 is 17.28pt, etc
+(define %hsize-bump-factor%
+ 1.1)
+
+;;What size do you want the body fonts?
+(define %bf-size%
+ (case %visual-acuity%
+ (("tiny") 8pt)
+ (("normal") 10pt)
+ (("presbyopic") 12pt)
+ (("large-type") 24pt)))
+
+(define-unit em %bf-size%)
+
+;;======================================
+;;Margins
+;;======================================
+
+(define %left-right-margin% 6pi)
+
+;;How much indentation for the body?
+(define %body-start-indent%
+ 4pi)
+
+;;How big is the left margin? (relative to physical page)
+(define %left-margin%
+ 8pi) ;white-paper-column
+
+;;How big is the right margin? (relative to physical page)
+(define %right-margin%
+ 8pi) ;white-paper-column
+
+;;How big do you want the margin at the top?
+(define %top-margin%
+(if (equal? %visual-acuity% "large-type")
+ 7.5pi
+ 6pi))
+
+;;How big do you want the margin at the bottom?
+(define %bottom-margin%
+ (if (equal? %visual-acuity% "large-type")
+ 7.5pi
+ 5pi))
+
+;;Define the text width. (Change the elements in the formula rather
+;;than the formula itself)
+;(define %text-width% (- %page-width% (* %left-right-margin% 2)))
+(define %text-width% (- %page-width% (+ %left-margin% %right-margin%)))
+
+;;Define the body width. (Change the elements in the formula rather
+;;than the formula itself)
+(define %body-width%
+ (- %text-width% %body-start-indent%))
+
+;;Define distance between paragraphs
+(define %para-sep%
+ (/ %bf-size% 2.0))
+
+;;Define distance between block elements (figures, tables, etc.).
+(define %block-sep%
+ (* %para-sep% 2.0))
+
+;;Indent block elements?
+(define %block-start-indent%
+ 0pt)
+;0pt
+
+;;======================================
+;;Admon Graphics
+;;======================================
+
+;;Do you want admon graohics on?
+(define %admon-graphics%
+ #f)
+
+;;Where are the admon graphics?
+(define %admon-graphics-path%
+ "../images/")
+
+;;======================================
+;;Quadding
+;;======================================
+
+;;What quadding do you want by default; start, center, justify, or end?
+(define %default-quadding%
+ 'justify)
+
+;;What quadding for component titles(Chapter, Appendix, etc)?
+(define %component-title-quadding%
+ 'start)
+
+;;What quadding for section titles?
+(define %section-title-quadding%
+ 'start)
+
+;;What quadding for section sub-titles?
+(define %section-subtitle-quadding%
+ 'start)
+
+;;What quadding for article title?
+(define %article-title-quadding%
+ 'center)
+
+;;What quadding for article sub-titles?
+(define %article-subtitle-quadding%
+ 'center)
+
+;;What quadding for division subtitles?
+(define %division-subtitle-quadding%
+ 'start)
+
+;;What quadding for component subtitles?
+(define %component-subtitle-quadding%
+ 'start)
+
+
+
+
+;;======================================
+;;Paper Options
+;;======================================
+
+;;What size paper do you need? A4, USletter, USlandscape, or RedHat?
+(define %paper-type%
+ "USletter")
+
+;;Now define those paper types' width
+(define %page-width%
+ (case %paper-type%
+ (("A4") 210mm)
+ (("USletter") 8.5in)
+ (("USlandscape") 11in)))
+
+;;Now define those paper types' height
+(define %page-height%
+ (case %paper-type%
+ (("A4") 297mm)
+ (("USletter") 11in)
+ (("USlandscape") 8.5in)))
+
+;;======================================
+;;Functions
+;;======================================
+
+(define (OLSTEP)
+ (case
+ (modulo (length (hierarchical-number-recursive "ORDEREDLIST")) 4)
+ ((1) 1.2em)
+ ((2) 1.2em)
+ ((3) 1.6em)
+ ((0) 1.4em)))
+
+(define (ILSTEP) 1.0em)
+
+(define (PROCSTEP ilvl)
+ (if (> ilvl 1) 1.8em 1.4em))
+
+(define (PROCWID ilvl)
+ (if (> ilvl 1) 1.8em 1.4em))
+
+
+(define ($comptitle$)
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: (HSIZE 2)
+ line-spacing: (* (HSIZE 2) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor%)
+ start-indent: 0pt
+ first-line-start-indent: 0pt
+ quadding: 'start
+ keep-with-next?: #t
+ (process-children-trim)))
+
+;;Callouts are confusing in Postscript... fix them.
+(define %callout-fancy-bug%
+ #f)
+
+
+;;By default perils are centered and dropped into a box with a really
+;;big border - I have simply decreased the border thickness -
+;;unfortunately it takes all this to do it - sigh.
+(define ($peril$)
+ (let* ((title (select-elements
+ (children (current-node)) (normalize "title")))
+ (has-title (not (node-list-empty? title)))
+ (adm-title (if has-title
+ (make sequence
+ (with-mode title-sosofo-mode
+ (process-node-list (node-list-first title))))
+ (literal
+ (gentext-element-name
+ (current-node)))))
+ (hs (HSIZE 2)))
+ (if %admon-graphics%
+ ($graphical-admonition$)
+ (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ font-family-name: %admon-font-family%
+ font-size: (- %bf-size% 1pt)
+ font-weight: 'medium
+ font-posture: 'upright
+ line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%)
+ (make box
+ display?: #t
+ box-type: 'border
+ line-thickness: .5pt
+ start-indent: (+ (inherited-start-indent) (* 2 (ILSTEP)) 2pt)
+ end-indent: (inherited-end-indent)
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: 1em
+ end-indent: 1em
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ quadding: 'center
+ keep-with-next?: #t
+ adm-title)
+ (process-children))))))
+
+
+;;======================================
+;;Non-printing Elements
+;;======================================
+(element TITLEABBREV (empty-sosofo))
+(element SUBTITLE (empty-sosofo))
+(element SETINFO (empty-sosofo))
+(element BOOKINFO (empty-sosofo))
+(element BIBLIOENTRY (empty-sosofo))
+(element BIBLIOMISC (empty-sosofo))
+(element BOOKBIBLIO (empty-sosofo))
+(element SERIESINFO (empty-sosofo))
+(element DOCINFO (empty-sosofo))
+(element ARTHEADER (empty-sosofo))
+;;(element ADDRESS (empty-sosofo))
+
+;;Show comment element?
+(define %show-comments%
+ #t)
+
+;;======================================
+;;Formalpara titles
+;;======================================
+
+
+;;Change the way Formal Paragraph titles are displayed. The commented
+;;out section will run the titles in the paragraphs.
+(element (formalpara title)
+ ;(make sequence
+ ;font-weight: 'bold
+ ;($runinhead$))
+ ($lowtitle$ 5 7))
+
+;;======================================
+;;Inlines
+;;======================================
+
+(element application ($mono-seq$))
+(element command ($bold-seq$))
+(element filename ($mono-seq$))
+(element function ($mono-seq$))
+(element guibutton ($bold-seq$))
+(element guiicon ($bold-seq$))
+(element guilabel ($italic-seq$))
+(element guimenu ($bold-seq$))
+(element guimenuitem ($bold-seq$))
+(element hardware ($bold-mono-seq$))
+(element keycap ($bold-seq$))
+(element literal ($mono-seq$))
+(element parameter ($italic-mono-seq$))
+(element prompt ($mono-seq$))
+(element symbol ($charseq$))
+(element emphasis ($italic-seq$))
+
+</style-specification-body>
+</style-specification>
+
+
+<!--
+;;===========================================================================
+;; HTML
+;;===========================================================================
+-->
+
+<style-specification id="html" use="docbook">
+<style-specification-body>
+
+;; this is necessary because right now jadetex does not understand
+;; symbolic entities, whereas things work well with numeric entities.
+(declare-characteristic preserve-sdata?
+ "UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
+ #f)
+
+
+;;=========================
+;;Header HTML 4.0.1
+;;=========================
+
+(define %html-pubid% "-//W3C//DTD HTML 4.01//EN")
+
+;;=========================
+;;Common Stuff
+;;=========================
+
+;;Should there be a link to the legalnotice?
+(define %generate-legalnotice-link%
+ #t)
+
+;;What graphics extensions allowed?
+(define %graphic-extensions%
+'("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" ))
+
+;;What is the default extension for images?
+(define %graphic-default-extension% "png")
+
+;;Use element ids as filenames?
+(define %use-id-as-filename%
+ #f)
+
+
+;;=========================
+;;Book Stuff
+;;=========================
+
+;;Do you want a TOC for Books?
+(define %generate-book-toc%
+ #t)
+
+;;What depth should the TOC generate?
+;;!Only top level of appendixes!
+(define (toc-depth nd)
+ (if (string=? (gi nd) (normalize "book"))
+ 3
+ (if (string=? (gi nd) (normalize "appendix"))
+ 0
+ 1)))
+
+;;What elements should have an LOT?
+(define ($generate-book-lot-list$)
+ (list (normalize "equation")))
+
+;;Do you want a title page for your Book?
+(define %generate-book-titlepage%
+#t)
+
+;;=========================
+;;Part Stuff
+;;=========================
+
+;;Should parts have TOCs?
+(define %generate-part-toc%
+ #t)
+
+;;Should part TOCs be on their titlepages?
+(define %generate-part-toc-on-titlepage%
+ #t)
+
+;;Do you want a title page for your part?
+(define %generate-part-titlepage%
+ #t)
+
+;;Should the Part intro be on the part title page?
+(define %generate-partintro-on-titlepage%
+ #t)
+
+(define %para-autolabel%
+ #t)
+
+;;========================
+;;Chapter Stuff
+;;=======================
+
+;;No TOCs in Chapters
+(define $generate-chapter-toc$
+ (lambda ()
+ #f))
+
+;;=========================
+;;Navigation
+;;=========================
+
+;;Should there be navigation at top?
+(define %header-navigation%
+ #t)
+
+;;Should there be navigation at bottom?
+(define %footer-navigation%
+ #t)
+
+;;Use tables to create the navigation?
+(define %gentext-nav-use-tables%
+ #t)
+
+;;If tables are used for navigation,
+;;how wide should they be?
+(define %gentext-nav-tblwidth%
+"100%")
+
+;;Add arrows to navigation (comment these
+;;out if you want admon graphics here)
+(define (gentext-en-nav-prev prev)
+ (make sequence (literal "<<< Previous")))
+
+;;Add arrows to navigation (comment these
+;;out if you want admon graphics here)
+(define (gentext-en-nav-next next)
+ (make sequence (literal "Next >>>")))
+
+
+;;=========================
+;;Tables and Lists
+;;=========================
+
+;;Should Variable lists be tables?
+(define %always-format-variablelist-as-table%
+ #f)
+
+;;What is the length of the 'Term' in a variablelist?
+(define %default-variablelist-termlength%
+ 20)
+
+;;When true | If the terms are shorter than
+;;the termlength above then the variablelist
+;;will be formatted as a table.
+(define %may-format-variablelist-as-table%
+#f)
+
+;;This overrides the tgroup definition
+;;(copied from 1.20, dbtable.dsl).
+;;It changes the table background color,
+;;cell spacing and cell padding.
+;;This is based on gtk-doc additions - thanks!
+
+(element tgroup
+ (let* ((wrapper (parent (current-node)))
+ (frameattr (attribute-string (normalize "frame") wrapper))
+ (pgwide (attribute-string (normalize "pgwide") wrapper))
+ (footnotes (select-elements (descendants (current-node))
+ (normalize "footnote")))
+ (border (if (equal? frameattr (normalize "none"))
+ '(("BORDER" "0"))
+ '(("BORDER" "1"))))
+ (bgcolor '(("BGCOLOR" "#E0E0E0")))
+ (width (if (equal? pgwide "1")
+ (list (list "WIDTH" ($table-width$)))
+ '()))
+ (head (select-elements (children (current-node)) (normalize "thead")))
+ (body (select-elements (children (current-node)) (normalize "tbody")))
+ (feet (select-elements (children (current-node)) (normalize "tfoot"))))
+ (make element gi: "TABLE"
+ attributes: (append
+ border
+ width
+ bgcolor
+ '(("CELLSPACING" "0"))
+ '(("CELLPADDING" "4"))
+ (if %cals-table-class%
+ (list (list "CLASS" %cals-table-class%))
+ '()))
+ (process-node-list head)
+ (process-node-list body)
+ (process-node-list feet)
+ (make-table-endnotes))))
+
+;;===================
+;; Admon Graphics
+;;===================
+
+;;Should Admon Graphics be used?
+(define %admon-graphics%
+ #t)
+
+;;Where are those admon graphics?
+(define %admon-graphics-path%
+ "./stylesheet-images/")
+
+;;Given an admonition node, returns the
+;;name of the graphic that should
+;;be used for that admonition.
+;;Define admon graphics usage
+;;NOTE these will change to pngs
+;;soon in the GDP when Tigert gets
+;;the time to make special ones for us!
+(define ($admon-graphic$ #!optional (nd (current-node)))
+ (cond ((equal? (gi nd) (normalize "tip"))
+ (string-append %admon-graphics-path% "tip.gif"))
+ ((equal? (gi nd) (normalize "note"))
+ (string-append %admon-graphics-path% "note.gif"))
+ ((equal? (gi nd) (normalize "important"))
+ (string-append %admon-graphics-path% "important.gif"))
+ ((equal? (gi nd) (normalize "caution"))
+ (string-append %admon-graphics-path% "caution.gif"))
+ ((equal? (gi nd) (normalize "warning"))
+ (string-append %admon-graphics-path% "warning.gif"))
+ (else (error (string-append (gi nd) " is not an admonition.")))))
+
+;;Given an admonition node, returns
+;;the width of the graphic that will
+;;be used for that admonition.
+(define ($admon-graphic-width$ #!optional (nd (current-node)))
+ "25")
+
+;;=========================
+;;Labels
+;;=========================
+
+;;Enumerate Chapters?
+(define %chapter-autolabel%
+ #f)
+
+;;Enumerate Sections?
+(define %section-autolabel%
+ #f)
+
+;;=========================
+;; HTML Attributes
+;;=========================
+
+;;What attributes should be hung off
+;;of 'body'?
+(define %body-attr%
+ (list
+ (list "BGCOLOR" "#FFFFFF")
+ (list "TEXT" "#000000")
+ (list "LINK" "#0000FF")
+ (list "VLINK" "#840084")
+ (list "ALINK" "#0000FF")))
+
+;;Default extension for filenames?
+(define %html-ext%
+ ".html")
+
+;;Use a CSS stylesheet?
+;;Which one? Should work on
+;;this one soon
+;(define %stylesheet%
+; "./gnome.css")
+
+;;Use it
+;(define %stylesheet-type%
+;"text/css")
+
+
+;;========================
+;;Title Pages for Books
+;;=======================
+
+(define (book-titlepage-recto-elements)
+ (list (normalize "title")
+ (normalize "subtitle")
+ (normalize "corpauthor")
+ (normalize "authorgroup")
+ (normalize "author")
+ (normalize "orgname")
+ (normalize "graphic")
+ (normalize "copyright")
+ (normalize "legalnotice")
+ (normalize "releaseinfo")
+ (normalize "publisher")
+ (normalize "isbn")))
+
+;;========================
+;;Title Pages for Articles
+;;========================
+
+;;Should Articles have a TOC?
+(define %generate-article-toc%
+ #t)
+
+;;Which elements should appear
+;;on title page?
+(define (article-titlepage-recto-elements)
+ (list (normalize "title")
+ (normalize "subtitle")
+ (normalize "authorgroup")
+ (normalize "copyright")
+ (normalize "legalnotice")
+ (normalize "abstract")))
+
+;;How should elements on title page look?
+(mode article-titlepage-recto-mode
+
+;;Author name is too big - change it!
+ (element author
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make element gi: "H4"
+ attributes: (list (list "CLASS" (gi)))
+ (make element gi: "A"
+ attributes: (list (list "NAME" (element-id)))
+ (literal author-name)))
+ (process-node-list author-affil))))
+
+;;Address?
+ (element address
+ (make sequence
+ (make element gi: "DIV"
+ attributes: (list (list "CLASS" (gi)))
+ (process-children))))
+
+;;Get rid of spam-producing "mailto" links
+;;and get rid of email indentation
+ (element email
+ (make sequence
+ (make element gi: "DIV"
+ attributes: (list (list "CLASS" (gi)))
+ (process-children))))
+
+;;Point Abstract to custom table function
+;;(See $dcm-abstract-object$ below. For default
+;;use $semiformal-object$
+ (element abstract
+ (make element gi: "DIV"
+ ($dcm-abstract-object$)))
+
+ (element (abstract title) (empty-sosofo))
+
+;;subtitle sizing
+(element subtitle
+ (make element gi: "H4"
+ attributes: (list (list "CLASS" (gi)))
+ (process-children-trim))))
+
+;;=================
+;; INLINES
+;;=================
+
+;Define my own series of fonts for various elements
+(element application ($mono-seq$))
+(element command ($bold-seq$))
+(element filename ($mono-seq$))
+(element function ($mono-seq$))
+(element guibutton ($bold-seq$))
+(element guiicon ($bold-seq$))
+(element guilabel ($bold-mono-seq$))
+(element guimenu ($bold-seq$))
+(element guimenuitem ($bold-seq$))
+(element guisubmenu ($bold-seq$))
+(element hardware ($bold-mono-seq$))
+(element keycap ($bold-seq$))
+(element literal ($mono-seq$))
+(element parameter ($italic-mono-seq$))
+(element prompt ($mono-seq$))
+(element symbol ($charseq$))
+(element emphasis ($italic-seq$))
+
+;;Show comment element?
+(define %show-comments%
+ #t)
+
+;;====================
+;; General Formatting
+;;====================
+
+;;Formal Paras are ugly by default!
+;;Make the title run in - otherwise
+;;you should use a sect!
+(element formalpara
+ (make element gi: "DIV"
+ attributes: (list
+ (list "CLASS" (gi)))
+ (make element gi: "P"
+ (process-children))))
+
+;;This is the old one
+;(element (formalpara title)
+;($lowtitle$ 5))
+
+;;This is the new one
+(element (formalpara title)
+ (make element gi: "B"
+ ($runinhead$)))
+
+;;Make captions come after objects in the list
+(define ($object-titles-after$)
+ (list (normalize "figure")))
+
+
+;; Handle qanda labelling with Q: A:
+(define (qanda-defaultlabel)
+ (normalize "qanda"))
+
+;;From FreeBSD Sheets (Thanks!) Display Q and A in bigger bolder fonts
+
+(element question
+ (let* ((chlist (children (current-node)))
+ (firstch (node-list-first chlist))
+ (restch (node-list-rest chlist)))
+ (make element gi: "DIV"
+ attributes: (list (list "CLASS" (gi)))
+ (make element gi: "P"
+ (make element gi: "BIG"
+ (make element gi: "A"
+ attributes: (list
+ (list "NAME" (element-id)))
+ (empty-sosofo))
+ (make element gi: "B"
+ (literal (question-answer-label
+ (current-node)) " ")
+ (process-node-list (children firstch)))))
+ (process-node-list restch))))
+
+;;Literal Elements
+
+;;Indent Literal layouts?
+(define %indent-literallayout-lines%
+ #f)
+
+;;Indent Programlistings?
+(define %indent-programlisting-lines%
+ #f)
+
+;;Number lines in Programlistings?
+(define %number-programlisting-lines%
+ #f)
+
+;;Should verbatim items be 'shaded' with a table?
+(define %shade-verbatim%
+ #t)
+
+;;Define shade-verbatim attributes
+(define ($shade-verbatim-attr$)
+ (list
+ (list "BORDER" "0")
+ (list "BGCOLOR" "#E0E0E0")
+ (list "WIDTH" ($table-width$))))
+
+;;===================
+;; Entities
+;;===================
+
+;;Netscape doesn't handle trademark
+;;entity right at all!! Get rid of it.
+;;Make a TM in a superscipt font.
+(element trademark
+ (make sequence
+ (process-children)
+ (make element gi: "sup"
+ (literal "TM"))))
+
+
+;;===================
+;; New Definitions
+;;==================
+
+(define ($dcm-abstract-object$)
+ (make element gi: "TABLE"
+ attributes: '(("BORDER" "0")
+ ("BGCOLOR" "#E0E0E0")
+ ("WIDTH" "50%")
+ ("CELLSPACING" "0")
+ ("CELLPADDING" "0")
+ ("ALIGN" "CENTER"))
+ (make element gi: "TR"
+ (make element gi: "TD"
+ attributes: '(("VALIGN" "TOP"))
+ (make element gi: "B"
+ (literal "Abstract"))))
+ (make element gi: "TR"
+ (make element gi: "TD"
+ attributes: '(("VALIGN" "TOP"))
+ (process-children)))))
+
+;;Redefine Titlepage Separator on Articles
+
+(define (article-titlepage-separator side)
+ (make empty-element gi: "HR"
+ attributes: '(("WIDTH" "75%")
+ ("ALIGN" "CENTER")
+ ("COLOR" "#000000")
+ ("SIZE" "1"))))
+
+
+
+
+(define (chunk-element-list)
+ (list (normalize "preface")
+ (normalize "chapter")
+ (normalize "appendix")
+ (normalize "article")
+ (normalize "glossary")
+ (normalize "bibliography")
+ (normalize "index")
+ (normalize "colophon")
+ (normalize "setindex")
+ (normalize "reference")
+ (normalize "refentry")
+ (normalize "part")
+ (normalize "sect1")
+ (normalize "section")
+ (normalize "book") ;; just in case nothing else matches...
+ (normalize "set") ;; sets are definitely chunks...
+ ))
+
+;;Do you want Callouts to be graphics?
+(define %callout-graphics%
+#f)
+
+
+;;Make Callout graphics PNGs
+(define %callout-graphics-path%
+ "./imagelib/callouts/")
+
+ ;; Redefine $callout-bug$ to support the %callout-graphic-ext%
+ ;; variable.
+ (define ($callout-bug$ conumber)
+ (let ((number (if conumber (format-number conumber "1") "0")))
+ (if conumber
+ (if %callout-graphics%
+ (if (<= conumber %callout-graphics-number-limit%)
+ (make empty-element gi: "IMG"
+ attributes: (list (list "SRC"
+ (root-rel-path
+ (string-append
+ %callout-graphics-path%
+ number
+ %callout-graphics-ext%)))
+ (list "HSPACE" "0")
+ (list "VSPACE" "0")
+ (list "BORDER" "0")
+ (list "ALT"
+ (string-append
+ "(" number ")"))))
+ (make element gi: "B"
+ (literal "(" (format-number conumber "1") ")")))
+ (make element gi: "B"
+ (literal "(" (format-number conumber "1") ")")))
+ (make element gi: "B"
+ (literal "(??)")))))
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>