Skip to content

Commit

Permalink
Convert documentation from troff to DocBook/XML
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
  • Loading branch information
alanc committed Oct 7, 2009
1 parent 96a4daa commit 18053ff
Show file tree
Hide file tree
Showing 7 changed files with 781 additions and 403 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ xfont.pc
libXfont-*.tar.*
ChangeLog
tags
doc/fontlib.txt
doc/fontlib.html
doc/fontlib.ps
doc/fontlib.pdf
21 changes: 21 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,24 @@ ChangeLog:

dist-hook: ChangeLog

# Developer documentation - not installed on system
EXTRA_DIST += doc/fontlib.xml doc/fontlib.xsl doc/fontlib.css

if MAKE_DEVEL_DOCS
if HAVE_XMLTO
noinst_DATA = doc/fontlib.txt doc/fontlib.html $(srcdir)/doc/fontlib.css
CLEANFILES = doc/fontlib.txt doc/fontlib.html doc/fontlib.pdf doc/fontlib.ps

doc/fontlib.txt: $(srcdir)/doc/fontlib.xml $(srcdir)/doc/fontlib.xsl
$(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/fontlib.xsl -o doc txt $(srcdir)/doc/fontlib.xml

doc/fontlib.html: $(srcdir)/doc/fontlib.xml $(srcdir)/doc/fontlib.xsl
$(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/fontlib.xsl -o doc xhtml-nochunks $(srcdir)/doc/fontlib.xml

doc/fontlib.pdf: $(srcdir)/doc/fontlib.xml $(srcdir)/doc/fontlib.xsl
$(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/fontlib.xsl -o doc pdf $(srcdir)/doc/fontlib.xml

doc/fontlib.ps: $(srcdir)/doc/fontlib.xml $(srcdir)/doc/fontlib.xsl
$(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/fontlib.xsl -o doc ps $(srcdir)/doc/fontlib.xml
endif HAVE_XMLTO
endif MAKE_DEVEL_DOCS
12 changes: 12 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ PKG_PROG_PKG_CONFIG

XORG_DEFAULT_OPTIONS

# xmlto is used to convert doc/fontlib.xml from DocBook to PDF/HTML
AC_ARG_VAR([XMLTO], [Path to xmlto command])
AC_PATH_PROG([XMLTO], [xmlto])
AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"])

# Option to enable support for building developer internals docs
AC_ARG_ENABLE(devel-docs,
AS_HELP_STRING([--enable-devel-docs],
[Build internals documentation for developers (default: enabled)]),
[DEVEL_DOCS=$enableval], [DEVEL_DOCS=yes])
AM_CONDITIONAL([MAKE_DEVEL_DOCS], [test "x$DEVEL_DOCS" = "xyes"])

# Look for headers
AC_CHECK_HEADERS([endian.h poll.h sys/poll.h])
AC_CHECK_FUNCS([poll])
Expand Down
46 changes: 46 additions & 0 deletions doc/fontlib.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
*
* 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, and/or sell copies of the Software, and to permit persons
* to whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* 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
* OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
* INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Except as contained in this notice, the name of a copyright holder
* shall not be used in advertising or otherwise to promote the sale, use
* or other dealings in this Software without prior written authorization
* of the copyright holder.
*/

.structname, .property, .errorname, .function, .parameter, .filename {
font-family: monospace;
}

h1, .author, .pubdate {
text-align: center;
}

.legalnotice {
text-align: justify;
font-size: small;
font-style: italic;
}

.warning {
border: 1px solid red;
background: yellow;
}
Loading

0 comments on commit 18053ff

Please # to comment.