From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F7SwC-0004hG-An for qemu-devel@nongnu.org; Fri, 10 Feb 2006 02:43:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F7SwB-0004fq-72 for qemu-devel@nongnu.org; Fri, 10 Feb 2006 02:43:28 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F7SwB-0004fg-47 for qemu-devel@nongnu.org; Fri, 10 Feb 2006 02:43:27 -0500 Received: from [217.24.0.78] (helo=legolas.otaku42.de) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1F7Szt-0003Qe-KN for qemu-devel@nongnu.org; Fri, 10 Feb 2006 02:47:17 -0500 Received: from dslb-084-058-148-172.pools.arcor-ip.net ([84.58.148.172] helo=localhost ident=otaku) by legolas.otaku42.de with esmtpa (Exim 4.50 and XAMS 0.0.11) id 1F7Sw7-0003B3-LT for qemu-devel@nongnu.org; Fri, 10 Feb 2006 08:43:23 +0100 From: Michael Renzmann Content-Type: multipart/mixed; boundary="=-kIqtlzmytusTqhvWadZI" Date: Fri, 10 Feb 2006 08:43:23 +0100 Message-Id: <1139557403.5264.25.camel@gimli> Mime-Version: 1.0 Subject: [Qemu-devel] [PATCH][RFC] Make documentation optional Reply-To: mrenzmann@otaku42.de, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel --=-kIqtlzmytusTqhvWadZI Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi. The compilation of the latest qemu CVS version aborted due to a missing texi2html package. In my opinion, the build shouldn't depend on texi2html and pod2man. I suggest to make the documentation optional and warn the user if any of the necessary tools are missing. The attached patch modifies Makefile such that the documentation will only be generated when the necessary tools are available. The installation has been fixed such that missing documentation file won't break the compilation. Comments welcome. Bye, Mike --=-kIqtlzmytusTqhvWadZI Content-Disposition: attachment; filename=qemu-cvs-docs.diff Content-Type: text/x-patch; name=qemu-cvs-docs.diff; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 7bit diff -urN qemu-cvs/CVS/Entries qemu-cvs-o42/CVS/Entries --- qemu-cvs/CVS/Entries 2006-02-10 06:51:34.000000000 +0100 +++ qemu-cvs-o42/CVS/Entries 2006-02-10 08:33:19.000000000 +0100 @@ -87,4 +87,16 @@ /vl.c/1.163/Wed Feb 8 22:46:31 2006// /vl.h/1.104/Wed Feb 8 04:42:17 2006// /x86_64.ld/1.1/Thu Jan 6 20:50:00 2005// -D +D/audio//// +D/fpu//// +D/hw//// +D/keymaps//// +D/linux-user//// +D/pc-bios//// +D/slirp//// +D/target-arm//// +D/target-i386//// +D/target-mips//// +D/target-ppc//// +D/target-sparc//// +D/tests//// diff -urN qemu-cvs/CVS/Entries.Log qemu-cvs-o42/CVS/Entries.Log --- qemu-cvs/CVS/Entries.Log 2006-02-10 06:51:39.000000000 +0100 +++ qemu-cvs-o42/CVS/Entries.Log 1970-01-01 01:00:00.000000000 +0100 @@ -1,13 +0,0 @@ -A D/audio//// -A D/fpu//// -A D/hw//// -A D/keymaps//// -A D/linux-user//// -A D/pc-bios//// -A D/slirp//// -A D/target-arm//// -A D/target-i386//// -A D/target-mips//// -A D/target-ppc//// -A D/target-sparc//// -A D/tests//// diff -urN qemu-cvs/Makefile qemu-cvs-o42/Makefile --- qemu-cvs/Makefile 2006-02-08 23:39:17.000000000 +0100 +++ qemu-cvs-o42/Makefile 2006-02-10 08:31:17.000000000 +0100 @@ -28,6 +28,7 @@ # avoid old build problems by removing potentially incorrect old files rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ + rm -f $(DOCS) $(MAKE) -C tests clean for d in $(TARGET_DIRS); do \ $(MAKE) -C $$d $@ || exit 1 ; \ @@ -43,7 +44,7 @@ ar de en-us fi fr-be hr it lv nl pl ru th \ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr -install: all +install: all mkdir -p "$(bindir)" install -m 755 -s $(TOOLS) "$(bindir)" mkdir -p "$(datadir)" @@ -52,11 +53,19 @@ pc-bios/ppc_rom.bin pc-bios/video.x \ pc-bios/proll.elf \ pc-bios/linux_boot.bin "$(datadir)" - mkdir -p "$(docdir)" - install -m 644 qemu-doc.html qemu-tech.html "$(docdir)" + if [ -f "./*.html" ]; then \ + mkdir -p "$(docdir)" ; \ + install -m 644 qemu-doc.html qemu-tech.html "$(docdir)" ; \ + else \ + echo "INFO: skipped installation of HTML documentation" ; \ + fi ifndef CONFIG_WIN32 - mkdir -p "$(mandir)/man1" - install qemu.1 qemu-img.1 "$(mandir)/man1" + if [ -f "./*.1" ]; then \ + mkdir -p "$(mandir)/man1" ; \ + install qemu.1 qemu-img.1 "$(mandir)/man1" ; \ + else \ + echo "INFO: skipped installation of man pages" ; \ + fi mkdir -p "$(datadir)/keymaps" install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(datadir)/keymaps" endif @@ -78,15 +87,27 @@ # documentation %.html: %.texi - texi2html -monolithic -number $< + if [ -n "$(shell which texi2html)" ]; then \ + texi2html -monolithic -number $< ; \ + else \ + echo "WARNING: texi2html not found, skipped generation of" $< ; \ + fi qemu.1: qemu-doc.texi - ./texi2pod.pl $< qemu.pod - pod2man --section=1 --center=" " --release=" " qemu.pod > $@ + if [ -n "$(shell which pod2man)" ]; then \ + ./texi2pod.pl $< qemu.pod ; \ + pod2man --section=1 --center=" " --release=" " qemu.pod > $@ ; \ + else \ + echo "WARNING: pod2man not found, skipped generation of" $@ ; \ + fi qemu-img.1: qemu-img.texi - ./texi2pod.pl $< qemu-img.pod - pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@ + if [ -n "$(shell which pod2man)" ]; then \ + ./texi2pod.pl $< qemu-img.pod ; \ + pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@ ; \ + else \ + echo "WARNING: pod2man not found, skipped generation of" $@ ; \ + fi FILE=qemu-$(shell cat VERSION) --=-kIqtlzmytusTqhvWadZI--