Product SiteDocumentation Site

3.5. Building a Book

To build a book:
  1. Confirm the YEAR and HOLDER entities have been configured in the Book_Name.ent file, as per Section 3.3.7, “Book_Name.ent”.
  2. Change into the root directory of the book. For example, if the book was named Test_Book and was located in the /books/ directory, run the following command:
    cd /books/Test_Book
    
  3. Run the following command to check for any errors that would stop the book from building:
    make test-en-US
    
  4. Run the following command to build the book:
    make format-en-US
    
    Replace format with the desired format, for example, html.
The following table lists commonly used make commands:
CommandResult
make helpList available make commands for building a book.
make help_paramsList available parameters that can be set in the Makefile.
make test-en-USCheck that the book can be built correctly. Run the make test command before running any other make command, and before checking a book back into a repository (i.e. CVS or SVN).
make html-en-USBuild the book in HTML format. The HTML output will be located in the Book_Name/tmp/en-US/html/ directory.
make html-single-en-USBuild the book HTML format. The output will be a single HTML file located in the Book_Name/tmp/en-US/html-single/ directory.
make htmlhelp-en-USBuild the book in HTML HELP format. HTML HELP is a limited form of HTML, designed to be viewed regardless of your platform or Web browser. The output is located in the Book_Name/tmp/en-US/htmlhelp/ directory.
make pdf-en-USBuild the book in PDF format. This may not be supported on all systems.
make cleanRemove all files and folders in the tmp/ subdirectory. The tmp/ subdirectory is created after running a make command to build a book, such as make html.
make web-srpm-en-USCreate a source RPM to generate web based documentation RPMs from.
make clean_idsChange all IDs to a standard format. This format is Book_Name-title. For example, a section with a title of First Section in a book named Test_Book will have the following ID after running make clean_ids: <section id="Test_Book-First_Section">

Warning: make clean_ids

To make translation easier, make clean_ids uses the first four characters of the tag as a prefix for the ID. Consequently, you must check out the latest versions of the xml source and translations before running this command.
Failing to have the po files checked out before running make clean_ids causes the XML and po files to slip out of sync. And this means all links in the po files have to be manually updated.