Commit cc8ae6de58eb6cd8748197442bbcdc165b5f87a2
1 parent
d0ecd2aa
Autodetect tools neccessary for building documentation.
Make distclean remove generated documentation files. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1834 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
15 additions
and
1 deletions
Makefile
| @@ -11,7 +11,11 @@ TOOLS=qemu-img$(EXESUF) | @@ -11,7 +11,11 @@ TOOLS=qemu-img$(EXESUF) | ||
| 11 | ifdef CONFIG_STATIC | 11 | ifdef CONFIG_STATIC |
| 12 | LDFLAGS+=-static | 12 | LDFLAGS+=-static |
| 13 | endif | 13 | endif |
| 14 | +ifdef BUILD_DOCS | ||
| 14 | DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 | 15 | DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 |
| 16 | +else | ||
| 17 | +DOCS= | ||
| 18 | +endif | ||
| 15 | 19 | ||
| 16 | all: dyngen$(EXESUF) $(TOOLS) $(DOCS) | 20 | all: dyngen$(EXESUF) $(TOOLS) $(DOCS) |
| 17 | for d in $(TARGET_DIRS); do \ | 21 | for d in $(TARGET_DIRS); do \ |
| @@ -34,7 +38,7 @@ clean: | @@ -34,7 +38,7 @@ clean: | ||
| 34 | done | 38 | done |
| 35 | 39 | ||
| 36 | distclean: clean | 40 | distclean: clean |
| 37 | - rm -f config-host.mak config-host.h | 41 | + rm -f config-host.mak config-host.h $(DOCS) |
| 38 | for d in $(TARGET_DIRS); do \ | 42 | for d in $(TARGET_DIRS); do \ |
| 39 | rm -rf $$d || exit 1 ; \ | 43 | rm -rf $$d || exit 1 ; \ |
| 40 | done | 44 | done |
configure
| @@ -94,6 +94,7 @@ check_gfx="yes" | @@ -94,6 +94,7 @@ check_gfx="yes" | ||
| 94 | check_gcc="yes" | 94 | check_gcc="yes" |
| 95 | softmmu="yes" | 95 | softmmu="yes" |
| 96 | user="no" | 96 | user="no" |
| 97 | +build_docs="no" | ||
| 97 | 98 | ||
| 98 | # OS specific | 99 | # OS specific |
| 99 | targetos=`uname -s` | 100 | targetos=`uname -s` |
| @@ -427,6 +428,11 @@ fi # sdl compile test | @@ -427,6 +428,11 @@ fi # sdl compile test | ||
| 427 | fi # cross compilation | 428 | fi # cross compilation |
| 428 | fi # -z $sdl | 429 | fi # -z $sdl |
| 429 | 430 | ||
| 431 | +# Check if tools are available to build documentation. | ||
| 432 | +if [ ! -z `which texi2html` ] && [ ! -z `which pod2man` ]; then | ||
| 433 | + build_docs="yes" | ||
| 434 | +fi | ||
| 435 | + | ||
| 430 | if test "$mingw32" = "yes" ; then | 436 | if test "$mingw32" = "yes" ; then |
| 431 | if test -z "$prefix" ; then | 437 | if test -z "$prefix" ; then |
| 432 | prefix="/c/Program Files/Qemu" | 438 | prefix="/c/Program Files/Qemu" |
| @@ -489,6 +495,7 @@ else | @@ -489,6 +495,7 @@ else | ||
| 489 | fi | 495 | fi |
| 490 | echo "FMOD support $fmod $fmod_support" | 496 | echo "FMOD support $fmod $fmod_support" |
| 491 | echo "kqemu support $kqemu" | 497 | echo "kqemu support $kqemu" |
| 498 | +echo "Documentation $build_docs" | ||
| 492 | 499 | ||
| 493 | if test $sdl_too_old = "yes"; then | 500 | if test $sdl_too_old = "yes"; then |
| 494 | echo "-> Your SDL version is too old - please upgrade to have SDL support" | 501 | echo "-> Your SDL version is too old - please upgrade to have SDL support" |
| @@ -632,6 +639,9 @@ if [ "$source_path_used" = "yes" ]; then | @@ -632,6 +639,9 @@ if [ "$source_path_used" = "yes" ]; then | ||
| 632 | echo "VPATH=$source_path" >> $config_mak | 639 | echo "VPATH=$source_path" >> $config_mak |
| 633 | fi | 640 | fi |
| 634 | echo "TARGET_DIRS=$target_list" >> $config_mak | 641 | echo "TARGET_DIRS=$target_list" >> $config_mak |
| 642 | +if [ "$build_docs" = "yes" ] ; then | ||
| 643 | + echo "BUILD_DOCS=yes" >> $config_mak | ||
| 644 | +fi | ||
| 635 | 645 | ||
| 636 | # XXX: suppress that | 646 | # XXX: suppress that |
| 637 | if [ "$bsd" = "yes" ] ; then | 647 | if [ "$bsd" = "yes" ] ; then |