Appendix F. Building Gamma/GTK docs

Table of Contents

F.1. doc/o/gtkgamma-book/Makefile
F.2. doc/bin/sort_and_arrange.pl
F.3. doc/i/gtkgamma/autodocs/function_processor.g
F.4. doc/i/gtkgamma/autodocs/gtkwidgets2docs.g
F.5. doc/i/gtkgamma/autodocs/gg_utils.g
F.6. Sample SGML output file: re_GtkContainer.sgml

Here is the source code we use to build our Gamma/GTK reference pages, along with an example.

F.1. doc/o/gtkgamma-book/Makefile

# Makefile

# In addition to generating the docs, this makefile copies the gtk,
# gdk, and glib directories with all their HTML files into the html/
# and help/ subdirectories of the output directory.  It also extracts
# the HTML names for widget instance variables, and calls the
# doc/bin/sort_and_arrange.pl program to process them.

.PHONY: gtkhtml

GTKDOCS = gtk gdk glib

H = html help html-x

I = ../../i/gtkgamma

.sgml: $(wildcard main.sgml $(I)/* ../../i/common/*.sgml \
         ../../config/cogent-both.dsl) 

include ../../sgml.mak

default: html pdf

html:	gtkhtml

help: 	gtkhtml

html-x: gtkhtml

gtkhtml:
	for h in $(H); do \
	for m in $(GTKDOCS); do \
		rm -r -f $$h/$$m; \
		mkdir -p $$h/$$m/; \
		cp -r ../../i/gtkgamma/htmldocs/$$m/*.html $$h/$$m/; \
	done; \
	done

	grep -r ".html#GTK.*\-\-.*" ../../i/gtkgamma/htmldocs/gtk/*.html | \
            sed 's/^.*#//' | \
            sed 's/\"//' > ../../i/gtkgamma/autodocs/raw_ivars.txt
	../../bin/sort_and_arrange.pl

again: fresh html