Syncing documentation vs. -help vs. qemu_options table

Try to keep documentation about command line switches, -help text and
qemu_options table synchronized. 

In true Qemu tradition, an include file is generated from single .hx file
containing all relevant information in one place. The include file is
parsed once for getting the enums, another time for getopt tables and
hird time for help messages. Texi documentation for the options is
generated from the same .hx file.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6884 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
blueswir1
2009-03-28 06:44:27 +00:00
parent 649c907808
commit 5824d65122
6 changed files with 1551 additions and 1378 deletions
+7 -4
View File
@@ -283,13 +283,16 @@ cscope:
# documentation
%.html: %.texi
texi2html -monolithic -number $<
texi2html -I=. -monolithic -number $<
%.info: %.texi
makeinfo $< -o $@
makeinfo -I . $< -o $@
%.dvi: %.texi
texi2dvi $<
texi2dvi -I . $<
qemu-options.texi: $(SRC_PATH)/qemu-options.hx
sh ./hxtool -t < $< > $@
qemu.1: qemu-doc.texi
perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod
@@ -309,7 +312,7 @@ dvi: qemu-doc.dvi qemu-tech.dvi
html: qemu-doc.html qemu-tech.html
qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi
qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi
VERSION ?= $(shell cat VERSION)
FILE = qemu-$(VERSION)
+6 -1
View File
@@ -729,6 +729,8 @@ LDFLAGS+=-p
main.o: CFLAGS+=-p
endif
vl.o: qemu-options.h
$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
@@ -744,8 +746,11 @@ else
$(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)
endif
qemu-options.h: $(SRC_PATH)/qemu-options.hx
sh ../hxtool -h < $< > $@
clean:
rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o qemu-options.h
rm -f *.d */*.d tcg/*.o
install: all
+42
View File
@@ -0,0 +1,42 @@
#!/bin/sh
hxtoh()
{
flag=1
while read str; do
case $str in
HXCOMM*)
;;
STEXI*|ETEXI*) flag=$(($flag^1))
;;
*)
test $flag -eq 1 && echo $str
;;
esac
done
}
hxtotexi()
{
flag=0
while read str; do
case "$str" in
HXCOMM*)
;;
STEXI*|ETEXI*) flag=$(($flag^1))
;;
DEFHEADING*)
echo $(expr "$str" : "DEFHEADING(\(.*\))")
;;
*)
test $flag -eq 1 && echo $str
;;
esac
done
}
case "$1" in
"-h") hxtoh ;;
"-t") hxtotexi ;;
*) exit 1 ;;
esac
+1 -974
View File
File diff suppressed because it is too large Load Diff
+1462
View File
File diff suppressed because it is too large Load Diff
+33 -399
View File
File diff suppressed because it is too large Load Diff