1
2PWD_COMMAND=$${PWDCMD-pwd}
3MAKEINFO=makeinfo
4INC=../../../gcc/doc/include
5
6all: documentation.html                  \
7     faq/index.txt                       \
8     17_intro/porting.html               \
9     17_intro/porting-howto.html
10
11# chock full of GNUism, probably
12documentation.html: $(wildcard */howto.html)
13	sed -n '1,/beginlist/p' $@ > tmp.top
14	sed -n '/endlist/,$$p' $@ > tmp.bottom
15	echo '  <ul>' > tmp.middle
16	for i in [0-9]*/howto.html; do \
17	  title=`grep 'h1 ' $$i |\
18	  sed 's=.*\(Chapter [[:digit:]]*\):[[:space:]]*\(.*\)</a>.*=\2 (\1)='` ;\
19	  awk -v file=$$i -v "title=$$title" -f makedoc.awk $$i >> tmp.middle ;\
20	done
21	awk -v file=ext/howto.html -v "title=Extensions to the Standard Library"\
22	  -f makedoc.awk ext/howto.html >> tmp.middle ;\
23	echo '  </ul>' >> tmp.middle
24	cat tmp.top tmp.middle tmp.bottom > $@
25	rm tmp.top tmp.middle tmp.bottom
26
27faq/index.txt: faq/index.html
28	lynx -dump $< | sed "s%file://localhost`${PWD_COMMAND}`%..%" > $@
29
3017_intro/porting.html: 17_intro/porting.texi
31	${MAKEINFO} -I ${INC} --html --no-split $< -o $@
32
33# known to work under RH; this can be cleaned up later if needed
3417_intro/porting-howto.html: 17_intro/porting-howto.xml
35	xltproc -o $@ /usr/share/xml/docbook/xsl-stylesheets-1.48-2/html/docbook.xsl $<
36
37# vim:noet ts=4
38