File: generate_machine_doc.sh

package info (click to toggle)
gxemul 0.7.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 12,152 kB
  • sloc: ansic: 111,065; sh: 972; exp: 354; makefile: 118
file content (24 lines) | stat: -rwxr-xr-x 797 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
#
# A simple script which puts a component tree dump into the HTML
# documentation for each machine.
#

if [ ! -x gxemul ]; then
	echo "GXemul hasn't been built yet?"
	echo "Remember to launch this script from the main gxemul"
	echo "directory, not from the doc directory."
	exit
fi

for a in doc/machines/*.SKEL; do
	MACHINE=`echo $a|cut -d _ -f 2- | cut -d . -f 1`
	echo Generating final HTML documentation for machine $MACHINE...
	
	sed s/XMACHINEX/$MACHINE/g < doc/machine_template.html > doc/machines/machine_$MACHINE.html
 	echo "<!-- This file is AUTOMATICALLY GENERATED! Do not edit. -->" >> doc/machines/machine_$MACHINE.html
	./gxemul -WW@D$MACHINE >> doc/machines/machine_$MACHINE.html
	cat doc/machines/machine_$MACHINE.html.SKEL >> doc/machines/machine_$MACHINE.html
done