Skip to content

Commit 3c5c2c2

Browse files
0.8.6.1:
* clean.sh: Allow recursive includes in src/runtime/Config * doc/*: Convert from SGML format and processing to XML Currently, catalogs are in place for Debian and RedHat which allow automated use of local files instead of the tools downloading DTDs and XSLs from their canonical URLs. I'm glad to help setup catalogs for other operating systems.
1 parent 1462adf commit 3c5c2c2

20 files changed

+1994
-1605
lines changed

clean.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ rm -rf obj/* output/* doc/user-manual \
2222
# distribution, we automatically clean up after it here in the
2323
# standard clean.sh file.)
2424

25+
# Ensure we know GNUMAKE
26+
. find-gnumake.sh
27+
find_gnumake
28+
2529
# Ask some other directories to clean themselves up.
2630
original_pwd=`pwd`
2731
for d in tools-for-build; do
@@ -31,7 +35,7 @@ for d in tools-for-build; do
3135
# this script is just the operations done by these make's, which
3236
# is misleading when this script does lotso other operations too.
3337
# -- WHN
34-
make -s clean
38+
$GNUMAKE -I ../src/runtime -s clean
3539
cd $original_pwd > /dev/null
3640
done
3741

doc/Makefile

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
DOCFILE_BASE_DEFAULT:=user-manual
2+
DOCFILE_EXT_DEFAULT:=xml
3+
4+
5+
# Standard docfile processing
6+
7+
DEBIAN=$(shell expr "`cat /etc/issue`" : '.*Debian.*')
8+
SUSE=$(shell expr "`cat /etc/issue`" : '.*SuSE.*')
9+
REDHAT=$(shell expr "`cat /etc/issue`" : '.*RedHat.*')
10+
11+
12+
ifneq (${DEBIAN},0)
13+
OS:=debian
14+
else
15+
ifneq (${SUSE},0)
16+
OS=suse
17+
else
18+
ifneq (${REDHAT},0)
19+
OS=redhat
20+
endif
21+
endif
22+
endif
23+
24+
25+
ifndef DOCFILE_BASE
26+
DOCFILE_BASE=${DOCFILE_BASE_DEFAULT}
27+
endif
28+
29+
ifndef DOCFILE_EXT
30+
DOCFILE_EXT=${DOCFILE_EXT_DEFAULT}
31+
endif
32+
33+
DOCFILE:=${DOCFILE_BASE}.${DOCFILE_EXT}
34+
FOFILE:=${DOCFILE_BASE}.fo
35+
PDFFILE:=${DOCFILE_BASE}.pdf
36+
PSFILE:=${DOCFILE_BASE}.ps
37+
DVIFILE:=${DOCFILE_BASE}.dvi
38+
TXTFILE:=${DOCFILE_BASE}.txt
39+
HTMLFILE:=${DOCFILE_BASE}.html
40+
TMPFILES:=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log
41+
DOCFILES:=$(shell echo *.xml *.xsl)
42+
43+
ifeq ($(XSLTPROC),)
44+
XSLTPROC:=xsltproc
45+
endif
46+
47+
CATALOG:=`pwd`/catalog-${OS}.xml
48+
CHECK:=XML_CATALOG_FILES="$(CATALOG)" xmllint --noout --xinclude --postvalid $(DOCFILE) || exit 1
49+
50+
.PHONY: all
51+
all: html pdf
52+
53+
.PHONY: dist
54+
dist: html pdf
55+
56+
.PHONY: doc
57+
doc: html pdf
58+
59+
.PHONY: check
60+
check:
61+
@echo "Operating system detected: ${OS}"
62+
@$(CHECK)
63+
64+
.PHONY: html
65+
html: html-stamp
66+
67+
html-stamp: $(DOCFILES) Makefile
68+
@rm -rf html
69+
@mkdir html
70+
@XML_CATALOG_FILES="$(CATALOG)" $(XSLTPROC) --stringparam chunker.output.encoding ISO-8859-1 \
71+
--xinclude --output html/ html_chunk.xsl $(DOCFILE)
72+
touch html-stamp
73+
74+
.PHONY: fo
75+
fo: ${FOFILE}
76+
77+
${FOFILE}: $(DOCFILES) Makefile
78+
@XML_CATALOG_FILES="$(CATALOG)" $(XSLTPROC) --xinclude --output $(FOFILE) fo.xsl $(DOCFILE)
79+
80+
.PHONY: pdf
81+
pdf: ${PDFFILE}
82+
83+
${PDFFILE}: ${DOCFILES} Makefile
84+
@$(MAKE) fo
85+
@fop $(FOFILE) -pdf $(PDFFILE) > /dev/null
86+
87+
.PHONY: dvi
88+
dvi: ${DVIFILE}
89+
90+
.PHONY: ps
91+
ps: ${PSFILE}
92+
93+
${PSFILE}: ${DOCFILES} Makefile
94+
@$(MAKE) fo
95+
@fop $(FOFILE) -ps $(PSFILE) > /dev/null
96+
97+
98+
.PHONY: txt
99+
txt: ${TXTFILE}
100+
101+
${TXTFILE}: ${FOFILE}
102+
@XML_CATALOG_FILES="$(CATALOG)" $(XSLTPROC) --xinclude --output ${HTMLFILE} html.xsl $(DOCFILE)
103+
lynx -dump ${HTMLFILE} > ${TXTFILE}
104+
105+
.PHONY: clean
106+
clean:
107+
@rm -f *~ *.bak *.orig \#*\# .\#* texput.log
108+
@rm -rf html ${PSFILE} ${HTMLFILE} html-stamp
109+
@rm -f ${TMPFILES} ${FOFILE}
110+
@rm -f ${DVIFILE} ${TXTFILE}
111+
112+
.PHONY: distclean
113+
distclean: clean

0 commit comments

Comments
 (0)