9 SOURCES=analyser.c generator.c items.c util.c \
10 folds.c headers.c links.c robodoc.c \
11 analyser.h generator.h items.h util.h \
12 folds.h headers.h links.h robodoc.h
14 # The name of your Project
18 # The various documentation files, derived from the source files.
21 HTMLDOCS=$(SOURCES:=.html)
22 HTMLXREFS=$(HTMLDOCS:.html=.html.xref)
23 HTMLXREFSFILE=$(PROJECT)_html.xrefs
26 LATEXDOCS=$(SOURCES:=.tex)
27 LATEXXREFS=$(LATEXDOCS:.tex=.tex.xref)
28 LATEXXREFSFILE=$(PROJECT)_tex.xrefs
31 ASCIIDOCS=$(SOURCES:=.txt)
34 RTFDOCS=$(SOURCES:=.rtf)
35 RTFXREFS=$(RTFDOCS:.rtf=.rtf.xref)
36 RTFXREFSFILE=$(PROJECT)_rtf.xrefs
39 xrefall: xrefhtml xreftex xrefrtf
40 docall: html tex ascii rtf
42 # Create the xref files for the various formats.
43 xhtml: $(HTMLXREFSFILE)
44 xtex: $(LATEXXREFSFILE)
47 # Create the documentation files for the various formats.
48 html: $(HTMLDOCS) $(PROJECT)_mi.html
49 tex: $(LATEXDOCS) $(PROJECT)_mi.tex
53 # master index file, currently works only for html and latex documentation.
54 $(PROJECT)_mi.html: $(HTMLXREFSFILE)
55 $(ROBODOC) $< $@ INDEX HTML TITLE "$(PROJECT) Master Index"
57 $(PROJECT)_mi.tex: $(LATEXXREFSFILE)
58 $(ROBODOC) $< $@ INDEX LATEX TITLE "$(PROJECT) API Reference"
60 # create xrefs file (file with the names of all .xref files).
61 $(HTMLXREFSFILE) : $(HTMLXREFS)
62 /bin/ls $(HTMLXREFS) > $@
63 $(LATEXXREFSFILE) : $(LATEXXREFS)
64 /bin/ls $(LATEXXREFS) > $@
65 $(RTFXREFSFILE) : $(RTFXREFS)
66 /bin/ls $(RTFXREFS) > $@
68 # Rule to create an .xref file from a source file for the various formats.
70 $(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@
72 $(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@
74 $(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@
76 # Rule to create html documentation from a source file.
78 $(ROBODOC) $< $@ HTML $(ROBOOPTS) XREF $(HTMLXREFSFILE)
80 # Rule to create latex documentation from a source file.
81 # We do not include source items, and generate laxtex documents
82 # than can be included in a master document.
84 $(ROBODOC) $< $@ LATEX $(ROBOOPTS) NOSOURCE SINGLEDOC XREF $(LATEXXREFSFILE)
86 # Rule to create ascii documentation from a source file.
88 $(ROBODOC) $< $@ ASCII
90 # Rule to create rtf documentation from a source file.
92 $(ROBODOC) $< $@ RTF $(ROBOOPTS) XREF $(RTFXREFSFILE)
94 # Use netscape to view the master index file for our project.
96 netscape $(PROJECT)_mi.html
98 # Use the latex programs to generate a .dvi from the master index file
99 # for our prokect. View this .dvi file with xdvi
102 makeindex $(PROJECT)_mi
105 xdvi $(PROJECT)_mi.dvi
107 # Clean-up the mess we made
114 rm -f $(PROJECT)_mi.* *.aux
118 rm -f $(HTMLXREFSFILE)
119 rm -f $(LATEXXREFSFILE)
120 rm -f $(RTFXREFSFILE)