* [Qemu-devel] [PATCH][RFC] Make documentation optional
@ 2006-02-10 7:43 Michael Renzmann
2006-02-10 7:48 ` Michael Renzmann
0 siblings, 1 reply; 7+ messages in thread
From: Michael Renzmann @ 2006-02-10 7:43 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 527 bytes --]
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
[-- Attachment #2: qemu-cvs-docs.diff --]
[-- Type: text/x-patch, Size: 3659 bytes --]
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)
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Qemu-devel] [PATCH][RFC] Make documentation optional
2006-02-10 7:43 [Qemu-devel] [PATCH][RFC] Make documentation optional Michael Renzmann
@ 2006-02-10 7:48 ` Michael Renzmann
2006-02-10 8:54 ` Bernhard Fischer
0 siblings, 1 reply; 7+ messages in thread
From: Michael Renzmann @ 2006-02-10 7:48 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
Hi again.
On Fri, 2006-02-10 at 08:43 +0100, Michael Renzmann wrote:
> The attached patch ...
... contained some stuff that should have been ignored by diff. Sorry,
revised patch attached to this mail.
Bye, Mike
[-- Attachment #2: qemu-cvs-docs.diff --]
[-- Type: text/x-patch, Size: 2687 bytes --]
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)
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Qemu-devel] [PATCH][RFC] Make documentation optional
2006-02-10 7:48 ` Michael Renzmann
@ 2006-02-10 8:54 ` Bernhard Fischer
2006-02-10 8:59 ` Michael Renzmann
0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Fischer @ 2006-02-10 8:54 UTC (permalink / raw)
To: mrenzmann, qemu-devel
On Fri, Feb 10, 2006 at 08:48:39AM +0100, Michael Renzmann wrote:
>Hi again.
>
>On Fri, 2006-02-10 at 08:43 +0100, Michael Renzmann wrote:
>> The attached patch ...
>
>... contained some stuff that should have been ignored by diff. Sorry,
>revised patch attached to this mail.
>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
>@@ -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)"
What about just doing this
-install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
>@@ -78,15 +87,27 @@
>
> # documentation
> %.html: %.texi
>- texi2html -monolithic -number $<
>+ if [ -n "$(shell which texi2html)" ]; then \
>+ texi2html -monolithic -number $< ; \
same here:
-texi2html -monolithic -number $< ;
>- 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 > $@
ditto:
-pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH][RFC] Make documentation optional
2006-02-10 8:54 ` Bernhard Fischer
@ 2006-02-10 8:59 ` Michael Renzmann
2006-02-10 9:33 ` Bernhard Fischer
0 siblings, 1 reply; 7+ messages in thread
From: Michael Renzmann @ 2006-02-10 8:59 UTC (permalink / raw)
To: Bernhard Fischer; +Cc: qemu-devel
Hi.
On Fri, 2006-02-10 at 09:54 +0100, Bernhard Fischer wrote:
> What about just doing this
> -install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
That would work, but the user won't be noticed of the fact that parts of
the documentation isn't generated.
Bye, Mike
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH][RFC] Make documentation optional
2006-02-10 8:59 ` Michael Renzmann
@ 2006-02-10 9:33 ` Bernhard Fischer
2006-02-10 9:53 ` Michael Renzmann
2006-02-10 10:53 ` Sylvain Petreolle
0 siblings, 2 replies; 7+ messages in thread
From: Bernhard Fischer @ 2006-02-10 9:33 UTC (permalink / raw)
To: Michael Renzmann; +Cc: qemu-devel
On Fri, Feb 10, 2006 at 09:59:55AM +0100, Michael Renzmann wrote:
>Hi.
>
>On Fri, 2006-02-10 at 09:54 +0100, Bernhard Fischer wrote:
>> What about just doing this
>> -install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
>
>That would work, but the user won't be noticed of the fact that parts of
>the documentation isn't generated.
Not quite, you'll get
texi2html -monolithic etc failed
make: Error (ignored)
and the build will move on.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH][RFC] Make documentation optional
2006-02-10 9:33 ` Bernhard Fischer
@ 2006-02-10 9:53 ` Michael Renzmann
2006-02-10 10:53 ` Sylvain Petreolle
1 sibling, 0 replies; 7+ messages in thread
From: Michael Renzmann @ 2006-02-10 9:53 UTC (permalink / raw)
To: Bernhard Fischer; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
Hi.
On Fri, 2006-02-10 at 10:33 +0100, Bernhard Fischer wrote:
> >That would work, but the user won't be noticed of the fact that parts of
> >the documentation isn't generated.
> Not quite, you'll get
> texi2html -monolithic etc failed
> make: Error (ignored)
>
> and the build will move on.
Uhm... yeah, you're right. /me is a bit out of order this morning, it
seems :)
Attached is the revised patch. It makes make ignore errors related to
texi2html and/or pod2man are not available. In addition, documentation
files are now included in the "clean" target (forgot to mention that for
the first version of the patch).
Bye, Mike
[-- Attachment #2: qemu-cvs-docs-2.diff --]
[-- Type: text/x-patch, Size: 1864 bytes --]
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 10:45:32.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)"
@@ -53,10 +54,10 @@
pc-bios/proll.elf \
pc-bios/linux_boot.bin "$(datadir)"
mkdir -p "$(docdir)"
- install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
+ -install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
ifndef CONFIG_WIN32
mkdir -p "$(mandir)/man1"
- install qemu.1 qemu-img.1 "$(mandir)/man1"
+ -install qemu.1 qemu-img.1 "$(mandir)/man1"
mkdir -p "$(datadir)/keymaps"
install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(datadir)/keymaps"
endif
@@ -78,15 +79,15 @@
# documentation
%.html: %.texi
- texi2html -monolithic -number $<
+ -texi2html -monolithic -number $<
qemu.1: qemu-doc.texi
./texi2pod.pl $< qemu.pod
- pod2man --section=1 --center=" " --release=" " qemu.pod > $@
+ -pod2man --section=1 --center=" " --release=" " qemu.pod > $@
qemu-img.1: qemu-img.texi
./texi2pod.pl $< qemu-img.pod
- pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
+ -pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
FILE=qemu-$(shell cat VERSION)
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Qemu-devel] [PATCH][RFC] Make documentation optional
2006-02-10 9:33 ` Bernhard Fischer
2006-02-10 9:53 ` Michael Renzmann
@ 2006-02-10 10:53 ` Sylvain Petreolle
1 sibling, 0 replies; 7+ messages in thread
From: Sylvain Petreolle @ 2006-02-10 10:53 UTC (permalink / raw)
To: qemu-devel
The user still wont know the documentation has failed,
or he will have to search through the build logs.
--- Bernhard Fischer <rep.nop@aon.at> a écrit :
> On Fri, Feb 10, 2006 at 09:59:55AM +0100, Michael Renzmann wrote:
> >Hi.
> >
> >On Fri, 2006-02-10 at 09:54 +0100, Bernhard Fischer wrote:
> >> What about just doing this
> >> -install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
> >
> >That would work, but the user won't be noticed of the fact that parts of
> >the documentation isn't generated.
>
> Not quite, you'll get
> texi2html -monolithic etc failed
> make: Error (ignored)
>
> and the build will move on.
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
Kind regards,
Sylvain Petreolle (aka Usurp)
--- --- --- --- --- --- --- --- --- --- --- --- ---
Tired of a proprietary Windows on your computer ?
Use free ReactOS instead ( http://www.reactos.org )
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-02-10 10:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-10 7:43 [Qemu-devel] [PATCH][RFC] Make documentation optional Michael Renzmann
2006-02-10 7:48 ` Michael Renzmann
2006-02-10 8:54 ` Bernhard Fischer
2006-02-10 8:59 ` Michael Renzmann
2006-02-10 9:33 ` Bernhard Fischer
2006-02-10 9:53 ` Michael Renzmann
2006-02-10 10:53 ` Sylvain Petreolle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.