This repository has been archived by the owner on Dec 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_doc
82 lines (64 loc) · 1.96 KB
/
Makefile_doc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
SHELL = /bin/sh
.SUFFIXES:
ROBODOC=robodoc
ROBOOPTS=C SORT
PROJECT=SC_CLIB
# Your source files.
#
SOURCES=$(PRGS) $(CS) $(ASMS)
# The various documentation files, derived from the source files.
# HTML
#
HTMLDOCS=$(SOURCES:=.html)
HTMLXREFS=$(HTMLDOCS:.html=.xref)
HTMLXREFSFILE=$(PROJECT)._xrefs
# Some common targets
xrefall: xhtml
docall: html
# Create the xref files for the various formats.
xhtml: $(HTMLXREFSFILE)
# Create the documentation files for the various formats.
html: $(PROJECT)_mi.html $(HTMLDOCS)
tex: $(PROJECT)_mi.tex $(LATEXDOCS)
rtf: $(RTFDOCS)
ascii: $(ASCIIDOCS)
# master index file, currently works only for html and latex documentation.
$(PROJECT)_mi.html: $(HTMLXREFSFILE)
$(ROBODOC) $< $@ INDEX HTML TITLE "$(PROJECT) Master Index"
# create xrefs file (file with the names of all .xref files).
$(HTMLXREFSFILE) : $(HTMLXREFS)
/bin/ls $(HTMLXREFS) > $(PROJECT).xrefs
# Rule to create an .xref file from a source file for the various formats.
%.xref : %
$(ROBODOC) $< $(@:.xref=.html) GENXREF $@ HTML INTERNAL
# Rule to create html documentation from a source file.
%.html : % $(SOURCES)
$(ROBODOC) $< $@ HTML $(ROBOOPTS) XREF $(HTMLXREFSFILE)
# Rule to create latex documentation from a source file.
# We do not include source items, and generate laxtex documents
# than can be included in a master document.
# Use netscape to view the master index file for our project.
htmlview: html
netscape $(PROJECT)_mi.html
# Use the latex programs to generate a .dvi from the master index file
# for our prokect. View this .dvi file with xdvi
texview: tex
latex $(PROJECT)_mi
makeindex $(PROJECT)_mi
latex $(PROJECT)_mi
latex $(PROJECT)_mi
xdvi $(PROJECT)_mi.dvi
# Clean-up the mess we made
#
cleandoc:
rm -f $(HTMLXREFS)
rm -f $(HTMLDOCS)
rm -f $(LATEXXREFS)
rm -f $(LATEXDOCS)
rm -f $(PROJECT)_mi.* *.aux
rm -f $(RTFXREFS)
rm -f $(RTFDOCS)
rm -f $(ASCIIDOCS)
rm -f $(HTMLXREFSFILE)
rm -f $(LATEXXREFSFILE)
rm -f $(RTFXREFSFILE)