Commit 8efbcc35 authored by David Byers's avatar David Byers
Browse files

Automatic documentation of variables and functions

parent a4d01471
EMACS=emacs-21.4
SRC=../../src
CHAPTERS=texts.xml \
commands.xml
CHAPTERS=intro.xml \
texts.xml \
etiquette.xml \
commands.xml \
variables.xml \
dummy.xml \
glossary.xml
GENFILES=fnc.ent var.ent editcmd.ent commands.xml variables.xml dummy.xml
INCFILES=$(CHAPTERS:%=%.inc)
# Generate the manual from DocBook XML using Jade wrappers
# I really don't know if the jw command is standard in installations
# of Jade, but it works fine in Debian/Gnu Linux.
# of Jade, but it works fine in Debian/Gnu Linux. The path to the
# stylesheet is also Linux (maybe Debian) specific.
manual.ps: $(INCFILES) manual.xml chp.xml
jw -f docbook -b ps manual.xml
manual.ps: $(INCFILES) $(GENFILES) manual.xml chp.xml
jw -f docbook -d '/usr/share/sgml/docbook/stylesheet/dsssl/ldp/ldp.dsl#print' -b ps manual.xml
# These files are generated from the source code.
fnc.ent var.ent commands.xml: $(SRC)/lyskom.el
emacs -batch -l $(SRC)/lyskom.el -l ./docgen.el -f lyskom-docgen
$(GENFILES): $(SRC)/lyskom.el
$(EMACS) -batch -l $(SRC)/lyskom.el -l ./docgen.el -f lyskom-docgen
# This file is generated from the Makefile and contains references
# to all the chapters.
chp.xml: Makefile
chp.xml: Makefile docgen.el
echo > $@
for i in $(INCFILES) ; do \
echo "<!ENTITY $$i SYSTEM \"$$i\">" >> $@ ; \
......@@ -38,9 +46,13 @@ chp.xml: Makefile
$(SRC)/lyskom.el:
cd $(SRC) && make lyskom.el
clean:
rm -f $(GENFILES) $(INCFILES) chp.xml
# The .xml.inc files are the chapter files without the surrounding
# book element. They are built using the xml2inc script.
# book element. Probably XSLT would be the Right Thing, but sed
# gets the job done too
%.xml.inc: %.xml
./xml2inc < $< > $@
sed -e '/<book[ >]/,/<\/book>/! d' -e '/<book[ >]/ d' -e '/<\/book>/ d' < $< > $@
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment