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 | 11 | ifdef CONFIG_STATIC |
| 12 | 12 | LDFLAGS+=-static |
| 13 | 13 | endif |
| 14 | +ifdef BUILD_DOCS | |
| 14 | 15 | DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 |
| 16 | +else | |
| 17 | +DOCS= | |
| 18 | +endif | |
| 15 | 19 | |
| 16 | 20 | all: dyngen$(EXESUF) $(TOOLS) $(DOCS) |
| 17 | 21 | for d in $(TARGET_DIRS); do \ |
| ... | ... | @@ -34,7 +38,7 @@ clean: |
| 34 | 38 | done |
| 35 | 39 | |
| 36 | 40 | distclean: clean |
| 37 | - rm -f config-host.mak config-host.h | |
| 41 | + rm -f config-host.mak config-host.h $(DOCS) | |
| 38 | 42 | for d in $(TARGET_DIRS); do \ |
| 39 | 43 | rm -rf $$d || exit 1 ; \ |
| 40 | 44 | done | ... | ... |
configure
| ... | ... | @@ -94,6 +94,7 @@ check_gfx="yes" |
| 94 | 94 | check_gcc="yes" |
| 95 | 95 | softmmu="yes" |
| 96 | 96 | user="no" |
| 97 | +build_docs="no" | |
| 97 | 98 | |
| 98 | 99 | # OS specific |
| 99 | 100 | targetos=`uname -s` |
| ... | ... | @@ -427,6 +428,11 @@ fi # sdl compile test |
| 427 | 428 | fi # cross compilation |
| 428 | 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 | 436 | if test "$mingw32" = "yes" ; then |
| 431 | 437 | if test -z "$prefix" ; then |
| 432 | 438 | prefix="/c/Program Files/Qemu" |
| ... | ... | @@ -489,6 +495,7 @@ else |
| 489 | 495 | fi |
| 490 | 496 | echo "FMOD support $fmod $fmod_support" |
| 491 | 497 | echo "kqemu support $kqemu" |
| 498 | +echo "Documentation $build_docs" | |
| 492 | 499 | |
| 493 | 500 | if test $sdl_too_old = "yes"; then |
| 494 | 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 | 639 | echo "VPATH=$source_path" >> $config_mak |
| 633 | 640 | fi |
| 634 | 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 | 646 | # XXX: suppress that |
| 637 | 647 | if [ "$bsd" = "yes" ] ; then | ... | ... |