章 5. The Documentation Build Process

內容目錄
5.1. Rendering DocBook into Output
5.2. The FreeBSD Documentation Build Toolset
5.3. Understanding Makefiles in the Documentation Tree
5.4. FreeBSD Documentation Project Make Includes

This chapter covers organization of the documentation build process and how make(1) is used to control it.

5.1. Rendering DocBook into Output

Different types of output can be produced from a single DocBook source file. The type of output desired is set with the FORMATS variable. A list of known formats is stored in KNOWN_FORMATS:

% cd ~/doc/en_US.ISO8859-1/books/handbook
% make -V KNOWN_FORMATS
表格 5.1. Common Output Formats
FORMATS ValueFile TypeDescription
htmlHTML, one fileA single book.html or article.html.
html-splitHTML, multiple filesMultiple HTML files, one for each chapter or section, for use on a typical web site.
pdfPDFPortable Document Format

The default output format can vary by document, but is usually html-split. Other formats are chosen by setting FORMATS to a specific value. Multiple output formats can be created at a single time by setting FORMATS to a list of formats.

範例 5.1. Build a Single HTML Output File
% cd ~/doc/en_US.ISO8859-1/books/handbook
% make FORMATS=html

範例 5.2. Build HTML-Split and PDF Output Files
% cd ~/doc/en_US.ISO8859-1/books/handbook
% make FORMATS="html-split pdf"

本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/

若有 FreeBSD 方面疑問,請先閱讀 FreeBSD 相關文件,如不能解決的話,再洽詢 <questions@FreeBSD.org>。

關於本文件的問題,請洽詢 <doc@FreeBSD.org>。